{
int frame = 0;
+ if (delay < 1) // delay must be at least 1
+ delay = 1;
+
sync_frame += start_frame * delay;
if (mode & ANIM_LOOP) // looping animation
else
g->anim_frames = 1;
- if (g->anim_frames == 0) // frames must be at least 1
+ if (g->anim_frames < 1) // frames must be at least 1
g->anim_frames = 1;
g->anim_frames_per_line =
parameter[GFX_ARG_FRAMES_PER_LINE] : anim_frames_per_line);
g->anim_delay = parameter[GFX_ARG_DELAY];
- if (g->anim_delay == 0) // delay must be at least 1
+ if (g->anim_delay < 1) // delay must be at least 1
g->anim_delay = 1;
g->anim_mode = parameter[GFX_ARG_ANIM_MODE];
g->x = parameter[GFX_ARG_X]; // (may be uninitialized,
g->y = parameter[GFX_ARG_Y]; // unlike src_x and src_y)
+ if (g->step_delay < 1) // delay must be at least 1
+ g->step_delay = 1;
+
// this is only used for drawing font characters
g->draw_xoffset = parameter[GFX_ARG_DRAW_XOFFSET];
g->draw_yoffset = parameter[GFX_ARG_DRAW_YOFFSET];