From fccc27fca03a500d49479595b07b6ce0bc7b0133 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 6 Apr 2026 15:17:19 +0200 Subject: [PATCH] developers, developers! --- data/player/player.gif | Bin 428 -> 583 bytes data/player/player.yaml | 4 ++-- data/room/01.yaml | 24 +++++++++++----------- data/room/02.yaml | 22 ++++++++++---------- data/room/03.yaml | 2 +- source/game/entities/player.cpp | 35 ++++++++++++++++++++++---------- source/game/entities/player.hpp | 9 ++++---- source/game/gameplay/room.cpp | 21 ------------------- source/game/gameplay/room.hpp | 1 - source/game/scenes/game.cpp | 4 ---- 10 files changed, 55 insertions(+), 67 deletions(-) diff --git a/data/player/player.gif b/data/player/player.gif index faf4c8e79c60fc162f01f60636a01a2dfcfb3bc0..f9b5306a5a629d5479c574e5e2e6f81cbd55486c 100644 GIT binary patch delta 366 zcmV-!0g?W!1IGjjM@dFFH(@*g7?BC&e>?yf000L6K!6ZXC>DoEqOp)v8k@o;GbwFK zr_?I)3gvFK!=i8O>lVo6FWS6TldWf8U<@D6)6w|7E~kg}et&3qf^B(&d~bz{i-e6? zhHim}j9ZmdmrvFit2b|-DUAj zHd({TAOW(H}9(%zBF?y>7huvv7`{)+d0rxyv=;?cuet$=SfPRI2gMosIi;8@X z0E~}*SB#C6lZJSKR6dkfo}8ece4!p)Q>3Y+vdsBF5=@t?c?O(;_~qG M@$>fZN&rCsJI}*xYybcN diff --git a/data/player/player.yaml b/data/player/player.yaml index 76959a6..4a7051c 100644 --- a/data/player/player.yaml +++ b/data/player/player.yaml @@ -1,7 +1,7 @@ # player animation tileSetFile: player.gif -frameWidth: 8 -frameHeight: 16 +frameWidth: 12 +frameHeight: 24 animations: - name: stand diff --git a/data/room/01.yaml b/data/room/01.yaml index c0b47e9..4e1ea18 100644 --- a/data/room/01.yaml +++ b/data/room/01.yaml @@ -25,22 +25,22 @@ tilemap: - [210, 180, 210, 212, 210, 180, 210, 211, 212, 210, 180, 210, 210, 211, 210, 212, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42] - [163, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 163, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42] - [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42] - - [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33] - - [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 33, 33, 33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 33, 33] - - [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 33] - - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33] - - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33] - - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33] - - [33, 33, 33, 33, 33, 33, 33, 33, 33, -1, -1, -1, -1, -1, -1, -1, 33, 137, 138, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33] - - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33] - - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33] - - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 33, 33, 33, 33, 33] - - [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 545, -1, -1, -1, -1, -1, 33, 33, 33, 33, 33, 33] + - [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264] + - [24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [7, 7, 7, 7, 7, 7, 7, 7, 8, -1, -1, -1, -1, -1, -1, -1, 116, 137, 138, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + - [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 545, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] - [26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 545, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] - [26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 545, -1, -1, -1, -1, -1, -1, -1, -1, -1] - [26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 303, 303, -1, -1, -1, -1, -1, -1, -1] - [26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] - - [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26] + - [51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] # Enemigos en esta habitación enemies: diff --git a/data/room/02.yaml b/data/room/02.yaml index f96f72d..a11f74a 100644 --- a/data/room/02.yaml +++ b/data/room/02.yaml @@ -20,19 +20,19 @@ room: # Tilemap: 21 filas x 32 columnas @ 8px/tile # Índices de tiles (-1 = vacío) tilemap: - - [191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 42, 42, 42, 42, 42] - - [42, 165, 165, 166, 167, 165, 184, 166, 165, 184, 165, 165, 167, 165, 165, 166, 165, 165, 184, 165, 165, 165, 184, 166, 165, 165, 165, 184, 24, 24, 24, 24] + - [191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 48, 5, 25, 25, 25] + - [42, 165, 165, 166, 167, 165, 184, 166, 165, 184, 165, 165, 167, 165, 165, 166, 165, 165, 184, 165, 165, 165, 184, 166, 165, 165, 165, 184, 48, 49, 49, 49] - [42, 42, 210, 211, 211, 210, 180, 210, 212, 210, 180, 210, 211, 212, 210, 180, 210, 210, 210, 210, 211, 212, 210, 180, 210, 212, 180, 210, -1, -1, -1, -1] - [42, 42, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] - - [42, 42, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 24, 24, 24] - - [33, 33, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 24, 24] - - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 302, 24, 24] - - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 24] - - [33, 33, -1, 412, 412, 412, 412, -1, -1, -1, -1, 412, 303, 412, 412, 412, -1, -1, -1, -1, 412, 303, 412, 412, 412, 412, 303, -1, -1, -1, 24, 24] - - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 24] - - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 410, 24, 24] - - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 24] - - [33, 33, 412, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 410, 24, 24] + - [42, 42, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6, 1, 1, 1] + - [33, 33, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 5, 25] + - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 302, 24, 25] + - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25] + - [33, 33, -1, 412, 412, 412, 412, -1, -1, -1, -1, 412, 303, 412, 412, 412, -1, -1, -1, -1, 412, 303, 412, 412, 412, 412, 303, -1, -1, -1, 24, 25] + - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25] + - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 410, 24, 25] + - [33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25] + - [33, 33, 412, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 410, 48, 49] - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] diff --git a/data/room/03.yaml b/data/room/03.yaml index 83f45f9..3366bf7 100644 --- a/data/room/03.yaml +++ b/data/room/03.yaml @@ -1,6 +1,6 @@ room: bgColor: 0 - border: 1 + border: 0 tileSetFile: standard.gif # Conexiones de la habitación (null = sin conexión) diff --git a/source/game/entities/player.cpp b/source/game/entities/player.cpp index 67d55fb..e6307df 100644 --- a/source/game/entities/player.cpp +++ b/source/game/entities/player.cpp @@ -64,7 +64,9 @@ void Player::handleInput() { wanna_go_ = Direction::NONE; } - wanna_jump_ = Input::get()->checkAction(InputAction::JUMP); + const bool JUMP_PRESSED = Input::get()->checkAction(InputAction::JUMP); + wanna_jump_ = JUMP_PRESSED && !jump_held_; // Solo en el flanco de pulsación + jump_held_ = JUMP_PRESSED; wanna_down_ = Input::get()->checkAction(InputAction::DOWN); } @@ -416,7 +418,7 @@ void Player::switchBorders() { void Player::applyGravity(float delta_time) { if (state_ == State::ON_AIR) { // Si está subiendo y ha soltado el botón de salto, gravedad aumentada para cortar el salto - const float GRAVITY = (vy_ < 0.0F && !wanna_jump_) + const float GRAVITY = (vy_ < 0.0F && !jump_held_) ? GRAVITY_FORCE * LOW_JUMP_GRAVITY_MULT : GRAVITY_FORCE; vy_ += GRAVITY * delta_time; @@ -582,15 +584,26 @@ void Player::setColor(Uint8 color) { // Actualiza los puntos de colisión void Player::updateColliderPoints() { - const SDL_FRect RECT = getRect(); - collider_points_[0] = {.x = RECT.x, .y = RECT.y}; - collider_points_[1] = {.x = RECT.x + 7, .y = RECT.y}; - collider_points_[2] = {.x = RECT.x + 7, .y = RECT.y + 7}; - collider_points_[3] = {.x = RECT.x, .y = RECT.y + 7}; - collider_points_[4] = {.x = RECT.x, .y = RECT.y + 8}; - collider_points_[5] = {.x = RECT.x + 7, .y = RECT.y + 8}; - collider_points_[6] = {.x = RECT.x + 7, .y = RECT.y + 15}; - collider_points_[7] = {.x = RECT.x, .y = RECT.y + 15}; + // 3 columnas × 4 filas: garantiza que cada tile de 8×8 que solape el jugador tenga al menos un punto + const float L = x_; + const float M = x_ + (WIDTH / 2); + const float R = x_ + WIDTH - 1; + const float Y0 = y_; + const float Y1 = y_ + 8; + const float Y2 = y_ + 16; + const float Y3 = y_ + HEIGHT - 1; + collider_points_[0] = {.x = L, .y = Y0}; + collider_points_[1] = {.x = M, .y = Y0}; + collider_points_[2] = {.x = R, .y = Y0}; + collider_points_[3] = {.x = L, .y = Y1}; + collider_points_[4] = {.x = M, .y = Y1}; + collider_points_[5] = {.x = R, .y = Y1}; + collider_points_[6] = {.x = L, .y = Y2}; + collider_points_[7] = {.x = M, .y = Y2}; + collider_points_[8] = {.x = R, .y = Y2}; + collider_points_[9] = {.x = L, .y = Y3}; + collider_points_[10] = {.x = M, .y = Y3}; + collider_points_[11] = {.x = R, .y = Y3}; } // Actualiza los puntos de los pies diff --git a/source/game/entities/player.hpp b/source/game/entities/player.hpp index df5af8b..44db7c1 100644 --- a/source/game/entities/player.hpp +++ b/source/game/entities/player.hpp @@ -36,7 +36,7 @@ class Player { static constexpr float HORIZONTAL_VELOCITY = 60.0F; // Velocidad horizontal objetivo en pixels/segundo static constexpr float HORIZONTAL_ACCEL = 500.0F; // Aceleración/deceleración horizontal en pixels/segundo² (inercia ligera) static constexpr float MAX_VY = 160.0F; // Velocidad vertical máxima en pixels/segundo - static constexpr float JUMP_VELOCITY = -140.0F; // Velocidad inicial del salto en pixels/segundo + static constexpr float JUMP_VELOCITY = -170.0F; // Velocidad inicial del salto en pixels/segundo static constexpr float GRAVITY_FORCE = 360.0F; // Fuerza de gravedad en pixels/segundo² static constexpr float LOW_JUMP_GRAVITY_MULT = 3.0F; // Multiplicador de gravedad al soltar el botón de salto (salto variable) @@ -87,8 +87,8 @@ class Player { private: // --- Constantes --- - static constexpr int WIDTH = 8; // Ancho del jugador - static constexpr int HEIGHT = 16; // ALto del jugador + static constexpr int WIDTH = 12; // Ancho del jugador + static constexpr int HEIGHT = 24; // Alto del jugador static constexpr int MAX_FALLING_HEIGHT = Tile::SIZE * 4; // Altura maxima permitida de caída en pixels // --- Objetos y punteros --- @@ -105,6 +105,7 @@ class Player { Direction wanna_go_ = Direction::NONE; bool wanna_jump_ = false; bool wanna_down_ = false; + bool jump_held_ = false; // true mientras la tecla de salto esté pulsada (para detectar flanco) // --- Variables de estado --- State state_ = State::ON_GROUND; // Estado en el que se encuentra el jugador. Util apara saber si está saltando o cayendo @@ -112,7 +113,7 @@ class Player { // --- Variables de colisión --- SDL_FRect collider_box_{}; // Caja de colisión con los enemigos u objetos - std::array collider_points_{}; // Puntos de colisión con el mapa + std::array collider_points_{}; // Puntos de colisión con el mapa (3 columnas × 4 filas, gap ≤ 8px) SDL_FPoint under_left_foot_ = {.x = 0.0F, .y = 0.0F}; // El punto bajo la esquina inferior izquierda del jugador SDL_FPoint under_right_foot_ = {.x = 0.0F, .y = 0.0F}; // El punto bajo la esquina inferior derecha del jugador const LineDiagonal* current_slope_{nullptr}; // Rampa actual sobe la que está el jugador diff --git a/source/game/gameplay/room.cpp b/source/game/gameplay/room.cpp index 702c41b..7cc5985 100644 --- a/source/game/gameplay/room.cpp +++ b/source/game/gameplay/room.cpp @@ -26,8 +26,6 @@ Room::Room(const std::string& room_path, std::shared_ptr data) item_manager_ = std::make_unique(room->number, data_); initializeRoom(*room); - openTheJail(); // Abre la Jail si se da el caso - // Crea el mapa de colisiones (necesita tile_map_, tile_set_width_, conveyor_belt_direction_) collision_map_ = std::make_unique(tile_map_, tile_set_width_, conveyor_belt_direction_); @@ -80,25 +78,6 @@ void Room::initializeRoom(const Data& room) { } } -// Abre la jail para poder entrar -void Room::openTheJail() { // NOLINT(readability-convert-member-functions-to-static) - if (data_->jail_is_open && number_ == Defaults::Game::Room::END_ROOM) { - // Elimina el último enemigo (Bry debe ser el último enemigo definido en el fichero) - if (!enemy_manager_->isEmpty()) { - enemy_manager_->removeLastEnemy(); - } - - // Abre las puertas - constexpr int TILE_A = 16 + (13 * 32); - constexpr int TILE_B = 16 + (14 * 32); - if (TILE_A < tile_map_.size()) { - tile_map_[TILE_A] = -1; - } - if (TILE_B < tile_map_.size()) { - tile_map_[TILE_B] = -1; - } - } -} // Dibuja el mapa en pantalla void Room::renderMap() { diff --git a/source/game/gameplay/room.hpp b/source/game/gameplay/room.hpp index 23123c7..1a2d773 100644 --- a/source/game/gameplay/room.hpp +++ b/source/game/gameplay/room.hpp @@ -137,5 +137,4 @@ class Room { // --- Funciones --- void initializeRoom(const Data& room); // Inicializa los valores - void openTheJail(); // Abre la jail para poder entrar }; \ No newline at end of file diff --git a/source/game/scenes/game.cpp b/source/game/scenes/game.cpp index d78d42f..abff60a 100644 --- a/source/game/scenes/game.cpp +++ b/source/game/scenes/game.cpp @@ -598,10 +598,6 @@ void Game::handleDebugEvents(const SDL_Event& event) { // NOLINT(readability-co player_->setColor(); break; - case SDLK_3: - toggleCheat(Options::cheats.jail_is_open, Locale::get()->get("game.cheat_jail_open")); // NOLINT(readability-static-accessed-through-instance) - break; - case SDLK_7: Notifier::get()->show({Locale::get()->get("achievements.header"), Locale::get()->get("achievements.c11")}, Notifier::Style::CHEEVO, -1, false, "F7"); // NOLINT(readability-static-accessed-through-instance) break;