Pasaeta de IWYU

This commit is contained in:
2025-03-14 21:22:55 +01:00
parent 3ee47ba906
commit 6c7cfaae59
27 changed files with 350 additions and 408 deletions

View File

@@ -1,20 +1,17 @@
#include "logo.h"
#include <SDL2/SDL_events.h> // Para SDL_PollEvent, SDL_Event, SDL_QUIT, SDL...
#include <SDL2/SDL_events.h> // Para SDL_PollEvent, SDL_Event
#include <SDL2/SDL_timer.h> // Para SDL_GetTicks
#include <SDL2/SDL_video.h> // Para SDL_WINDOWEVENT_SIZE_CHANGED
#include <utility> // Para move
#include <iostream>
#include "global_inputs.h" // Para check
#include "input.h" // Para Input
#include "jail_audio.h" // Para JA_StopMusic
#include "param.h" // Para Param, ParamGame, param
#include "resource.h" // Para Resource
#include "screen.h" // Para Screen
#include "section.h" // Para Name, name, Options, options
#include "sprite.h" // Para Sprite
#include "texture.h" // Para Texture
#include "utils.h" // Para Color, Zone
#include "global_events.h"
#include "global_events.h" // Para check
#include "global_inputs.h" // Para check, update
#include "jail_audio.h" // Para JA_FadeOutMusic, JA_PlaySound, JA_StopC...
#include "param.h" // Para Param, ParamGame, param
#include "resource.h" // Para Resource
#include "screen.h" // Para Screen
#include "section.h" // Para Name, name
#include "sprite.h" // Para Sprite
#include "texture.h" // Para Texture
#include "utils.h" // Para Color, Zone
// Constructor
Logo::Logo()
@@ -115,17 +112,10 @@ void Logo::updateJAILGAMES()
// Comprueba si ha terminado el logo
if (counter_ == END_LOGO_COUNTER_MARK + POST_LOGO_DURATION)
{
state_ = LogoState::RETROWEEKEND;
ticks_start_ = SDL_GetTicks();
section::name = section::Name::INTRO;
}
}
// Gestiona el logo de RETROWEEKEND
void Logo::updateRETROWEEKEND()
{
section::name = section::Name::INTRO;
}
// Gestiona el color de las texturas
void Logo::updateTextureColors()
{
@@ -165,20 +155,8 @@ void Logo::update()
// Comprueba las entradas
checkInput();
switch (state_)
{
case LogoState::JAILGAMES:
updateJAILGAMES();
updateTextureColors();
break;
case LogoState::RETROWEEKEND:
updateRETROWEEKEND();
break;
default:
break;
}
updateJAILGAMES();
updateTextureColors();
// Gestiona el contador
counter_++;
@@ -194,18 +172,7 @@ void Logo::render()
Screen::get()->start();
Screen::get()->clean();
switch (state_)
{
case LogoState::JAILGAMES:
renderJAILGAMES();
break;
case LogoState::RETROWEEKEND:
break;
default:
break;
}
renderJAILGAMES();
Screen::get()->render();
}