JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
oops, didn't fix bang dots correctly.
[vor.git] / rocks.c
diff --git a/rocks.c b/rocks.c
index ed98cac..9384fe0 100644 (file)
--- a/rocks.c
+++ b/rocks.c
@@ -37,7 +37,7 @@ reset_rocks(void)
        nrocks_timer = 0;
 }
 
-#define ROCK_LEN sizeof("sprites/rockXX.png")
+#define ROCK_LEN sizeof("rockXX.png")
 
 void
 load_rocks(void)
@@ -46,7 +46,7 @@ load_rocks(void)
        char a[ROCK_LEN];
 
        for(i=0; i<NROCKS; i++) {
-               snprintf(a, ROCK_LEN, "sprites/rock%02d.png", i);
+               snprintf(a, ROCK_LEN, "rock%02d.png", i);
                load_sprite(SPRITE(&prototypes[i]), a);
                prototypes[i].sprite_type = ROCK;
                prototypes[i].flags = MOVE|DRAW|COLLIDE;
@@ -201,27 +201,3 @@ draw_rocks(void)
        int i;
        for(i=0; i<MAXROCKS; i++) draw_sprite(SPRITE(&rocks[i]));
 }
-
-void
-blast_rocks(float x, float y, float radius)
-{
-       int i;
-       Sprite *r;
-       float dx, dy, n;
-
-       for(i=0; i<MAXROCKS; i++) {
-               if(!rocks[i].flags) continue;
-               r = SPRITE(&rocks[i]);
-               if(r->x <= 0) continue;
-
-               dx = r->x - x;
-               dy = r->y - y;
-
-               n = sqrt(dx*dx + dy*dy);
-               if(n < radius) {
-                       n *= 15;
-                       r->dx += 54.0*dx/n;
-                       r->dy += 54.0*dy/n;
-               }
-       }
-}