lots of work

This commit is contained in:
t. boddy 2026-02-18 17:58:41 -05:00
parent 4036b5f07e
commit 06648c2dc1
18 changed files with 640 additions and 113 deletions

View file

@ -43,6 +43,11 @@ void loadGame(){
loadPlayer();
loadChrome();
loadLevel(0);
XGM2_play(stageMusic);
XGM2_setFMVolume(MUSIC_VOLUME);
XGM2_setPSGVolume(MUSIC_VOLUME);
player.recoveringClock = 120;
killBullets = TRUE;
started = TRUE;
}
@ -59,25 +64,30 @@ static void updateGame(){
loadBackground();
loadChrome();
loadLevel(level + 1);
XGM2_play(stageMusic);
SPR_setVisibility(player.image, VISIBLE);
player.recoveringClock = 120;
killBullets = TRUE;
}
return;
}
if(!paused){
updatePlayer();
updateBackground();
if(clock % 2 == 0){
updateEnemies();
if(!gameOver && enemyCount == 0){
if(level >= LEVEL_COUNT - 1){
gameOver = TRUE;
XGM2_stop();
} else {
levelClearing = TRUE;
levelClearClock = 0;
XGM2_stop();
}
}
updateHumans();
} else {
updateBackground();
updateBullets();
}
}