canvi de pc

This commit is contained in:
2025-02-27 07:37:39 +01:00
parent e6fd4225a2
commit c6474cb2da
26 changed files with 903 additions and 991 deletions

View File

@@ -1,18 +1,19 @@
#include "logo.h"
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for basic_string, string
#include "asset.h" // for Asset
#include "global_events.h" // for check
#include "global_inputs.h" // for check
#include "input.h" // for Input
#include "jail_audio.h" // for JA_StopMusic
#include "options.h" // for Options, options, SectionState, Section
#include "resource.h" // for Resource
#include "screen.h" // for Screen
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
#include "utils.h" // for Color, stringToColor
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for basic_string, string
#include "asset.h" // for Asset
#include "global_events.h" // for check
#include "global_inputs.h" // for check
#include "input.h" // for Input
#include "jail_audio.h" // for JA_StopMusic
#include "options.h" // for Options, options, SectionState, Section
#include "resource.h" // for Resource
#include "screen.h" // for Screen
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
#include "utils.h" // for Color, stringToColor
#include "defines.h"
// Constructor
Logo::Logo()
@@ -153,43 +154,43 @@ void Logo::updateTextureColors()
since_1998_texture_->setColor(color_[7].r, color_[7].g, color_[7].b);
}
else if (counter_ == init_fade_ + inc * 0)
else if (counter_ == INIT_FADE_ + inc * 0)
{
jailgames_texture_->setColor(color_[6].r, color_[6].g, color_[6].b);
since_1998_texture_->setColor(color_[6].r, color_[6].g, color_[6].b);
}
else if (counter_ == init_fade_ + inc * 1)
else if (counter_ == INIT_FADE_ + inc * 1)
{
jailgames_texture_->setColor(color_[5].r, color_[5].g, color_[5].b);
since_1998_texture_->setColor(color_[5].r, color_[5].g, color_[5].b);
}
else if (counter_ == init_fade_ + inc * 2)
else if (counter_ == INIT_FADE_ + inc * 2)
{
jailgames_texture_->setColor(color_[4].r, color_[4].g, color_[4].b);
since_1998_texture_->setColor(color_[4].r, color_[4].g, color_[4].b);
}
else if (counter_ == init_fade_ + inc * 3)
else if (counter_ == INIT_FADE_ + inc * 3)
{
jailgames_texture_->setColor(color_[3].r, color_[3].g, color_[3].b);
since_1998_texture_->setColor(color_[3].r, color_[3].g, color_[3].b);
}
else if (counter_ == init_fade_ + inc * 4)
else if (counter_ == INIT_FADE_ + inc * 4)
{
jailgames_texture_->setColor(color_[2].r, color_[2].g, color_[2].b);
since_1998_texture_->setColor(color_[2].r, color_[2].g, color_[2].b);
}
else if (counter_ == init_fade_ + inc * 5)
else if (counter_ == INIT_FADE_ + inc * 5)
{
jailgames_texture_->setColor(color_[1].r, color_[1].g, color_[1].b);
since_1998_texture_->setColor(color_[1].r, color_[1].g, color_[1].b);
}
else if (counter_ == init_fade_ + inc * 6)
else if (counter_ == INIT_FADE_ + inc * 6)
{
jailgames_texture_->setColor(color_[0].r, color_[0].g, color_[0].b);
since_1998_texture_->setColor(color_[0].r, color_[0].g, color_[0].b);
@@ -200,7 +201,7 @@ void Logo::updateTextureColors()
void Logo::update()
{
// Comprueba que la diferencia de ticks sea mayor a la velocidad del juego
if (SDL_GetTicks() - ticks_ > ticks_speed_)
if (SDL_GetTicks() - ticks_ > GAME_SPEED)
{
// Actualiza el contador de ticks
ticks_ = SDL_GetTicks();
@@ -220,7 +221,7 @@ void Logo::update()
screen_->update();
// Comprueba si ha terminado el logo
if (counter_ == end_logo_ + post_logo_)
if (counter_ == END_LOGO_ + POST_LOGO_)
{
endSection();
}