summaryrefslogtreecommitdiffhomepage
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/main.cpp b/main.cpp
index c21aa0d..2116582 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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();
}