gfx, shit
This commit is contained in:
parent
364a34ce33
commit
0151304d05
8 changed files with 140 additions and 33 deletions
25
src/main.c
25
src/main.c
|
|
@ -28,28 +28,31 @@ void loadGame(){
|
|||
loadPlayer();
|
||||
loadChrome();
|
||||
loadStage();
|
||||
started = TRUE;
|
||||
}
|
||||
|
||||
static void updateGame(){
|
||||
updateChrome();
|
||||
updatePlayer();
|
||||
updateSfx();
|
||||
if(clock % 2 == 0){
|
||||
updateEnemies();
|
||||
if(!gameOver && enemyCount == 0) gameOver = TRUE;
|
||||
updateHumans();
|
||||
} else {
|
||||
updateBackground();
|
||||
updateBullets();
|
||||
if(!paused){
|
||||
updatePlayer();
|
||||
if(clock % 2 == 0){
|
||||
updateEnemies();
|
||||
if(!gameOver && enemyCount == 0) gameOver = TRUE;
|
||||
updateHumans();
|
||||
} else {
|
||||
updateBackground();
|
||||
updateBullets();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(bool hardReset){
|
||||
loadInternals();
|
||||
loadGame();
|
||||
// loadStart();
|
||||
loadStart();
|
||||
while(1){
|
||||
updateGame();
|
||||
if(started) updateGame();
|
||||
else updateStart();
|
||||
clock++;
|
||||
if(clock >= CLOCK_LIMIT) clock = 600;
|
||||
SPR_update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue