Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Marked version 0.5.3.
[vor.git]
/
rocks.c
diff --git
a/rocks.c
b/rocks.c
index
c404305
..
7c43427
100644
(file)
--- a/
rocks.c
+++ b/
rocks.c
@@
-129,7
+129,7
@@
weighted_rnd_range(float min, float max) {
}
void
}
void
-new_rocks(float ticks)
+new_rocks(void)
{
int i, type;
struct rock *r;
{
int i, type;
struct rock *r;
@@
-138,7
+138,7
@@
new_rocks(float ticks)
float rmax[4];
if(nrocks < final_rocks) {
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++;
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
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++) {
// generate rocks
for(i=0; i<4; i++) {
@@
-175,14
+175,14
@@
new_rocks(float ticks)
r->dy = RDY*crnd();
break;
case BOTTOM:
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->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();
r->y = -r->image->h;
r->dx = RDX*crnd();