diff --git a/source/director.cpp b/source/director.cpp index 9cd5dba..076196f 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -1704,6 +1704,7 @@ bool Director::setFileList() asset->add(prefix + "/data/title/loading_screen_bn_zxarne.png", t_bitmap); asset->add(prefix + "/data/title/loading_screen_color_zxarne.png", t_bitmap); asset->add(prefix + "/data/title/loading_screen_color.gif", t_bitmap); + asset->add(prefix + "/data/title/title_logo.png", t_bitmap); // Ending asset->add(prefix + "/data/ending/ending1.png", t_bitmap); diff --git a/source/gamestate_title.cpp b/source/gamestate_title.cpp index 95cba44..445fd8b 100644 --- a/source/gamestate_title.cpp +++ b/source/gamestate_title.cpp @@ -324,30 +324,9 @@ void Title::render() // Prepara para empezar a dibujar en la textura de juego screen->start(); - switch (state) + if (state == show_menu) { - case show_loading_screen: - // Dibuja la textura de fondo - SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr); - - // Dibuja la pantalla de carga - pCls(4); - pBlit(0, 0, 0, 0, 256, 128); - pFlip(renderer); - break; - - case fade_loading_screen: - // Dibuja la textura de fondo - SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr); - - // Dibuja la pantalla de carga - pCls(4); - pBlit(0, 0, 0, 0, 256, 128); - pFlip(renderer); - break; - - case show_menu: - // Dibuja la textura de fondo + // Dibuja la textura de fondo SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr); // Dibuja la marquesina @@ -358,10 +337,17 @@ void Title::render() { cheevosSprite->render(); } - break; + } + else + { + // Dibuja la pantalla de carga + pCls(4); + pBlit(0, 0, 0, 0, 256, 128); + pFlip(renderer); - default: - break; + // Dibuja el logo del título + SDL_Rect dstRect = {0, 0, 256, 80}; + SDL_RenderCopy(renderer, titleLogo, nullptr, &dstRect); } // Vuelca el contenido del renderizador en pantalla diff --git a/source/gamestate_title.h b/source/gamestate_title.h index 6f01b98..7cd7427 100644 --- a/source/gamestate_title.h +++ b/source/gamestate_title.h @@ -46,6 +46,7 @@ private: SDL_Event *eventHandler; // Manejador de eventos Texture *texture; // Textura con los graficos Sprite *sprite; // Sprite para manejar la textura + Texture *titleLogo; // Textura con el logo del título del juego SDL_Texture *bgTexture; // Textura para dibujar el fondo de la pantalla Text *text; // Objeto para escribir texto en pantalla Text *infoText; // Objeto para escribir texto en pantalla