diff --git a/data/gfx/logo_jailgames_mini.png b/data/gfx/logo_jailgames_mini.png index 04594d9..c99f7e9 100644 Binary files a/data/gfx/logo_jailgames_mini.png and b/data/gfx/logo_jailgames_mini.png differ diff --git a/source/director.cpp b/source/director.cpp index 1d7aff5..81a69cd 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -16,7 +16,7 @@ Director::Director(int argc, char *argv[]) { // Inicializa variables section = new section_t(); - section->name = SECTION_PROG_LOGO; + section->name = SECTION_PROG_TITLE; // Inicializa las opciones del programa initOptions(); @@ -288,6 +288,7 @@ bool Director::setFileList() asset->add(prefix + "/data/gfx/intro.png", t_bitmap); asset->add(prefix + "/data/gfx/logo_jailgames.png", t_bitmap); + asset->add(prefix + "/data/gfx/logo_jailgames_mini.png", t_bitmap); asset->add(prefix + "/data/gfx/logo_since_1998.png", t_bitmap); asset->add(prefix + "/data/gfx/menu_game_over.png", t_bitmap); asset->add(prefix + "/data/gfx/menu_game_over_end.png", t_bitmap); diff --git a/source/title.cpp b/source/title.cpp index 8aa8a57..934893e 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -19,6 +19,9 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, text1 = new Text(asset->get("smb2.png"), asset->get("smb2.txt"), renderer); text2 = new Text(asset->get("8bithud.png"), asset->get("8bithud.txt"), renderer); + miniLogoTexture = new Texture(renderer, asset->get("logo_jailgames_mini.png")); + miniLogoSprite = new Sprite(GAMECANVAS_CENTER_X - miniLogoTexture->getWidth() / 2, 0, miniLogoTexture->getWidth(), miniLogoTexture->getHeight(), miniLogoTexture, renderer); + backgroundObj = new Background(renderer, screen, asset); backgroundObj->setSrcDest(windowArea); backgroundObj->setDstDest(windowArea); @@ -48,6 +51,10 @@ Title::~Title() delete text1; delete text2; + miniLogoTexture->unload(); + delete miniLogoTexture; + delete miniLogoSprite; + delete backgroundObj; delete tiledbg; delete gameLogo; @@ -242,8 +249,17 @@ void Title::render() // PRESS ANY KEY! if (counter % 50 > 14) { - text1->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, GAMECANVAS_THIRD_QUARTER_Y + BLOCK, lang->getText(23), 1, noColor, 1, shdwTxtColor); + text1->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, GAMECANVAS_HEIGHT / 5 * 3, lang->getText(23), 1, noColor, 1, shdwTxtColor); } + + // Mini logo + const int pos1 = (GAMECANVAS_HEIGHT / 5 * 4) + BLOCK; + const int pos2 = pos1 + miniLogoSprite->getHeight() + 3; + miniLogoSprite->setPosY(pos1); + miniLogoSprite->render(); + + // Texto con el copyright + text1->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, pos2, TEXT_COPYRIGHT, 1, noColor, 1, shdwTxtColor); } // Fade diff --git a/source/title.h b/source/title.h index b42f3db..fb4c9a7 100644 --- a/source/title.h +++ b/source/title.h @@ -26,7 +26,7 @@ #define TITLE_H // Textos -#define TEXT_COPYRIGHT "@2020,2024 JailDesigner (v0.1)" +#define TEXT_COPYRIGHT "@2020,2024 JailDesigner" // Contadores #define TITLE_COUNTER 800 @@ -51,6 +51,8 @@ private: Background *backgroundObj; // Objeto para dibujar el fondo del juego Tiledbg *tiledbg; // Objeto para dibujar el mosaico animado de fondo GameLogo *gameLogo; // Objeto para dibujar el logo con el título del juego + Texture *miniLogoTexture; // Textura con el logo de JailGames mini + Sprite *miniLogoSprite; // Sprite con el logo de JailGames mini Text *text1; // Objeto de texto para poder escribir textos en pantalla Text *text2; // Objeto de texto para poder escribir textos en pantalla