fix: minimap sempre tirava a gastar standard.gif
This commit is contained in:
@@ -49,7 +49,14 @@ class MiniMap {
|
||||
GridPos pos; // Posición en el grid
|
||||
};
|
||||
|
||||
void buildTileColorTable(const std::string& tileset_name);
|
||||
// Tabla de color predominante para un tileset concreto
|
||||
struct TileColorTable {
|
||||
std::vector<Uint8> colors; // tile_index → palette color
|
||||
int tileset_width{0}; // Ancho del tileset en tiles
|
||||
Uint8 transparent{16}; // Color transparente del tileset
|
||||
};
|
||||
|
||||
auto getOrBuildTileColorTable(const std::string& tileset_name) -> const TileColorTable&;
|
||||
void buildRoomSurfaces();
|
||||
void layoutRooms();
|
||||
void composeFinalSurface();
|
||||
@@ -59,10 +66,8 @@ class MiniMap {
|
||||
auto cellPixelX(int grid_x) const -> int { return PADDING + ((grid_x - min_grid_x_) * (CELL_W + GAP)); }
|
||||
auto cellPixelY(int grid_y) const -> int { return PADDING + ((grid_y - min_grid_y_) * (CELL_H + GAP)); }
|
||||
|
||||
// Tabla de color predominante por tile index
|
||||
std::vector<Uint8> tile_colors_; // tile_index → palette color index
|
||||
int tileset_width_{0}; // Ancho del tileset en tiles
|
||||
Uint8 tileset_transparent_{16}; // Color transparente del tileset
|
||||
// Caché de tablas de color por tileset (clave: nombre del fichero del tileset)
|
||||
std::unordered_map<std::string, TileColorTable> tileset_tables_;
|
||||
|
||||
// Rooms renderizadas y posicionadas
|
||||
std::unordered_map<std::string, RoomMini> room_positions_;
|
||||
|
||||
Reference in New Issue
Block a user