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:
Layla Marchant 2020-12-25 20:06:41 -05:00
parent 51a1b67841
commit 8ca1cdc42c
No known key found for this signature in database
GPG Key ID: 52FB5C20A8336782
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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;