JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
made common-sense changes to configure.in
[vor.git] / rocks.c
diff --git a/rocks.c b/rocks.c
index c404305..9983809 100644 (file)
--- a/rocks.c
+++ b/rocks.c
@@ -4,7 +4,7 @@
 #include <string.h>
 
 #include "common.h"
-#include "config.h"
+#include "vorconfig.h"
 #include "file.h"
 #include "globals.h"
 #include "mt.h"
@@ -129,7 +129,7 @@ weighted_rnd_range(float min, float max) {
 }
 
 void
-new_rocks(float ticks)
+new_rocks(void)
 {
        int i, type;
        struct rock *r;
@@ -138,7 +138,7 @@ new_rocks(float ticks)
        float rmax[4];
 
        if(nrocks < final_rocks) {
-               nrocks_timer += ticks;
+               nrocks_timer += t_frame;
                if(nrocks_timer >= nrocks_inc_ticks) {
                        nrocks_timer -= nrocks_inc_ticks;
                        nrocks++;
@@ -148,7 +148,7 @@ new_rocks(float ticks)
        rock_sides(ti, rmin, rmax);
 
        // increment timers
-       for(i=0; i<4; i++) rtimers[i] += ti[i]*ticks;
+       for(i=0; i<4; i++) rtimers[i] += ti[i]*t_frame;
 
        // generate rocks
        for(i=0; i<4; i++) {
@@ -175,14 +175,14 @@ new_rocks(float ticks)
                                        r->dy = RDY*crnd();
                                        break;
                                case BOTTOM:
-                                       r->x = frnd()*(XSIZE + r->image->w);
+                                       r->x = (frnd()*(XSIZE + r->image->w)) - r->image->w;
                                        r->y = YSIZE;
 
                                        r->dx = RDX*crnd();
                                        r->dy = -weighted_rnd_range(rmin[i], rmax[i]) + screendy;
                                        break;
                                case TOP:
-                                       r->x = frnd()*(XSIZE + r->image->w);
+                                       r->x = (frnd() * (XSIZE + r->image->w)) - r->image->w;
                                        r->y = -r->image->h;
 
                                        r->dx = RDX*crnd();