Añadido el degradado de fondo al archivo de mapa

This commit is contained in:
2022-08-23 19:00:09 +02:00
parent 2425ab5142
commit f2ea31a564
8 changed files with 109 additions and 67 deletions

View File

@@ -16,7 +16,7 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input)
sprite = new AnimatedSprite(texture, renderer, asset->get("intro.ani"));
sprite->setCurrentAnimation("menu");
text = new Text(asset->get("debug.png"), asset->get("debug.txt"), renderer);
music = JA_LoadMusic(asset->get("music_title.ogg").c_str());
music = JA_LoadMusic(asset->get("music_title.ogg").c_str());
// Inicializa variables
section = {SECTION_PROG_TITLE, 0};
@@ -44,7 +44,7 @@ Title::~Title()
delete text;
text = nullptr;
JA_DeleteMusic(music);
JA_DeleteMusic(music);
}
// Actualiza las variables
@@ -88,9 +88,7 @@ void Title::render()
// Dibuja los objetos
sprite->render();
//text->writeCentered(160, 200, "@2016,2022 JAILDESIGNER & JAILBROTHER (v0.6)", -1);
const color_t color = {179,83,71};
text->writeDX(TXT_CENTER|TXT_COLOR,160, 200, "@2016,2022 JAILDESIGNER & JAILBROTHER (v0.6)", -1, color);
text->writeDX(TXT_CENTER | TXT_COLOR, 160, 200, "@2016,2022 JAILDESIGNER & JAILBROTHER (v0.6)", -1, {255, 93, 4});
// Vuelca el contenido del renderizador en pantalla
screen->blit();
@@ -99,8 +97,8 @@ void Title::render()
// Bucle principal
section_t Title::run()
{
JA_PlayMusic(music);
JA_PlayMusic(music);
while (section.name == SECTION_PROG_TITLE)
{
update();
@@ -109,5 +107,5 @@ section_t Title::run()
return section;
JA_StopMusic();
JA_StopMusic();
}