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:
@@ -14,7 +14,7 @@
|
||||
#include "options.h" // for options
|
||||
#include "param.h" // for param
|
||||
#include "screen.h" // for Screen
|
||||
#include "text.h" // for Text, TXT_CENTER, TXT_SHADOW, TXT_COLOR
|
||||
#include "text.h" // for Text, TEXT_CENTER, TEXT_SHADOW, TEXT_COLOR
|
||||
#include "utils.h" // for Param, ParamGame, HiScoreEntry
|
||||
|
||||
// Constructor
|
||||
@@ -35,7 +35,7 @@ HiScoreTable::HiScoreTable(JA_Music_t *music)
|
||||
SDL_SetTextureBlendMode(backbuffer, SDL_BLENDMODE_BLEND);
|
||||
|
||||
// Inicializa variables
|
||||
section::name = section::NAME_HI_SCORE_TABLE;
|
||||
section::name = section::Name::HI_SCORE_TABLE;
|
||||
ticks = 0;
|
||||
ticksSpeed = 15;
|
||||
counter = 0;
|
||||
@@ -115,13 +115,13 @@ void HiScoreTable::fillTexture()
|
||||
const auto firstLine = (param.game.height - size) / 2;
|
||||
|
||||
// Pinta en el backbuffer el texto y los sprites
|
||||
auto *temp = SDL_GetRenderTarget(renderer);
|
||||
auto temp = SDL_GetRenderTarget(renderer);
|
||||
SDL_SetRenderTarget(renderer, backbuffer);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
// Escribe el texto: Mejores puntuaciones
|
||||
text->writeDX(TXT_CENTER | TXT_COLOR | TXT_SHADOW, param.game.game_area.center_x, firstLine, lang::getText(42), 1, orange_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_COLOR | TEXT_SHADOW, param.game.game_area.center_x, firstLine, lang::getText(42), 1, orange_color, 1, shdw_txt_color);
|
||||
|
||||
// Escribe los nombres de la tabla de puntuaciones
|
||||
for (int i = 0; i < maxNames; ++i)
|
||||
@@ -136,7 +136,7 @@ void HiScoreTable::fillTexture()
|
||||
dots = dots + ".";
|
||||
}
|
||||
const auto line = options.game.hi_score_table[i].name + dots + score;
|
||||
text->writeDX(TXT_CENTER | TXT_SHADOW, param.game.game_area.center_x, (i * spaceBetweenLines) + firstLine + spaceBetweenHeader, line, 1, orange_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, (i * spaceBetweenLines) + firstLine + spaceBetweenHeader, line, 1, orange_color, 1, shdw_txt_color);
|
||||
}
|
||||
|
||||
// Cambia el destino de renderizado
|
||||
@@ -184,7 +184,7 @@ void HiScoreTable::checkEvents()
|
||||
// Evento de salida de la aplicación
|
||||
if (eventHandler->type == SDL_QUIT)
|
||||
{
|
||||
section::name = section::NAME_QUIT;
|
||||
section::name = section::Name::QUIT;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -206,8 +206,8 @@ void HiScoreTable::checkInput()
|
||||
if (Input::get()->checkAnyButtonPressed())
|
||||
{
|
||||
JA_StopMusic();
|
||||
section::name = section::NAME_TITLE;
|
||||
section::options = section::OPTIONS_TITLE_1;
|
||||
section::name = section::Name::TITLE;
|
||||
section::options = section::Options::TITLE_1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ void HiScoreTable::checkInput()
|
||||
// Bucle para la pantalla de instrucciones
|
||||
void HiScoreTable::run()
|
||||
{
|
||||
while (section::name == section::NAME_HI_SCORE_TABLE)
|
||||
while (section::name == section::Name::HI_SCORE_TABLE)
|
||||
{
|
||||
checkInput();
|
||||
update();
|
||||
@@ -244,7 +244,7 @@ void HiScoreTable::updateFade()
|
||||
|
||||
if (fade->hasEnded() && fadeMode == FadeMode::OUT)
|
||||
{
|
||||
section::name = section::NAME_INSTRUCTIONS;
|
||||
section::name = section::Name::INSTRUCTIONS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user