diff options
| author | Ray <[email protected]> | 2019-05-21 17:47:06 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-05-21 17:47:06 +0200 |
| commit | 8b4f58b9e9d3deef9e1f1dfebece16a9aca1e62f (patch) | |
| tree | 049e864ba695cc1a76fb29bf1c2785ce762e00a9 /games/missile_commander.c | |
| parent | 0027868d1f4ba76043e1cdfbb5c172696ad0985b (diff) | |
| download | raylib-8b4f58b9e9d3deef9e1f1dfebece16a9aca1e62f.tar.gz raylib-8b4f58b9e9d3deef9e1f1dfebece16a9aca1e62f.zip | |
Review sample games
Diffstat (limited to 'games/missile_commander.c')
| -rw-r--r-- | games/missile_commander.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/games/missile_commander.c b/games/missile_commander.c index 15e06f6d..0d7886c7 100644 --- a/games/missile_commander.c +++ b/games/missile_commander.c @@ -92,11 +92,11 @@ static bool gameOver = false; static bool pause = false; static int score = 0; -static Missile missile[MAX_MISSILES]; -static Interceptor interceptor[MAX_INTERCEPTORS]; -static Explosion explosion[MAX_EXPLOSIONS]; -static Launcher launcher[LAUNCHERS_AMOUNT]; -static Building building[BUILDINGS_AMOUNT]; +static Missile missile[MAX_MISSILES] = { 0 }; +static Interceptor interceptor[MAX_INTERCEPTORS] = { 0 }; +static Explosion explosion[MAX_EXPLOSIONS] = { 0 }; +static Launcher launcher[LAUNCHERS_AMOUNT] = { 0 }; +static Building building[BUILDINGS_AMOUNT] = { 0 }; static int explosionIndex = 0; //------------------------------------------------------------------------------------ @@ -126,7 +126,6 @@ int main(void) #if defined(PLATFORM_WEB) emscripten_set_main_loop(UpdateDrawFrame, 0, 1); #else - SetTargetFPS(60); //-------------------------------------------------------------------------------------- @@ -139,7 +138,6 @@ int main(void) //---------------------------------------------------------------------------------- } #endif - // De-Initialization //-------------------------------------------------------------------------------------- UnloadGame(); // Unload loaded data (textures, sounds, models...) @@ -436,7 +434,7 @@ void DrawGame(void) } // Draw score - DrawText(FormatText("SCORE %4i", score), 20, 20, 40, LIGHTGRAY); + DrawText(TextFormat("SCORE %4i", score), 20, 20, 40, LIGHTGRAY); if (pause) DrawText("GAME PAUSED", screenWidth/2 - MeasureText("GAME PAUSED", 40)/2, screenHeight/2 - 40, 40, GRAY); } @@ -504,7 +502,7 @@ static void UpdateIncomingFire() static int missileIndex = 0; // Launch missile - if (framesCounter % MISSILE_LAUNCH_FRAMES == 0) + if (framesCounter%MISSILE_LAUNCH_FRAMES == 0) { float module; float sideX; |
