neteja cppcheck: inicialitza Menu::h_, renomena macro PAUSE a DEBUG_PAUSE, const*

This commit is contained in:
2026-05-16 18:27:48 +02:00
parent be95b8afab
commit 37cb3c782a
9 changed files with 143 additions and 180 deletions
-1
View File
@@ -3,7 +3,6 @@
#include <cmath> // Para std::lround
#include <cstdint> // Para int8_t, uint8_t
#include <string> // Para string
#include <utility> // Para move
namespace Ja {
struct Music;
+3 -4
View File
@@ -164,10 +164,9 @@ auto Input::checkAnyInput(int device, int index) -> bool {
if (device == INPUT_USE_KEYBOARD || device == INPUT_USE_ANY) {
const bool *key_states = SDL_GetKeyboardState(nullptr);
for (auto &key_binding : key_bindings_) {
if (key_states[key_binding.scancode]) {
return true;
}
if (std::any_of(key_bindings_.begin(), key_bindings_.end(),
[key_states](const auto &key_binding) { return key_states[key_binding.scancode]; })) {
return true;
}
}
+1 -1
View File
@@ -159,7 +159,7 @@ void Texture::setAlpha(Uint8 alpha) {
}
// Renderiza la textura en un punto específico
void Texture::render(SDL_Renderer *renderer, int x, int y, SDL_Rect *clip, float zoom_w, float zoom_h, double angle, SDL_Point *center, SDL_FlipMode flip) {
void Texture::render(SDL_Renderer *renderer, int x, int y, const SDL_Rect *clip, float zoom_w, float zoom_h, double angle, const SDL_Point *center, SDL_FlipMode flip) {
// Establece el destino de renderizado en la pantalla
SDL_FRect render_quad = {(float)x, (float)y, (float)width_, (float)height_};
+1 -1
View File
@@ -25,7 +25,7 @@ class Texture {
void setBlendMode(SDL_BlendMode blending); // Establece el blending
void setAlpha(Uint8 alpha); // Establece el alpha para la modulación
void render(SDL_Renderer *renderer, int x, int y, SDL_Rect *clip = nullptr, float zoom_w = 1, float zoom_h = 1, double angle = 0.0, SDL_Point *center = nullptr, SDL_FlipMode flip = SDL_FLIP_NONE); // Renderiza la textura en un punto específico
void render(SDL_Renderer *renderer, int x, int y, const SDL_Rect *clip = nullptr, float zoom_w = 1, float zoom_h = 1, double angle = 0.0, const SDL_Point *center = nullptr, SDL_FlipMode flip = SDL_FLIP_NONE); // Renderiza la textura en un punto específico
void setAsRenderTarget(SDL_Renderer *renderer); // Establece la textura como objetivo de renderizado
[[nodiscard]] auto getWidth() const -> int; // Obtiene el ancho de la imagen