diff options
author | Nemrav <50055236+Nemrav@users.noreply.github.com> | 2024-08-03 21:38:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-03 21:38:25 +0200 |
commit | adc7eb8ad07170ba8da18f684321a92d01447c2c (patch) | |
tree | eedd074580ff5a81b4eff4b8bc43163b7cf59f0e /src/openvic-simulation/GameManager.cpp | |
parent | 1f42a6255226b79d271df5060a8391f4ea00fc0a (diff) | |
parent | 0b4732befaaf4a742acb319256c535eb449668a7 (diff) |
Merge pull request #181 from OpenVicProject/sim_music
Music and Sound Effect define loading
Diffstat (limited to 'src/openvic-simulation/GameManager.cpp')
-rw-r--r-- | src/openvic-simulation/GameManager.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/openvic-simulation/GameManager.cpp b/src/openvic-simulation/GameManager.cpp index cd810ea..2577b54 100644 --- a/src/openvic-simulation/GameManager.cpp +++ b/src/openvic-simulation/GameManager.cpp @@ -11,9 +11,15 @@ GameManager::GameManager( new_clock_state_changed_callback ? std::move(new_clock_state_changed_callback) : []() {} }, definitions_loaded { false } {} -bool GameManager::load_definitions( - Dataloader::path_vector_t const& roots, Dataloader::localisation_callback_t localisation_callback -) { +bool GameManager::set_roots(Dataloader::path_vector_t const& roots) { + if (!dataloader.set_roots(roots)) { + Logger::error("Failed to set dataloader roots!"); + return false; + } + return true; +} + +bool GameManager::load_definitions(Dataloader::localisation_callback_t localisation_callback) { if (definitions_loaded) { Logger::error("Cannot load definitions - already loaded!"); return false; @@ -21,11 +27,6 @@ bool GameManager::load_definitions( bool ret = true; - if (!dataloader.set_roots(roots)) { - Logger::error("Failed to set dataloader roots!"); - ret = false; - } - if (!dataloader.load_defines(definition_manager)) { Logger::error("Failed to load defines!"); ret = false; |