From 8f1511998cf756d4f3e7c77c3d9cb8b8685b7be3 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Wed, 2 Jul 2025 18:43:52 +0200 Subject: [PATCH] =?UTF-8?q?fix=20Resource:=20la=20barra=20de=20progres=20m?= =?UTF-8?q?ostrava=20com=20a=20carregant=20el=20nom=20del=20recurs=20que?= =?UTF-8?q?=20ja=20s'havia=20carregat=20en=20lloc=20del=20que=20realment?= =?UTF-8?q?=20est=C3=A0=20carregant-se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/resource.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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))); } }