diff --git a/source/const.h b/source/const.h index c4e4e48..a9f6930 100644 --- a/source/const.h +++ b/source/const.h @@ -62,6 +62,8 @@ const int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3; // Subsecciones #define SUBSECTION_LOGO_TO_INTRO 0 #define SUBSECTION_LOGO_TO_TITLE 1 +#define SUBSECTION_TITLE_WITH_LOADING_SCREEN 2 +#define SUBSECTION_TITLE_WITHOUT_LOADING_SCREEN 3 // Colores const color_t borderColor = {0x27, 0x27, 0x36}; diff --git a/source/gamestate_loading_screen.cpp b/source/gamestate_loading_screen.cpp index e815a9a..7d92874 100644 --- a/source/gamestate_loading_screen.cpp +++ b/source/gamestate_loading_screen.cpp @@ -173,7 +173,7 @@ void LoadingScreen::updateLoad() if (loadCounter >= 768) { section->name = SECTION_TITLE; - section->subsection = 0; + section->subsection = SUBSECTION_TITLE_WITH_LOADING_SCREEN; JA_StopMusic(); } } diff --git a/source/gamestate_title.cpp b/source/gamestate_title.cpp index ab52647..ae28bda 100644 --- a/source/gamestate_title.cpp +++ b/source/gamestate_title.cpp @@ -47,6 +47,7 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset * // Inicializa variables counter = 0; + state = section->subsection == SUBSECTION_TITLE_WITH_LOADING_SCREEN ? show_loading_screen : show_menu; section->name = SECTION_TITLE; section->subsection = 0; ticks = 0; @@ -54,7 +55,6 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset * marqueeSpeed = 3; initMarquee(); showCheevos = false; - state = show_loading_screen; // Crea y rellena la textura para mostrar los logros createCheevosTexture();