summaryrefslogtreecommitdiff
path: root/application/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-04 17:07:58 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-04 17:07:58 +0000
commit582ac127f763f512c45f35e17b768487e3b51796 (patch)
tree4b67659fd1a0906649c1f83570ab9cbb30194f75 /application/main.cpp
parentReformat test source (diff)
downloadilt-582ac127f763f512c45f35e17b768487e3b51796.tar.bz2
ilt-582ac127f763f512c45f35e17b768487e3b51796.tar.xz
ilt-582ac127f763f512c45f35e17b768487e3b51796.zip
Rename TerrainMesh to GeoData to drop inplace
Diffstat (limited to 'application/main.cpp')
-rw-r--r--application/main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/application/main.cpp b/application/main.cpp
index 532c23d..9e4ca33 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -34,11 +34,11 @@ static const int DISPLAY_HEIGHT = 1024;
class MainApplication : public GameState, public ApplicationBase {
public:
using Windows = Collection<Window>;
+
int
run()
{
- geoData = std::make_shared<GeoData>(GeoData::Limits {{-120, -120}, {120, 120}}, 10.F);
- geoData->generateRandom();
+ geoData = std::make_shared<GeoData>(GeoData::loadFromAsciiGrid("test/fixtures/height/SD19.asc"));
Windows windows;
windows.create<GameMainWindow>(DISPLAY_WIDTH, DISPLAY_HEIGHT);
@@ -78,12 +78,12 @@ public:
train->orders.create<GoTo>(&train->orders, l3->ends[1], l3->length, rl->findNodeAt({-1100, -450, 15}));
train->currentActivity = train->orders.current()->createActivity();
- auto foliage = std::dynamic_pointer_cast<Foliage>(assets.at("Tree-01-1"));
- for (float x = 900; x < 1100; x += 3) {
- for (float y = 900; y < 1100; y += 3) {
- world.create<Plant>(foliage, Location {geoData->positionAt({-x, -y})});
- }
- }
+ // auto foliage = std::dynamic_pointer_cast<Foliage>(assets.at("Tree-01-1"));
+ // for (float x = 900; x < 1100; x += 3) {
+ // for (float y = 900; y < 1100; y += 3) {
+ // world.create<Plant>(foliage, Location {terrainMesh->positionAt(glm::vec2 {-x, -y})});
+ //}
+ //}
}
auto t_start = std::chrono::high_resolution_clock::now();