JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
removed deadrocks because they weren't being used.
[vor.git] / main.c
diff --git a/main.c b/main.c
index 4801df7..9b59308 100644 (file)
--- a/main.c
+++ b/main.c
@@ -19,7 +19,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
-#undef DEBUG
+#ifdef DEBUG
+#include "debug.h"
+#endif
 
 #include "config.h"
 #include "file.h"
@@ -92,7 +94,6 @@ SDL_Surface
        *surf_ship,             // Spaceship element
        *surf_life,     // Indicator of number of ships remaining
        *surf_rock[NROCKS],     // THE ROCKS
-       *surf_deadrock[NROCKS], // THE DEAD ROCKS
        *surf_font_big; // The big font
 
 SFont_Font *g_font;
@@ -562,15 +563,11 @@ init(int fullscreen) {
 
        // Load all our lovely rocks
        for(i = 0; i<NROCKS; i++) {
-               char a[100];
+               char a[MAX_PATH_LEN];
 
-               sprintf(a,add_path("sprites/rock%d.png"),i);
+               snprintf(a,MAX_PATH_LEN,add_path("sprites/rock%d.png"),i);
                NULLERROR(temp = IMG_Load(a));
                NULLERROR(surf_rock[i] = SDL_DisplayFormat(temp));
-
-               sprintf(a,add_path("sprites/deadrock%d.png"),i);
-               NULLERROR(temp = IMG_Load(a));
-               NULLERROR(surf_deadrock[i] = SDL_DisplayFormat(temp));
        }
 
        // Remove the mouse cursor
@@ -725,6 +722,7 @@ draw() {
                case HIGH_SCORE_DISPLAY:
                        // Display de list o high scores mon.
                        display_scores(surf_screen, 150,50);
+                       break;
                case GAMEPLAY:
                case DEAD_PAUSE:
                        ; // no action necessary