diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-08-26 13:34:06 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-08-26 13:34:06 +0100 |
commit | f03e11fb38701f278f3c0f465958932044227830 (patch) | |
tree | ee859a9049260a8c943240f2922397ad039f8db8 /test | |
parent | Persist a single ShadowStenciller within ShadowMapper (diff) | |
download | ilt-f03e11fb38701f278f3c0f465958932044227830.tar.bz2 ilt-f03e11fb38701f278f3c0f465958932044227830.tar.xz ilt-f03e11fb38701f278f3c0f465958932044227830.zip |
test-render loads all assets into gameState
Diffstat (limited to 'test')
-rw-r--r-- | test/test-render.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test-render.cpp b/test/test-render.cpp index b9a809e..bb5a137 100644 --- a/test/test-render.cpp +++ b/test/test-render.cpp @@ -7,6 +7,7 @@ #include <boost/test/unit_test.hpp> #include <assetFactory/assetFactory.h> +#include <game/gamestate.h> #include <game/geoData.h> #include <game/network/rail.h> #include <game/scenary/foliage.h> @@ -25,10 +26,8 @@ #include <ui/window.h> class TestScene : public SceneProvider { - const RailVehicleClassPtr brush47rvc = std::dynamic_pointer_cast<RailVehicleClass>( - AssetFactory::loadXML(RESDIR "/brush47.xml")->assets.at("brush-47")); - const std::shared_ptr<Foliage> tree021f - = std::dynamic_pointer_cast<Foliage>(AssetFactory::loadXML(RESDIR "/foliage.xml")->assets.at("Tree-02-1")); + RailVehicleClassPtr brush47rvc; + std::shared_ptr<Foliage> tree021f; std::shared_ptr<RailVehicle> train1, train2; std::shared_ptr<Plant> plant1; RailLinks rail; @@ -40,6 +39,9 @@ class TestScene : public SceneProvider { public: TestScene() { + gameState->assets = AssetFactory::loadAll(RESDIR); + brush47rvc = std::dynamic_pointer_cast<RailVehicleClass>(gameState->assets.at("brush-47")); + tree021f = std::dynamic_pointer_cast<Foliage>(gameState->assets.at("Tree-02-1")); train1 = std::make_shared<RailVehicle>(brush47rvc); train1->location.setPosition({52000, 50000, 2000}); train1->bogies.front().setPosition(train1->bogies.front().position() + train1->location.position()); |