diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 00:37:57 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 00:37:57 +0200 |
| commit | 00ca30257d85dfe2c95040d4e3c30741e2872387 (patch) | |
| tree | e98c567bc9d443d440df6733143278c045d77c82 | |
| parent | a638d66ab02c544590b007ca288137b80a5c1239 (diff) | |
a
| -rw-r--r-- | editor/app.cpp | 4 | ||||
| -rw-r--r-- | main/draw.cpp | 8 | ||||
| -rw-r--r-- | main/floormat-main-impl.cpp | 5 | ||||
| -rw-r--r-- | main/floormat-main-impl.hpp | 1 | ||||
| -rw-r--r-- | main/floormat-main.hpp | 1 |
5 files changed, 13 insertions, 6 deletions
diff --git a/editor/app.cpp b/editor/app.cpp index da507563..324471cd 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -5,8 +5,8 @@ namespace floormat { app::app() : - FM{ floormat_main::create(*this, {})}, - _dummy{(void(fmain->register_debug_callback()), nullptr)}, + M{ floormat_main::create(*this, {})}, + _dummy{M->register_debug_callback()}, _floor1{loader.tile_atlas("floor-tiles", {44, 4})}, _floor2{loader.tile_atlas("metal1", {2, 2})}, _wall1{loader.tile_atlas("wood2", {1, 1})}, diff --git a/main/draw.cpp b/main/draw.cpp index 8c6c3e64..71b2f249 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -50,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(); @@ -83,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; @@ -113,5 +113,5 @@ void floormat::draw_cursor_tile() if (_cursor_tile && !_cursor_in_imgui) draw_wireframe_quad(*_cursor_tile); } - +#endif } // namespace floormat diff --git a/main/floormat-main-impl.cpp b/main/floormat-main-impl.cpp index 7ba31490..6040beb8 100644 --- a/main/floormat-main-impl.cpp +++ b/main/floormat-main-impl.cpp @@ -207,6 +207,11 @@ void main_impl::quit(int status) Platform::Sdl2Application::exit(status); } +int main_impl::exec() +{ + return Sdl2Application::exec(); +} + struct world& main_impl::world() noexcept { return _world; diff --git a/main/floormat-main-impl.hpp b/main/floormat-main-impl.hpp index a952cdda..2674bbae 100644 --- a/main/floormat-main-impl.hpp +++ b/main/floormat-main-impl.hpp @@ -20,6 +20,7 @@ struct main_impl final : Platform::Sdl2Application, floormat_main main_impl(floormat_app& app, fm_options opts) noexcept; ~main_impl() noexcept override; + int exec() override; void quit(int status) override; Magnum::Math::Vector2<int> window_size() const noexcept override; diff --git a/main/floormat-main.hpp b/main/floormat-main.hpp index b569c5d7..b6503c08 100644 --- a/main/floormat-main.hpp +++ b/main/floormat-main.hpp @@ -20,6 +20,7 @@ struct floormat_main fm_DECLARE_DELETED_COPY_ASSIGNMENT(floormat_main); fm_DECLARE_DEPRECATED_MOVE_ASSIGNMENT(floormat_main); + virtual int exec() = 0; virtual void quit(int status) = 0; virtual Magnum::Math::Vector2<int> window_size() const noexcept = 0; |
