posat orden en defaults i defines

This commit is contained in:
2025-11-21 09:30:33 +01:00
parent 0fb986d7c4
commit 6bf26f7470
18 changed files with 307 additions and 297 deletions

View File

@@ -16,7 +16,7 @@
#include "core/system/global_events.hpp" // Para check
#include "game/options.hpp" // Para Options, options, OptionsGame, Sectio...
#include "game/scene_manager.hpp" // Para SceneManager
#include "utils/defines.hpp" // Para GAMECANVAS_CENTER_X, GAMECANVAS_CENTER_Y
#include "utils/defines.hpp" // Para GameCanvas::CENTER_X, GameCanvas::CENTER_Y
#include "utils/delta_timer.hpp" // Para DeltaTimer
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
@@ -153,7 +153,7 @@ void Ending2::updateState(float delta_time) {
break;
case EndingState::CREDITS:
if (texts_.back()->getPosY() <= GAMECANVAS_CENTER_Y) {
if (texts_.back()->getPosY() <= GameCanvas::CENTER_Y) {
transitionToState(EndingState::POST_CREDITS);
}
break;
@@ -394,7 +394,7 @@ void Ending2::createSpriteTexts() {
// Determina la columna y la posición X del texto
const float X = (i == sprite_list_.size() - 1)
? (GAMECANVAS_CENTER_X - (W / 2))
? (GameCanvas::CENTER_X - (W / 2))
: ((i % 2 == 0 ? FIRST_COL : SECOND_COL) - (W / 2));
// Calcula la posición Y del texto en base a la posición y altura del sprite
@@ -427,7 +427,7 @@ void Ending2::createTexts() {
// Calcula constantes
const float W = text->length(list[i], 1);
const float H = text->getCharacterSize();
const float X = GAMECANVAS_CENTER_X;
const float X = GameCanvas::CENTER_X;
const float DX = -(W / 2);
const float Y = Options::game.height + (text->getCharacterSize() * (i * TEXT_SPACING_MULTIPLIER));
@@ -456,7 +456,7 @@ void Ending2::createTexts() {
// Calcula constantes
const float W = text->length(list[i], 1);
const float H = text->getCharacterSize();
const float X = GAMECANVAS_CENTER_X;
const float X = GameCanvas::CENTER_X;
const float DX = -(W / 2);
const float Y = START + (text->getCharacterSize() * (i * TEXT_SPACING_MULTIPLIER));