millorat printWithDots() i Resource::List per a calcular el nom de fitxer mes llarg correctament
This commit is contained in:
@@ -212,7 +212,7 @@ void Cache::loadSounds() {
|
||||
}
|
||||
|
||||
sounds_.emplace_back(SoundResource{.name = name, .sound = sound});
|
||||
printWithDots("Sound : ", name, "[ LOADED ]");
|
||||
printWithDots("Sound : ", name, "[ LOADED ]", List::get()->getPrintWidth());
|
||||
updateLoadingProgress();
|
||||
} catch (const std::exception& e) {
|
||||
throwLoadError("SOUND", l, e);
|
||||
@@ -247,7 +247,7 @@ void Cache::loadMusics() {
|
||||
}
|
||||
|
||||
musics_.emplace_back(MusicResource{.name = name, .music = music});
|
||||
printWithDots("Music : ", name, "[ LOADED ]");
|
||||
printWithDots("Music : ", name, "[ LOADED ]", List::get()->getPrintWidth());
|
||||
updateLoadingProgress(1);
|
||||
} catch (const std::exception& e) {
|
||||
throwLoadError("MUSIC", l, e);
|
||||
@@ -325,7 +325,7 @@ void Cache::loadAnimations() {
|
||||
}
|
||||
|
||||
animations_.emplace_back(AnimationResource{.name = name, .yaml_data = yaml_bytes});
|
||||
printWithDots("Animation : ", name, "[ LOADED ]");
|
||||
printWithDots("Animation : ", name, "[ LOADED ]", List::get()->getPrintWidth());
|
||||
updateLoadingProgress();
|
||||
} catch (const std::exception& e) {
|
||||
throwLoadError("ANIMATION", l, e);
|
||||
@@ -343,7 +343,7 @@ void Cache::loadRooms() {
|
||||
try {
|
||||
auto name = getFileName(l);
|
||||
rooms_.emplace_back(RoomResource{.name = name, .room = std::make_shared<Room::Data>(Room::loadYAML(l))});
|
||||
printWithDots("Room : ", name, "[ LOADED ]");
|
||||
printWithDots("Room : ", name, "[ LOADED ]", List::get()->getPrintWidth());
|
||||
updateLoadingProgress();
|
||||
} catch (const std::exception& e) {
|
||||
throwLoadError("ROOM", l, e);
|
||||
@@ -369,7 +369,7 @@ void Cache::createText() {
|
||||
|
||||
for (const auto& res_info : resources) {
|
||||
texts_.emplace_back(TextResource{.name = res_info.key, .text = std::make_shared<Text>(getSurface(res_info.texture_file), getTextFile(res_info.text_file))});
|
||||
printWithDots("Text : ", res_info.key, "[ DONE ]");
|
||||
printWithDots("Text : ", res_info.key, "[ DONE ]", List::get()->getPrintWidth());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user