#include <stdlib.h>
#include <string.h>
+#include "common.h"
#include "config.h"
#include "file.h"
#include "globals.h"
float rmax[4];
if(nrocks < F_ROCKS) {
- nrocks_timer += ticks_since_last;
+ nrocks_timer += ms_frame;
if(nrocks_timer >= nrocks_inc_ticks) {
nrocks_timer -= nrocks_inc_ticks;
nrocks++;
// loop through the four sides of the screen
for(i=0; i<4; i++) {
// see if we generate a rock for this side this frame
- rtimers[i] += ti[i]*gamerate/20;
+ rtimers[i] += ti[i]*s_frame;
while(rtimers[i] >= 1) {
rtimers[i] -= 1;
j=0;
for(i = 0; i < MAXROCKS; i++) {
if(rock[i].active) {
// move
- rock[i].x += (rock[i].dx-screendx)*gamerate;
- rock[i].y += (rock[i].dy-screendy)*gamerate;
+ rock[i].x += (rock[i].dx-screendx)*t_frame;
+ rock[i].y += (rock[i].dy-screendy)*t_frame;
// clip
if(rock[i].x < -rock[i].image->w || rock[i].x >= XSIZE
|| rock[i].y < -rock[i].image->h || rock[i].y >= YSIZE) {