Made it so that the game doesn't go unresponsive, made credits recenter
There was a period of time just after the defeat of Kline that the game wasn't responding to input, causing the OS to panic. Corrected this, and also made it so that resizing the window adjusts the positioning of the credits appropriately.
This commit is contained in:
parent
51a1b67841
commit
8ca1cdc42c
|
@ -2706,6 +2706,7 @@ int game_mainLoop()
|
|||
else if ((game.area == MISN_VENUS)
|
||||
&& (engine.musicVolume > 0))
|
||||
{
|
||||
player_getInput();
|
||||
engine.keyState[KEY_UP] = 0;
|
||||
engine.keyState[KEY_DOWN] = 0;
|
||||
engine.keyState[KEY_LEFT] = 0;
|
||||
|
|
|
@ -699,6 +699,13 @@ void title_showCredits()
|
|||
|| engine.keyState[KEY_ALTFIRE])
|
||||
break;
|
||||
|
||||
// Check to see if we need to reposition credits
|
||||
if (credit[0].x != (screen->w - credit[0].image->w) / 2) {
|
||||
for (i=0; i< nCredit; i++) {
|
||||
credit[i].x = (screen->w - credit[i].image->w) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
float speed = 0.5;
|
||||
if (engine.keyState[KEY_DOWN])
|
||||
speed = 2;
|
||||
|
|
Loading…
Reference in New Issue