forked from jaildesigner-jailgames/jaildoctors_dilemma
mes reestructuracio de fitxers de codi
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, Sectio...
|
||||
#include "game/options.hpp" // Para Options, options, OptionsGame, Sectio...
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED, PLAY_AREA_CENTER_X, PLAY_...
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_STROKE
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "external/jail_audio.h" // Para JA_SetVolume, JA_PlayMusic, JA_StopMusic
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, SectionS...
|
||||
#include "game/options.hpp" // Para Options, options, OptionsGame, SectionS...
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "game/scene_manager.hpp" // Para SceneManager
|
||||
|
||||
#include "game/scenes/ending2.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -14,7 +12,8 @@
|
||||
#include "core/rendering/text.hpp" // Para Text
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "external/jail_audio.h" // Para JA_SetVolume, JA_PlayMusic, JA_StopMusic
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, Sectio...
|
||||
#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/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
|
||||
@@ -182,7 +181,7 @@ void Ending2::updateState() {
|
||||
case EndingState::FADING:
|
||||
if (state_.hasEnded(EndingState::FADING)) {
|
||||
SceneManager::current = SceneManager::Scene::LOGO;
|
||||
SceneManager::options = SceneManager::Options::LOGO_TO_INTRO;
|
||||
SceneManager::options = SceneManager::Options::LOGO_TO_LOADING_SCREEN;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "external/jail_audio.h" // Para JA_PauseMusic, JA_GetMusicState, JA_P...
|
||||
#include "game/gameplay/cheevos.hpp" // Para Cheevos
|
||||
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, Cheat, SectionState
|
||||
#include "game/options.hpp" // Para Options, options, Cheat, SectionState
|
||||
#include "game/gameplay/room.hpp" // Para Room, RoomData
|
||||
#include "game/gameplay/room_tracker.hpp" // Para RoomTracker
|
||||
#include "game/gameplay/scoreboard.hpp" // Para ScoreboardData, Scoreboard
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "core/rendering/text.hpp" // Para TEXT_CENTER, TEXT_COLOR, Text
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "external/jail_audio.h" // Para JA_PlayMusic
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsStats, Secti...
|
||||
#include "game/options.hpp" // Para Options, options, OptionsStats, Secti...
|
||||
#include "utils/defines.hpp" // Para GAMECANVAS_CENTER_X, GAME_SPEED
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "external/jail_audio.h" // Para JA_PlayMusic, JA_SetVolume, JA_StopMusic
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, SectionState, Options...
|
||||
#include "game/options.hpp" // Para Options, options, SectionState, Options...
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para stringToColor, PaletteColor
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "game/scene_manager.hpp" // Para SceneManager
|
||||
|
||||
#include "game/scenes/logo.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -9,7 +7,8 @@
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "game/gameplay/options.hpp" // Para Options, SectionState, options, Section
|
||||
#include "game/options.hpp" // Para Options, SectionState, options, Section
|
||||
#include "game/scene_manager.hpp" // Para SceneManager
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
@@ -165,23 +164,13 @@ void Logo::updateTextureColors() {
|
||||
void Logo::update() {
|
||||
// Comprueba que la diferencia de ticks sea mayor a la velocidad del juego
|
||||
if (SDL_GetTicks() - ticks_ > GAME_SPEED) {
|
||||
// Actualiza el contador de ticks
|
||||
ticks_ = SDL_GetTicks();
|
||||
ticks_ = SDL_GetTicks(); // Actualiza el contador de ticks
|
||||
|
||||
// Comprueba las entradas
|
||||
checkInput();
|
||||
|
||||
// Incrementa el contador
|
||||
counter_++;
|
||||
|
||||
// Gestiona el logo de JAILGAME
|
||||
updateJAILGAMES();
|
||||
|
||||
// Gestiona el color de las texturas
|
||||
updateTextureColors();
|
||||
|
||||
// Actualiza el objeto Screen
|
||||
Screen::get()->update();
|
||||
checkInput(); // Comprueba las entradas
|
||||
counter_++; // Incrementa el contador
|
||||
updateJAILGAMES(); // Gestiona el logo de JAILGAME
|
||||
updateTextureColors(); // Gestiona el color de las texturas
|
||||
Screen::get()->update(); // Actualiza el objeto Screen
|
||||
|
||||
// Comprueba si ha terminado el logo
|
||||
if (counter_ == END_LOGO_ + POST_LOGO_) {
|
||||
@@ -217,11 +206,17 @@ void Logo::run() {
|
||||
|
||||
// Termina la sección
|
||||
void Logo::endSection() {
|
||||
if (SceneManager::options == SceneManager::Options::LOGO_TO_TITLE) {
|
||||
SceneManager::current = SceneManager::Scene::TITLE;
|
||||
}
|
||||
switch (SceneManager::options) {
|
||||
case SceneManager::Options::LOGO_TO_TITLE:
|
||||
SceneManager::current = SceneManager::Scene::TITLE;
|
||||
break;
|
||||
|
||||
else if (SceneManager::options == SceneManager::Options::LOGO_TO_INTRO) {
|
||||
SceneManager::current = SceneManager::Scene::LOADING_SCREEN;
|
||||
case SceneManager::Options::LOGO_TO_LOADING_SCREEN:
|
||||
SceneManager::current = SceneManager::Scene::LOADING_SCREEN;
|
||||
break;
|
||||
|
||||
default:
|
||||
// Ninguna acción por defecto
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "game/gameplay/cheevos.hpp" // Para Cheevos, Achievement
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, SectionState, Section
|
||||
#include "game/options.hpp" // Para Options, options, SectionState, Section
|
||||
#include "utils/defines.hpp" // Para PLAY_AREA_CENTER_X, GAMECANVAS_WIDTH
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "utils/utils.hpp" // Para stringToColor, PaletteColor, playMusic
|
||||
|
||||
Reference in New Issue
Block a user