forked from jaildesigner-jailgames/jaildoctors_dilemma
linter
This commit is contained in:
@@ -55,19 +55,19 @@ struct RoomData {
|
||||
};
|
||||
|
||||
// Carga las variables desde un fichero de mapa
|
||||
RoomData loadRoomFile(const std::string& file_path, bool verbose = false);
|
||||
auto loadRoomFile(const std::string& file_path, bool verbose = false) -> RoomData;
|
||||
|
||||
// Carga las variables y texturas desde un fichero de mapa de tiles
|
||||
std::vector<int> loadRoomTileFile(const std::string& file_path, bool verbose = false);
|
||||
auto loadRoomTileFile(const std::string& file_path, bool verbose = false) -> std::vector<int>;
|
||||
|
||||
// Asigna variables a una estructura RoomData
|
||||
bool setRoom(RoomData* room, const std::string& key, const std::string& value);
|
||||
auto setRoom(RoomData* room, const std::string& key, const std::string& value) -> bool;
|
||||
|
||||
// Asigna variables a una estructura EnemyData
|
||||
bool setEnemy(EnemyData* enemy, const std::string& key, const std::string& value);
|
||||
auto setEnemy(EnemyData* enemy, const std::string& key, const std::string& value) -> bool;
|
||||
|
||||
// Asigna variables a una estructura ItemData
|
||||
bool setItem(ItemData* item, const std::string& key, const std::string& value);
|
||||
auto setItem(ItemData* item, const std::string& key, const std::string& value) -> bool;
|
||||
|
||||
class Room {
|
||||
private:
|
||||
@@ -116,13 +116,13 @@ class Room {
|
||||
void fillMapTexture();
|
||||
|
||||
// Helper para recopilar tiles inferiores
|
||||
std::vector<int> collectBottomTiles();
|
||||
auto collectBottomTiles() -> std::vector<int>;
|
||||
|
||||
// Helper para recopilar tiles superiores
|
||||
std::vector<int> collectTopTiles();
|
||||
auto collectTopTiles() -> std::vector<int>;
|
||||
|
||||
// Helper para recopilar tiles animados (para superficies automaticas)
|
||||
std::vector<int> collectAnimatedTiles();
|
||||
auto collectAnimatedTiles() -> std::vector<int>;
|
||||
|
||||
// Helper para construir lineas horizontales a partir de tiles consecutivos
|
||||
static void buildHorizontalLines(const std::vector<int>& tiles, std::vector<LineHorizontal>& lines, bool is_bottom_surface);
|
||||
@@ -158,7 +158,7 @@ class Room {
|
||||
void renderAnimatedTiles();
|
||||
|
||||
// Devuelve el tipo de tile que hay en ese indice
|
||||
TileType getTile(int index);
|
||||
auto getTile(int index) -> TileType;
|
||||
|
||||
// Abre la jail para poder entrar
|
||||
void openTheJail();
|
||||
@@ -174,13 +174,13 @@ class Room {
|
||||
~Room() = default;
|
||||
|
||||
// Devuelve el nombre de la habitación
|
||||
const std::string& getName() const { return name_; }
|
||||
[[nodiscard]] auto getName() const -> const std::string& { return name_; }
|
||||
|
||||
// Devuelve el color de la habitación
|
||||
Uint8 getBGColor() const { return stringToColor(bg_color_); }
|
||||
[[nodiscard]] auto getBGColor() const -> Uint8 { return stringToColor(bg_color_); }
|
||||
|
||||
// Devuelve el color del borde
|
||||
Uint8 getBorderColor() const { return stringToColor(border_color_); }
|
||||
[[nodiscard]] auto getBorderColor() const -> Uint8 { return stringToColor(border_color_); }
|
||||
|
||||
// Dibuja el mapa en pantalla
|
||||
void renderMap();
|
||||
@@ -195,59 +195,59 @@ class Room {
|
||||
void update();
|
||||
|
||||
// Devuelve la cadena del fichero de la habitación contigua segun el borde
|
||||
std::string getRoom(RoomBorder border);
|
||||
auto getRoom(RoomBorder border) -> std::string;
|
||||
|
||||
// Devuelve el tipo de tile que hay en ese pixel
|
||||
TileType getTile(SDL_FPoint point);
|
||||
auto getTile(SDL_FPoint point) -> TileType;
|
||||
|
||||
// Indica si hay colision con un enemigo a partir de un rectangulo
|
||||
bool enemyCollision(SDL_FRect& rect);
|
||||
auto enemyCollision(SDL_FRect& rect) -> bool;
|
||||
|
||||
// Indica si hay colision con un objeto a partir de un rectangulo
|
||||
bool itemCollision(SDL_FRect& rect);
|
||||
auto itemCollision(SDL_FRect& rect) -> bool;
|
||||
|
||||
// Obten el tamaño del tile
|
||||
static int getTileSize() { return TILE_SIZE; }
|
||||
static auto getTileSize() -> int { return TILE_SIZE; }
|
||||
|
||||
// Obten la coordenada de la cuesta a partir de un punto perteneciente a ese tile
|
||||
static int getSlopeHeight(SDL_FPoint p, TileType slope);
|
||||
static auto getSlopeHeight(SDL_FPoint p, TileType slope) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkRightSurfaces(SDL_FRect* rect);
|
||||
auto checkRightSurfaces(SDL_FRect* rect) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkLeftSurfaces(SDL_FRect* rect);
|
||||
auto checkLeftSurfaces(SDL_FRect* rect) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkTopSurfaces(SDL_FRect* rect);
|
||||
auto checkTopSurfaces(SDL_FRect* rect) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkBottomSurfaces(SDL_FRect* rect);
|
||||
auto checkBottomSurfaces(SDL_FRect* rect) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkAutoSurfaces(SDL_FRect* rect);
|
||||
auto checkAutoSurfaces(SDL_FRect* rect) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
bool checkTopSurfaces(SDL_FPoint* p);
|
||||
auto checkTopSurfaces(SDL_FPoint* p) -> bool;
|
||||
|
||||
// Comprueba las colisiones
|
||||
bool checkAutoSurfaces(SDL_FPoint* p);
|
||||
auto checkAutoSurfaces(SDL_FPoint* p) -> bool;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkLeftSlopes(const LineVertical* line);
|
||||
auto checkLeftSlopes(const LineVertical* line) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
bool checkLeftSlopes(SDL_FPoint* p);
|
||||
auto checkLeftSlopes(SDL_FPoint* p) -> bool;
|
||||
|
||||
// Comprueba las colisiones
|
||||
int checkRightSlopes(const LineVertical* line);
|
||||
auto checkRightSlopes(const LineVertical* line) -> int;
|
||||
|
||||
// Comprueba las colisiones
|
||||
bool checkRightSlopes(SDL_FPoint* p);
|
||||
auto checkRightSlopes(SDL_FPoint* p) -> bool;
|
||||
|
||||
// Pone el mapa en modo pausa
|
||||
void setPaused(bool value) { is_paused_ = value; };
|
||||
|
||||
// Obten la direccion de las superficies automaticas
|
||||
int getAutoSurfaceDirection() const { return conveyor_belt_direction_; }
|
||||
[[nodiscard]] auto getAutoSurfaceDirection() const -> int { return conveyor_belt_direction_; }
|
||||
};
|
||||
Reference in New Issue
Block a user