summaryrefslogtreecommitdiffhomepage
path: root/test/loader.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-13 14:58:17 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-13 21:22:32 +0100
commit8f7b089e246b5e55d1cacb756da4219bb751236f (patch)
treeb302742a6cdc70c393c6020bc8e3b4d1bc08d348 /test/loader.cpp
parent9b70fb78e70a509ba5bfa1c1d0a839eddd0902dc (diff)
scenery loader now works
Diffstat (limited to 'test/loader.cpp')
-rw-r--r--test/loader.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/loader.cpp b/test/loader.cpp
index b36ca0ca..4a49b400 100644
--- a/test/loader.cpp
+++ b/test/loader.cpp
@@ -6,6 +6,7 @@
#include "src/ground-atlas.hpp"
#include "src/wall-atlas.hpp"
#include "src/anim-atlas.hpp"
+#include "src/scenery.hpp"
#include <mg/Texture.h>
namespace floormat {
@@ -33,8 +34,14 @@ constexpr const char* anim_atlases[] = {
"anim/npc-walk",
"anim/test-8x8",
"scenery/door-close",
- "scenery/control-panel",
- "scenery/table",
+};
+
+constexpr const char* sceneries[] = {
+ "bench1",
+ "shelf6",
+ "door1",
+ "control panel (wall) 1",
+ "table0",
};
} // namespace
@@ -64,9 +71,14 @@ void test_app::test_loader()
fm_assert(!A.raw_frame_array().isEmpty());
fm_assert(A.texture().id());
}
+ fm_assert(!loader.scenery_list().isEmpty());
+ for (const auto& name : sceneries)
+ {
+ const auto& S = loader.scenery(name);
+ fm_assert(S.atlas);
+ }
fm_assert(loader.ground_atlas("texel")->pass_mode() == pass_mode::blocked);
fm_assert(loader.ground_atlas("metal1")->pass_mode() == pass_mode::pass);
- loader.sceneries();
}
void test_app::test_loader2()