mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-22 00:42:16 -05:00
Continue win screen
This commit is contained in:
parent
8e27d0fa53
commit
e42839f2e5
25
game.h
25
game.h
@ -3176,6 +3176,7 @@ void SFG_gameStepPlaying()
|
||||
|
||||
case SFG_LEVEL_ELEMENT_FINISH:
|
||||
SFG_levelEnds();
|
||||
SFG_playGameSound(2,255);
|
||||
SFG_setGameState(SFG_GAME_STATE_WIN);
|
||||
eliminate = 0;
|
||||
break;
|
||||
@ -3465,8 +3466,16 @@ void SFG_gameStep()
|
||||
|
||||
int32_t t = SFG_game.frameTime - SFG_game.stateChangeTime;
|
||||
|
||||
if ((t > SFG_WIN_ANIMATION_DURATION) && SFG_keyIsDown(SFG_KEY_A))
|
||||
if (t > SFG_WIN_ANIMATION_DURATION)
|
||||
{
|
||||
if (SFG_keyIsDown(SFG_KEY_RIGHT))
|
||||
{
|
||||
// TODO: save here
|
||||
SFG_setGameState(SFG_GAME_STATE_MENU);
|
||||
}
|
||||
else if (SFG_keyIsDown(SFG_KEY_LEFT))
|
||||
SFG_setGameState(SFG_GAME_STATE_MENU);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -3956,11 +3965,13 @@ void SFG_drawWinOverlay()
|
||||
uint16_t x = (SFG_GAME_RESOLUTION_X -
|
||||
SFG_textHorizontalSize(textLine,SFG_FONT_SIZE_BIG)) / 2;
|
||||
|
||||
SFG_drawText(textLine,x,y,SFG_FONT_SIZE_BIG,7,255,0);
|
||||
SFG_drawText(textLine,x,y,SFG_FONT_SIZE_BIG,7 + SFG_game.blink * 95,255,0);
|
||||
|
||||
uint32_t completionTime = SFG_MS_PER_FRAME *
|
||||
(SFG_currentLevel.frameEnd - SFG_currentLevel.frameStart);
|
||||
|
||||
if (t >= (SFG_WIN_ANIMATION_DURATION / 2))
|
||||
{
|
||||
y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE;
|
||||
|
||||
x = SFG_GAME_RESOLUTION_X / 4;
|
||||
@ -3990,7 +4001,17 @@ void SFG_drawWinOverlay()
|
||||
|
||||
SFG_drawText(SFG_TEXT_KILLS,x,y,SFG_FONT_SIZE_SMALL,7,255,0);
|
||||
|
||||
if (t >= (SFG_WIN_ANIMATION_DURATION - 1))
|
||||
{
|
||||
y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE;
|
||||
|
||||
SFG_drawText(SFG_TEXT_SAVE_PROMPT,
|
||||
(SFG_GAME_RESOLUTION_X - SFG_textHorizontalSize(SFG_TEXT_SAVE_PROMPT,
|
||||
SFG_FONT_SIZE_MEDIUM)) / 2,y,SFG_FONT_SIZE_MEDIUM,7,255,0);
|
||||
}
|
||||
|
||||
#undef CHAR_SIZE
|
||||
}
|
||||
|
||||
#undef STRIP_HEIGHT
|
||||
#undef STRIP_START
|
||||
|
Loading…
Reference in New Issue
Block a user