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
* dust.c (zero): correct lower bound for wrapping to avoid loss of precision.
[vor.git]
/
rocks.c
diff --git
a/rocks.c
b/rocks.c
index
5f637e0
..
c404305
100644
(file)
--- a/
rocks.c
+++ b/
rocks.c
@@
-37,7
+37,7
@@
reset_rocks(void)
nrocks_timer = 0;
}
nrocks_timer = 0;
}
-#define ROCK_LEN sizeof("sprites/rockXX.png")
+#define ROCK_LEN sizeof("rockXX.png")
void
load_rocks(void)
void
load_rocks(void)
@@
-46,7
+46,7
@@
load_rocks(void)
char a[ROCK_LEN];
for(i=0; i<NROCKS; i++) {
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;
load_sprite(SPRITE(&prototypes[i]), a);
prototypes[i].sprite_type = ROCK;
prototypes[i].flags = MOVE|DRAW|COLLIDE;
@@
-129,7
+129,7
@@
weighted_rnd_range(float min, float max) {
}
void
}
void
-new_rocks(void)
+new_rocks(float ticks)
{
int i, type;
struct rock *r;
{
int i, type;
struct rock *r;
@@
-138,7
+138,7
@@
new_rocks(void)
float rmax[4];
if(nrocks < final_rocks) {
float rmax[4];
if(nrocks < final_rocks) {
- nrocks_timer += t_frame;
+ nrocks_timer += ticks;
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(void)
rock_sides(ti, rmin, rmax);
// increment timers
rock_sides(ti, rmin, rmax);
// increment timers
- for(i=0; i<4; i++) rtimers[i] += ti[i]*t_frame;
+ for(i=0; i<4; i++) rtimers[i] += ti[i]*ticks;
// generate rocks
for(i=0; i<4; i++) {
// generate rocks
for(i=0; i<4; i++) {