X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=sprite.c;h=36ca546bec9dc63e6ac04fad88237b50b1fe6205;hp=447e4827525329005a673f07b098d5115227d902;hb=ae2d57cc5b1b64621a76aed51ce14f4c555c3bc8;hpb=9a9572d121946fef90a24ea5514a0c3ca33b1ae5 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.