summaryrefslogtreecommitdiff
path: root/application/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 18:04:00 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 18:04:00 +0000
commitc2421c3ac2018faf5d47205ee979acec181d9672 (patch)
tree53651bfd3e5839c8334862f311466041da5f4d91 /application/main.cpp
parentUse Cache system to persist font rendering for Text (diff)
downloadilt-c2421c3ac2018faf5d47205ee979acec181d9672.tar.bz2
ilt-c2421c3ac2018faf5d47205ee979acec181d9672.tar.xz
ilt-c2421c3ac2018faf5d47205ee979acec181d9672.zip
Separate geographic data (GeoData) from its visual representation(s) (Terrain)
Diffstat (limited to 'application/main.cpp')
-rw-r--r--application/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/application/main.cpp b/application/main.cpp
index 128c9c1..eef0ed0 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -6,6 +6,7 @@
#include <game/activities/idle.h>
#include <game/activity.h>
#include <game/gamestate.h>
+#include <game/geoData.h>
#include <game/network/link.h>
#include <game/network/rail.h>
#include <game/objective.h>
@@ -54,10 +55,13 @@ public:
int
run()
{
+ geoData = std::make_shared<GeoData>(GeoData::Limits {{-120, -120}, {120, 120}}, 10.F);
+ geoData->generateRandom();
+
Windows windows;
windows.create<GameMainWindow>(DISPLAY_WIDTH, DISPLAY_HEIGHT, this);
- world.create<Terrain>();
+ world.create<Terrain>(geoData);
{
auto rl = world.create<RailLinks>();