aboutsummaryrefslogtreecommitdiff
path: root/src/example/asset_manager.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 14:33:12 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 14:33:12 +0100
commit68bf20b491b4b7673c2ece7a6497b9faffd44eb1 (patch)
treeec0aa56081bc744b595f1665f048c4d26242884f /src/example/asset_manager.cpp
parentf64b793ad8e796458c8e175f298e8d13eb3b3459 (diff)
parent78c4a8772526f40c531b5402b56932b0a41e22e8 (diff)
feedback but error after conflict
Diffstat (limited to 'src/example/asset_manager.cpp')
-rw-r--r--src/example/asset_manager.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/example/asset_manager.cpp b/src/example/asset_manager.cpp
deleted file mode 100644
index 917b547..0000000
--- a/src/example/asset_manager.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <crepe/api/AssetManager.h>
-#include <crepe/api/Texture.h>
-#include <crepe/facade/Sound.h>
-
-using namespace crepe;
-
-int main() {
-
- // this needs to be called before the asset manager otherwise the destructor of sdl is not in
- // the right order
- { Texture test("../asset/texture/img.png"); }
- // FIXME: make it so the issue described by the above comment is not possible (i.e. the order
- // in which internal classes are instantiated should not impact the way the engine works).
-
- auto & mgr = AssetManager::get_instance();
-
- {
- // TODO: [design] the Sound class can't be directly included by the user as it includes
- // SoLoud headers.
- auto bgm = mgr.cache<Sound>("../mwe/audio/bgm.ogg");
- auto sfx1 = mgr.cache<Sound>("../mwe/audio/sfx1.wav");
- auto sfx2 = mgr.cache<Sound>("../mwe/audio/sfx2.wav");
-
- auto img = mgr.cache<Texture>("../asset/texture/img.png");
- auto img1 = mgr.cache<Texture>("../asset/texture/second.png");
- }
-
- {
- auto bgm = mgr.cache<Sound>("../mwe/audio/bgm.ogg");
- auto sfx1 = mgr.cache<Sound>("../mwe/audio/sfx1.wav");
- auto sfx2 = mgr.cache<Sound>("../mwe/audio/sfx2.wav");
-
- auto img = mgr.cache<Texture>("../asset/texture/img.png");
- auto img1 = mgr.cache<Texture>("../asset/texture/second.png");
- }
-}