forked from jaildesigner-jailgames/jaildoctors_dilemma
Ya rueda por los diferentes estados del juego: logo, titulo, creditos, demo
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "logo.h"
|
||||
|
||||
// Constructor
|
||||
Logo::Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset)
|
||||
Logo::Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset, int subsection)
|
||||
{
|
||||
// Copia la dirección de los objetos
|
||||
this->renderer = renderer;
|
||||
@@ -33,7 +33,7 @@ Logo::Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset)
|
||||
// Inicializa variables
|
||||
counter = 0;
|
||||
section.name = SECTION_PROG_LOGO;
|
||||
section.subsection = 0;
|
||||
section.subsection = subsection;
|
||||
ticks = 0;
|
||||
ticksSpeed = 15;
|
||||
initFade = 300;
|
||||
@@ -238,8 +238,16 @@ void Logo::update()
|
||||
// Comprueba si ha terminado el logo
|
||||
if (counter == endLogo + postLogo)
|
||||
{
|
||||
section.name = SECTION_PROG_INTRO;
|
||||
section.subsection = 0;
|
||||
if (section.subsection == SUBSECTION_LOGO_TO_INTRO)
|
||||
{
|
||||
section.name = SECTION_PROG_INTRO;
|
||||
section.subsection = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
section.name = SECTION_PROG_TITLE;
|
||||
section.subsection = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user