forked from jaildesigner-jailgames/jaildoctors_dilemma
Ya funciona el fade de la pantalla de carga
This commit is contained in:
@@ -281,18 +281,23 @@ void Title::update()
|
||||
switch (state)
|
||||
{
|
||||
case show_loading_screen:
|
||||
if (counter == 2000)
|
||||
if (counter == 200)
|
||||
{
|
||||
counter = 0;
|
||||
state = show_menu;
|
||||
state = fade_loading_screen;
|
||||
}
|
||||
break;
|
||||
|
||||
case fade_loading_screen:
|
||||
if (counter % 4 == 0)
|
||||
if (pFadePal())
|
||||
{
|
||||
counter = 0;
|
||||
state = show_menu;
|
||||
}
|
||||
break;
|
||||
|
||||
case show_menu:
|
||||
|
||||
// Actualiza la marquesina
|
||||
updateMarquee();
|
||||
|
||||
@@ -324,7 +329,7 @@ void Title::render()
|
||||
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);
|
||||
@@ -332,6 +337,13 @@ void Title::render()
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user