X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=sprite.c;h=36ca546bec9dc63e6ac04fad88237b50b1fe6205;hp=447e4827525329005a673f07b098d5115227d902;hb=51d56bfe5830a41e61f4ceefb75217f647d994fe;hpb=a726e74233c877dab3aca50e5b31e7652035ae30 diff --git a/sprite.c b/sprite.c index 447e482..36ca546 100644 --- a/sprite.c +++ b/sprite.c @@ -128,11 +128,11 @@ reset_sprites(void) } void -move_sprite(Sprite *s) +move_sprite(Sprite *s, float ticks) { if(s->flags & MOVE) { - s->x += (s->dx - screendx)*t_frame; - s->y += (s->dy - screendy)*t_frame; + s->x += (s->dx - screendx)*ticks; + s->y += (s->dy - screendy)*ticks; } } @@ -148,7 +148,7 @@ sort_sprite(Sprite *s) } void -move_sprites(void) +move_sprites(float ticks) { int sq; Sprite **head; @@ -158,7 +158,7 @@ move_sprites(void) head=&sprites[set][sq]; while(*head) { Sprite *s = remove_sprite(head); - move_sprite(s); sort_sprite(s); + move_sprite(s, ticks); sort_sprite(s); } } set = 1-set; // switch to other set of sprites.