#include #include #include using namespace crepe; using namespace crepe::api; 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"); } auto & mgr = AssetManager::get_instance(); { auto bgm = mgr.cache("../mwe/audio/bgm.ogg"); auto sfx1 = mgr.cache("../mwe/audio/sfx1.wav"); auto sfx2 = mgr.cache("../mwe/audio/sfx2.wav"); auto img = mgr.cache("../asset/texture/img.png"); auto img1 = mgr.cache("../asset/texture/second.png"); } { auto bgm = mgr.cache("../mwe/audio/bgm.ogg"); auto sfx1 = mgr.cache("../mwe/audio/sfx1.wav"); auto sfx2 = mgr.cache("../mwe/audio/sfx2.wav"); auto img = mgr.cache("../asset/texture/img.png"); auto img1 = mgr.cache("../asset/texture/second.png"); } }