From 1bbbdfe0d9e9e7a4e42241a2eb596b46ac02c65b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 18 Aug 2024 16:05:05 +0100 Subject: Populate GameState::assets in appropriate tests --- test/test-assetFactory.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/test-assetFactory.cpp') diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp index 1c2c417..0b5b278 100644 --- a/test/test-assetFactory.cpp +++ b/test/test-assetFactory.cpp @@ -97,6 +97,7 @@ BOOST_AUTO_TEST_CASE(brush47xml, *boost::unit_test::timeout(5)) { auto mf = AssetFactory::loadXML(RESDIR "/brush47.xml"); BOOST_REQUIRE(mf); + gameState.assets = mf->assets; BOOST_REQUIRE_GE(mf->shapes.size(), 6); BOOST_CHECK(mf->shapes.at("plane")); BOOST_CHECK(mf->shapes.at("cylinder")); @@ -126,6 +127,7 @@ BOOST_AUTO_TEST_CASE(foliage, *boost::unit_test::timeout(5)) { auto mf = AssetFactory::loadXML(RESDIR "/foliage.xml"); BOOST_REQUIRE(mf); + gameState.assets = mf->assets; auto tree_01_1 = mf->assets.at("Tree-01-1"); BOOST_REQUIRE(tree_01_1); auto tree_01_1_f = std::dynamic_pointer_cast(tree_01_1); @@ -144,6 +146,7 @@ BOOST_AUTO_TEST_CASE(lights, *boost::unit_test::timeout(5)) { auto mf = AssetFactory::loadXML(RESDIR "/lights.xml"); BOOST_REQUIRE(mf); + gameState.assets = mf->assets; auto rlight = mf->assets.at("r-light"); BOOST_REQUIRE(rlight); auto oldlamp = mf->assets.at("old-lamp"); -- cgit v1.2.3 From 10998a8302b3d7651b4afc046311961eb2dea2c8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 6 Oct 2024 12:48:40 +0100 Subject: Use LightDirection for calculating/passing all light dir components --- test/test-assetFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test-assetFactory.cpp') diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp index 0b5b278..6036721 100644 --- a/test/test-assetFactory.cpp +++ b/test/test-assetFactory.cpp @@ -54,7 +54,7 @@ public: environment(const SceneShader &, const SceneRenderer & sceneRenderer) const override { sceneRenderer.setAmbientLight({.4, .4, .4}); - sceneRenderer.setDirectionalLight({.6, .6, .6}, east + south + south + down, *this); + sceneRenderer.setDirectionalLight({.6, .6, .6}, {{0.9, 0.5}}, *this); } void -- cgit v1.2.3