{
/* note: expect different frames for the same delay cycle! */
- if (anim.random_frame < 0)
+ if (gfx.anim_random_frame < 0)
frame = SimpleRND(num_frames);
else
- frame = anim.random_frame % num_frames;
+ frame = gfx.anim_random_frame % num_frames;
}
if (mode & ANIM_REVERSE) /* use reverse animation direction */
{
static char *direction = NULL;
+ /* !!! MEMORY LEAK HERE! FIX IT! !!! */
setString(&direction, getStringToLower(direction_raw));
return (strcmp(direction, "left") == 0 ? MV_LEFT :
{
static unsigned long animstart_delay = -1;
static unsigned long animstart_delay_value = 0;
+ static boolean anim_running = FALSE;
static boolean anim_restart = TRUE;
static boolean reset_delay = TRUE;
static int toon_nr = 0;
{
case ANIM_START:
screen_info.prepare_backbuffer_function();
+
+ anim_running = TRUE;
anim_restart = TRUE;
reset_delay = TRUE;
return;
case ANIM_CONTINUE:
+ if (!anim_running)
+ return;
+
break;
case ANIM_STOP:
screen_info.update_function();
setup.direct_draw = draw_mode;
+ anim_running = FALSE;
+
return;
default: