#include <string.h>
#include "common.h"
-#include "config.h"
+#include "vorconfig.h"
#include "file.h"
#include "globals.h"
#include "mt.h"
}
void
-new_rocks(float ticks)
+new_rocks(void)
{
int i, type;
struct rock *r;
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++;
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++) {
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();