forked from jaildesigner-jailgames/jaildoctors_dilemma
migrats els fitxers .room i .tmx a .yaml unificats
This commit is contained in:
@@ -54,9 +54,8 @@ void Room::initializeRoom(const Data& room) {
|
||||
left_room_ = room.left_room;
|
||||
right_room_ = room.right_room;
|
||||
tile_set_file_ = room.tile_set_file;
|
||||
tile_map_file_ = room.tile_map_file;
|
||||
conveyor_belt_direction_ = room.conveyor_belt_direction;
|
||||
tile_map_ = Resource::Cache::get()->getTileMap(room.tile_map_file);
|
||||
tile_map_ = room.tile_map; // Tilemap viene embebido en el YAML
|
||||
surface_ = Resource::Cache::get()->getSurface(room.tile_set_file);
|
||||
tile_set_width_ = surface_->getWidth() / TILE_SIZE;
|
||||
is_paused_ = false;
|
||||
@@ -257,12 +256,7 @@ auto Room::getSlopeAtPoint(const SDL_FPoint& p) const -> const LineDiagonal* {
|
||||
return collision_map_->getSlopeAtPoint(p);
|
||||
}
|
||||
|
||||
// Carga las variables desde un fichero de mapa (delegado a RoomLoader)
|
||||
auto Room::loadRoomFile(const std::string& file_path, bool verbose) -> Data {
|
||||
return RoomLoader::loadRoomFile(file_path, verbose);
|
||||
}
|
||||
|
||||
// Carga las variables y texturas desde un fichero de mapa de tiles (delegado a RoomLoader)
|
||||
auto Room::loadRoomTileFile(const std::string& file_path, bool verbose) -> std::vector<int> {
|
||||
return RoomLoader::loadRoomTileFile(file_path, verbose);
|
||||
// Carga una habitación desde un archivo YAML (delegado a RoomLoader)
|
||||
auto Room::loadYAML(const std::string& file_path, bool verbose) -> Data {
|
||||
return RoomLoader::loadYAML(file_path, verbose);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user