Menudo puto lio de renamar coses, a vore si tot va quedant al lloc que els structs i els enums estan revolant i duplicats per tots llocs

This commit is contained in:
2024-10-11 20:12:50 +02:00
parent a9ca23138d
commit 3a6950f3a4
28 changed files with 445 additions and 454 deletions

View File

@@ -28,7 +28,7 @@
#include "scoreboard.h" // for Scoreboard, scoreboard_modes_e
#include "screen.h" // for Screen
#include "smart_sprite.h" // for SmartSprite
#include "text.h" // for Text, TXT_CENTER
#include "text.h" // for Text, TEXT_CENTER
#include "texture.h" // for Texture
#include "dbgtxt.h"
struct JA_Music_t;
@@ -197,8 +197,8 @@ void Game::init(int playerID)
paused = false;
gameCompleted = false;
gameCompletedCounter = 0;
section::name = section::NAME_GAME;
section::options = section::OPTIONS_GAME_PLAY_1P;
section::name = section::Name::GAME;
section::options = section::Options::GAME_PLAY_1P;
currentPower = 0;
menaceCurrent = 0;
menaceThreshold = 0;
@@ -883,7 +883,7 @@ void Game::updateGameOver()
if (fade->hasEnded())
{
section::name = section::NAME_HI_SCORE_TABLE;
section::name = section::Name::HI_SCORE_TABLE;
}
}
}
@@ -1754,7 +1754,7 @@ void Game::update()
// Si ha terminado el fundido, cambia de sección
if (fade->hasEnded())
{
section::name = section::NAME_HI_SCORE_TABLE;
section::name = section::Name::HI_SCORE_TABLE;
return;
}
}
@@ -1772,7 +1772,7 @@ void Game::update()
// Si se ha llenado el vector con datos, sale del programa
else
{
section::name = section::NAME_QUIT;
section::name = section::Name::QUIT;
return;
}
#endif
@@ -2019,7 +2019,7 @@ void Game::checkInput()
// Si se pulsa cualquier tecla, se sale del modo demo
if (input->checkAnyButtonPressed())
{
section::name = section::NAME_TITLE;
section::name = section::Name::TITLE;
return;
}
}
@@ -2214,7 +2214,7 @@ void Game::renderMessages()
{
if (timeStoppedCounter > 100 || timeStoppedCounter % 10 > 4)
{
textNokia2->writeDX(TXT_CENTER, param.game.play_area.center_x, param.game.play_area.first_quarter_y, lang::getText(36) + std::to_string(timeStoppedCounter / 10), -1, no_color, 1, shdw_txt_color);
textNokia2->writeDX(TEXT_CENTER, param.game.play_area.center_x, param.game.play_area.first_quarter_y, lang::getText(36) + std::to_string(timeStoppedCounter / 10), -1, no_color, 1, shdw_txt_color);
}
if (timeStoppedCounter > 100)
@@ -2250,13 +2250,13 @@ void Game::renderMessages()
if (!gameCompleted)
{ // Escribe el número de fases restantes
textNokiaBig2->writeDX(TXT_CENTER, param.game.play_area.center_x, stageBitmapPath[stageBitmapCounter], text, -2, no_color, 2, shdw_txt_color);
textNokiaBig2->writeDX(TEXT_CENTER, param.game.play_area.center_x, stageBitmapPath[stageBitmapCounter], text, -2, no_color, 2, shdw_txt_color);
}
else
{ // Escribe el texto de juego completado
text = lang::getText(50);
textNokiaBig2->writeDX(TXT_CENTER, param.game.play_area.center_x, stageBitmapPath[stageBitmapCounter], text, -2, no_color, 1, shdw_txt_color);
textNokia2->writeDX(TXT_CENTER, param.game.play_area.center_x, stageBitmapPath[stageBitmapCounter] + textNokiaBig2->getCharacterSize() + 2, lang::getText(76), -1, no_color, 1, shdw_txt_color);
textNokiaBig2->writeDX(TEXT_CENTER, param.game.play_area.center_x, stageBitmapPath[stageBitmapCounter], text, -2, no_color, 1, shdw_txt_color);
textNokia2->writeDX(TEXT_CENTER, param.game.play_area.center_x, stageBitmapPath[stageBitmapCounter] + textNokiaBig2->getCharacterSize() + 2, lang::getText(76), -1, no_color, 1, shdw_txt_color);
}
}
}
@@ -2299,7 +2299,7 @@ void Game::checkMusicStatus()
// Bucle para el juego
void Game::run()
{
while (section::name == section::NAME_GAME)
while (section::name == section::Name::GAME)
{
#ifndef RECORDING
checkInput();
@@ -2419,8 +2419,8 @@ void Game::updateGameCompleted()
if (gameCompletedCounter == GAME_COMPLETED_END)
{
section::name = section::NAME_TITLE;
section::options = section::OPTIONS_TITLE_1;
section::name = section::Name::TITLE;
section::options = section::Options::TITLE_1;
}
}
@@ -2487,7 +2487,7 @@ void Game::checkEvents()
// Evento de salida de la aplicación
if (event.type == SDL_QUIT)
{
section::name = section::NAME_QUIT;
section::name = section::Name::QUIT;
break;
}