diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -1,4 +1,4 @@ -#include <memory> +#include <utility> #include <raylib.h> @@ -11,15 +11,17 @@ int main(int argc, char* argv[]) { InitWindow(800, 600, "Derelict"); - SetWindowState(FLAG_WINDOW_RESIZABLE); - SetTargetFPS(60); - DumpSource source("sample.json"); - auto grids = Reader::read(source); - View view(grids); - while (!WindowShouldClose()) { - view.update(GetFrameTime()); - view.draw(); + SetWindowState(FLAG_WINDOW_RESIZABLE); + SetTargetFPS(60); + DumpSource source("sample.json"); + auto grids = Reader::read(source); + View view(std::move(grids)); + while (!WindowShouldClose()) + { + view.update(GetFrameTime()); + view.draw(); + } } CloseWindow(); } |