blob: a10f94cf5892a6f1891ecf3a964c9f3133e8180c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include "app.hpp"
#include "compat/enum-bitset.hpp"
#include "src/world.hpp"
#include "editor.hpp"
#include "tests.hpp"
#include "draw/wireframe-meshes.hpp"
#include "floormat/main.hpp"
#include <Magnum/ImGuiIntegration/Context.h>
namespace floormat {
app::app(fm_settings&& opts) :
M{floormat_main::create(*this, move(opts))},
_imgui{InPlaceInit, NoCreate},
_wireframe{InPlaceInit},
_tests{tests_data_::make()},
_editor{InPlaceInit, this},
keys_{InPlaceInit, 0u},
key_modifiers{}
{
reset_world_post();
auto& w = M->world();
constexpr chunk_coords_ coord{0, 0, 0};
maybe_initialize_chunk_(coord, w[coord]);
reset_camera_offset();
M->set_render_vobjs(_render_vobjs);
reserve_inspector_array();
}
app::~app()
{
reset_world_pre();
}
} // namespace floormat
|