X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=rocks.c;h=ff8f8f96a1a0aaa9f89bf04539b745e9f00fae31;hp=5f637e038c678d3736a5e72e1f3c7e73eda2db37;hb=HEAD;hpb=0224eb908d4084f52a22c8d64404a0efb4acfa35 diff --git a/rocks.c b/rocks.c index 5f637e0..ff8f8f9 100644 --- a/rocks.c +++ b/rocks.c @@ -4,7 +4,7 @@ #include #include "common.h" -#include "config.h" +#include "vorconfig.h" #include "file.h" #include "globals.h" #include "mt.h" @@ -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; itype = type; + r->life = r->area * 300; switch(i) { case RIGHT: r->x = XSIZE; @@ -175,14 +176,14 @@ new_rocks(void) 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();