Retocando la abadía
This commit is contained in:
@@ -100,6 +100,27 @@ void Resource::reLoadTextures()
|
||||
}
|
||||
}
|
||||
|
||||
// Recarga las habitaciones
|
||||
void Resource::reLoadRooms()
|
||||
{
|
||||
for (auto r : rooms)
|
||||
{
|
||||
delete r.room;
|
||||
r.room = new room_t(loadRoomFile(asset->get(r.name)));
|
||||
r.room->tileMap = getTileMap(r.room->tileMapFile);
|
||||
for (auto &e : r.room->enemies)
|
||||
{
|
||||
e.animation = getAnimation(e.animationString);
|
||||
}
|
||||
for (auto &i : r.room->items)
|
||||
{
|
||||
i.texture = getTexture(i.tileSetFile);
|
||||
}
|
||||
r.room->textureA = getTexture("standard.png");
|
||||
r.room->textureB = getTexture("standard_zxarne.png");
|
||||
}
|
||||
}
|
||||
|
||||
// Libera las texturas
|
||||
void Resource::freeTextures()
|
||||
{
|
||||
|
||||
@@ -39,8 +39,8 @@ struct res_tileMap_t
|
||||
|
||||
struct res_room_t
|
||||
{
|
||||
std::string name; // Nombre de la habitación
|
||||
room_t *room; // Vecor con las habitaciones
|
||||
std::string name; // Nombre de la habitación
|
||||
room_t *room; // Vecor con las habitaciones
|
||||
};
|
||||
|
||||
// Clase Resource. Almacena recursos de disco en memoria
|
||||
@@ -81,6 +81,9 @@ public:
|
||||
// Recarga las texturas
|
||||
void reLoadTextures();
|
||||
|
||||
// Recarga las habitaciones
|
||||
void reLoadRooms();
|
||||
|
||||
// Libera las texturas
|
||||
void freeTextures();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user