summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-23 20:49:14 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-23 20:49:14 +0200
commitb6a067678ab9e225647b256595d54dde2ce6f2f5 (patch)
tree5511af38d35cea0cfaf59fffe9b513d46820f0b2 /main
parent4341fb36784a9da7b519d81d78e8df983816d791 (diff)
a
Diffstat (limited to 'main')
-rw-r--r--main/CMakeLists.txt3
-rw-r--r--main/draw.cpp7
-rw-r--r--main/events.cpp4
-rw-r--r--main/floormat.hpp8
-rw-r--r--main/main.cpp2
5 files changed, 15 insertions, 9 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 81a67fee..77538920 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -1,7 +1,7 @@
file(GLOB sources "*.cpp" CONFIGURE_ARGS)
link_libraries(${PROJECT_NAME})
-link_libraries(Magnum::Sdl2Application Magnum::Trade)
+link_libraries(Magnum::Sdl2Application Corrade::Containers Magnum::GL Magnum::Trade)
link_libraries(MagnumIntegration::ImGui)
add_library(${PROJECT_NAME}-main STATIC "${sources}")
@@ -9,4 +9,3 @@ add_library(${PROJECT_NAME}-main STATIC "${sources}")
if(FLOORMAT_PRECOMPILED-HEADERS)
target_precompile_headers(${PROJECT_NAME}-main PRIVATE precomp.hpp)
endif()
-
diff --git a/main/draw.cpp b/main/draw.cpp
index cc9e85d3..8c6c3e64 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -8,6 +8,7 @@
namespace floormat {
+#if 0
void floormat::drawEvent()
{
if (const float dt = timeline.previousFrameDuration(); dt > 0)
@@ -49,14 +50,14 @@ void floormat::drawEvent()
redraw();
timeline.nextFrame();
}
-
+#endif
void floormat::draw_msaa()
{
const with_shifted_camera_offset o{_shader, BASE_X, BASE_Y};
draw_world();
draw_cursor_tile();
}
-
+#if 0
void floormat::draw_world()
{
auto foo = get_draw_bounds();
@@ -82,7 +83,7 @@ void floormat::draw_world()
_wall_mesh.draw(_shader, *_world[c]);
}
}
-
+#endif
void floormat::draw_wireframe_quad(global_coords pos)
{
constexpr float LINE_WIDTH = 2;
diff --git a/main/events.cpp b/main/events.cpp
index 989406ba..242e890e 100644
--- a/main/events.cpp
+++ b/main/events.cpp
@@ -6,6 +6,7 @@
namespace floormat {
+#if 0
void main_impl::viewportEvent(Platform::Sdl2Application::ViewportEvent& event)
{
fm_assert(event.framebufferSize() == event.windowSize());
@@ -29,6 +30,7 @@ void main_impl::mouseReleaseEvent(Platform::Sdl2Application::MouseEvent& event)
return event.setAccepted();
do_mouse_release((int)event.button());
}
+#endif
void main_impl::mouseMoveEvent(Platform::Sdl2Application::MouseMoveEvent& event)
{
@@ -42,6 +44,7 @@ void main_impl::mouseMoveEvent(Platform::Sdl2Application::MouseMoveEvent& event)
do_mouse_move(*_cursor_tile);
}
+#if 0
void main_impl::mouseScrollEvent(Platform::Sdl2Application::MouseScrollEvent& event)
{
if (_imgui.handleMouseScrollEvent(event))
@@ -94,6 +97,7 @@ void main_impl::anyEvent(SDL_Event& event)
std::fputs("", stdout); break; // put breakpoint here
}
}
+#endif
void main_impl::event_focus_out() // TODO move to app
{
diff --git a/main/floormat.hpp b/main/floormat.hpp
index cc73c459..ce9e1b38 100644
--- a/main/floormat.hpp
+++ b/main/floormat.hpp
@@ -12,12 +12,12 @@ enum class fm_log_level : unsigned char { quiet, normal, verbose, };
struct fm_options final
{
Magnum::Math::Vector2<int> resolution{1024, 768};
- Containers::String title{"Test"};
- Containers::String disabled_extensions; // TODO
+ Corrade::Containers::String title{"Test"};
+ Corrade::Containers::String disabled_extensions; // TODO
std::uint8_t msaa_samples = 4;
fm_tristate vsync = fm_tristate::maybe;
- fm_gpu_debug gpu_debug = fm_gpu_debug::on; // TODO
- fm_log_level log_level = fm_log_level::normal; // TODO
+ fm_gpu_debug gpu_debug = fm_gpu_debug::on;
+ fm_log_level log_level = fm_log_level::normal;
std::uint8_t resizable : 1 = true,
fullscreen : 1 = false,
fullscreen_desktop : 1 = false,
diff --git a/main/main.cpp b/main/main.cpp
index 37e7164b..7ffc1a28 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -12,6 +12,7 @@
namespace floormat {
+#if 0
int floormat::run_from_argv(int argc, char** argv)
{
Corrade::Utility::Arguments args{};
@@ -83,6 +84,7 @@ void floormat::recalc_viewport(Vector2i size)
_msaa_framebuffer.attachRenderbuffer(GL::Framebuffer::ColorAttachment{0}, _msaa_renderbuffer);
#endif
}
+#endif
} // namespace floormat