Añadido el logo al titulo
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 706 B |
@@ -16,7 +16,7 @@ Director::Director(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// Inicializa variables
|
// Inicializa variables
|
||||||
section = new section_t();
|
section = new section_t();
|
||||||
section->name = SECTION_PROG_LOGO;
|
section->name = SECTION_PROG_TITLE;
|
||||||
|
|
||||||
// Inicializa las opciones del programa
|
// Inicializa las opciones del programa
|
||||||
initOptions();
|
initOptions();
|
||||||
@@ -288,6 +288,7 @@ bool Director::setFileList()
|
|||||||
|
|
||||||
asset->add(prefix + "/data/gfx/intro.png", t_bitmap);
|
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.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/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.png", t_bitmap);
|
||||||
asset->add(prefix + "/data/gfx/menu_game_over_end.png", t_bitmap);
|
asset->add(prefix + "/data/gfx/menu_game_over_end.png", t_bitmap);
|
||||||
|
|||||||
@@ -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);
|
text1 = new Text(asset->get("smb2.png"), asset->get("smb2.txt"), renderer);
|
||||||
text2 = new Text(asset->get("8bithud.png"), asset->get("8bithud.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 = new Background(renderer, screen, asset);
|
||||||
backgroundObj->setSrcDest(windowArea);
|
backgroundObj->setSrcDest(windowArea);
|
||||||
backgroundObj->setDstDest(windowArea);
|
backgroundObj->setDstDest(windowArea);
|
||||||
@@ -48,6 +51,10 @@ Title::~Title()
|
|||||||
delete text1;
|
delete text1;
|
||||||
delete text2;
|
delete text2;
|
||||||
|
|
||||||
|
miniLogoTexture->unload();
|
||||||
|
delete miniLogoTexture;
|
||||||
|
delete miniLogoSprite;
|
||||||
|
|
||||||
delete backgroundObj;
|
delete backgroundObj;
|
||||||
delete tiledbg;
|
delete tiledbg;
|
||||||
delete gameLogo;
|
delete gameLogo;
|
||||||
@@ -242,8 +249,17 @@ void Title::render()
|
|||||||
// PRESS ANY KEY!
|
// PRESS ANY KEY!
|
||||||
if (counter % 50 > 14)
|
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
|
// Fade
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#define TITLE_H
|
#define TITLE_H
|
||||||
|
|
||||||
// Textos
|
// Textos
|
||||||
#define TEXT_COPYRIGHT "@2020,2024 JailDesigner (v0.1)"
|
#define TEXT_COPYRIGHT "@2020,2024 JailDesigner"
|
||||||
|
|
||||||
// Contadores
|
// Contadores
|
||||||
#define TITLE_COUNTER 800
|
#define TITLE_COUNTER 800
|
||||||
@@ -51,6 +51,8 @@ private:
|
|||||||
Background *backgroundObj; // Objeto para dibujar el fondo del juego
|
Background *backgroundObj; // Objeto para dibujar el fondo del juego
|
||||||
Tiledbg *tiledbg; // Objeto para dibujar el mosaico animado de fondo
|
Tiledbg *tiledbg; // Objeto para dibujar el mosaico animado de fondo
|
||||||
GameLogo *gameLogo; // Objeto para dibujar el logo con el título del juego
|
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 *text1; // Objeto de texto para poder escribir textos en pantalla
|
||||||
Text *text2; // Objeto de texto para poder escribir textos en pantalla
|
Text *text2; // Objeto de texto para poder escribir textos en pantalla
|
||||||
|
|||||||
Reference in New Issue
Block a user