Merge pull request #186 from AnonymusRaccoon/safe_resource_loading

when a resource is not found, an exceptions is thrown
This commit is contained in:
Arthi-chaud
2021-06-17 12:19:29 +02:00
committed by GitHub
10 changed files with 67 additions and 16 deletions
+2 -8
View File
@@ -148,13 +148,7 @@ namespace BBM
Runner::enableRaylib(wal);
Runner::loadScenes();
wal.changeScene(Runner::gameState._loadedScenes[GameState::SceneID::SplashScreen]);
try {
wal.run<GameState>(Runner::updateState, Runner::gameState);
return 0;
} catch (const std::exception &ex) {
std::cerr << ex.what() << std::endl;
return 1;
}
wal.run<GameState>(Runner::updateState, Runner::gameState);
return 0;
}
}