From ed7e68e58ffdc369dbd6f7ac3fbebe19afeb56a2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 17 Apr 2023 11:57:13 +0100 Subject: Create a large test forest --- application/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'application') diff --git a/application/main.cpp b/application/main.cpp index aea3d2e..a0b2dfd 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -79,7 +79,11 @@ public: train->currentActivity = train->orders.current()->createActivity(); auto foliage = std::dynamic_pointer_cast(assets.at("Tree-01-1")); - world.create(foliage, Location {{-1100, -1100, 0}}); + for (float x = 900; x < 1100; x += 3) { + for (float y = 900; y < 1100; y += 3) { + world.create(foliage, Location {geoData->positionAt({-x, -y})}); + } + } } auto t_start = std::chrono::high_resolution_clock::now(); -- cgit v1.2.3 From f898bdeae6a9f8d6525f73c51996062f8c5e8f57 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 17 Apr 2023 12:26:22 +0100 Subject: Assets moved to global game state --- application/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application') diff --git a/application/main.cpp b/application/main.cpp index a0b2dfd..9feb80b 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -44,9 +44,9 @@ public: windows.create(DISPLAY_WIDTH, DISPLAY_HEIGHT); world.create(geoData); + assets = AssetFactory::loadAll("res"); { - const auto assets = AssetFactory::loadAll("res"); auto rl = world.create(); const glm::vec3 j {-1120, -1100, 3}, k {-1100, -1000, 15}, l {-1000, -800, 20}, m {-900, -600, 30}, n {-600, -500, 32}, o {-500, -800, 30}, p {-600, -900, 25}, q {-1025, -1175, 10}, -- cgit v1.2.3