style: organitzada la capçalera de Room

This commit is contained in:
2025-10-29 09:58:49 +01:00
parent cd836862c0
commit 8bf9da5fb6
7 changed files with 453 additions and 542 deletions

View File

@@ -164,7 +164,7 @@ auto Resource::getTileMap(const std::string& name) -> std::vector<int>& {
}
// Obtiene la habitación a partir de un nombre
auto Resource::getRoom(const std::string& name) -> std::shared_ptr<RoomData> {
auto Resource::getRoom(const std::string& name) -> std::shared_ptr<Room::Data> {
auto it = std::ranges::find_if(rooms_, [&name](const auto& r) { return r.name == name; });
if (it != rooms_.end()) {
@@ -278,7 +278,7 @@ void Resource::loadTileMaps() {
for (const auto& l : list) {
auto name = getFileName(l);
tile_maps_.emplace_back(name, loadRoomTileFile(l));
tile_maps_.emplace_back(name, Room::loadRoomTileFile(l));
printWithDots("TileMap : ", name, "[ LOADED ]");
updateLoadingProgress();
}
@@ -292,7 +292,7 @@ void Resource::loadRooms() {
for (const auto& l : list) {
auto name = getFileName(l);
rooms_.emplace_back(name, std::make_shared<RoomData>(loadRoomFile(l)));
rooms_.emplace_back(name, std::make_shared<Room::Data>(Room::loadRoomFile(l)));
printWithDots("Room : ", name, "[ LOADED ]");
updateLoadingProgress();
}
@@ -300,7 +300,7 @@ void Resource::loadRooms() {
void Resource::createText() {
struct ResourceInfo {
std::string key; // Identificador del recurso
std::string key; // Identificador del recurso
std::string texture_file; // Nombre del archivo de textura
std::string text_file; // Nombre del archivo de texto