diff --git a/source/resource.cpp b/source/resource.cpp index de7b968..645681a 100644 --- a/source/resource.cpp +++ b/source/resource.cpp @@ -192,9 +192,9 @@ void Resource::loadSounds() for (const auto &l : list) { auto name = getFileName(l); + updateLoadingProgress(name); sounds_.emplace_back(Resource::ResourceSound(name, JA_LoadSound(l.c_str()))); printWithDots("Sound : ", name, "[ LOADED ]"); - updateLoadingProgress(name); } } @@ -208,9 +208,9 @@ void Resource::loadMusics() for (const auto &l : list) { auto name = getFileName(l); + updateLoadingProgress(name); musics_.emplace_back(Resource::ResourceMusic(name, JA_LoadMusic(l.c_str()))); printWithDots("Music : ", name, "[ LOADED ]"); - updateLoadingProgress(name); } } @@ -224,8 +224,8 @@ void Resource::loadTextures() for (const auto &l : list) { auto name = getFileName(l); - textures_.emplace_back(Resource::ResourceTexture(name, std::make_shared(Screen::get()->getRenderer(), l))); updateLoadingProgress(name); + textures_.emplace_back(Resource::ResourceTexture(name, std::make_shared(Screen::get()->getRenderer(), l))); } } @@ -239,8 +239,8 @@ void Resource::loadTextFiles() for (const auto &l : list) { auto name = getFileName(l); - text_files_.emplace_back(Resource::ResourceTextFile(name, loadTextFile(l))); updateLoadingProgress(name); + text_files_.emplace_back(Resource::ResourceTextFile(name, loadTextFile(l))); } } @@ -254,8 +254,8 @@ void Resource::loadAnimations() for (const auto &l : list) { auto name = getFileName(l); - animations_.emplace_back(Resource::ResourceAnimation(name, loadAnimationsFromFile(l))); updateLoadingProgress(name); + animations_.emplace_back(Resource::ResourceAnimation(name, loadAnimationsFromFile(l))); } } @@ -268,8 +268,8 @@ void Resource::loadDemoData() for (const auto &file : demo_files) { - demos_.emplace_back(loadDemoDataFromFile(Asset::get()->get(file))); updateLoadingProgress(file); + demos_.emplace_back(loadDemoDataFromFile(Asset::get()->get(file))); } }