}
else if (mode & ANIM_LEVEL_NR) // play frames by level number
{
- int level_pos = level_nr - leveldir_current->first_level;
+ int level_pos = level_nr - gfx.anim_first_level;
frame = level_pos % num_frames;
}
char * (*get_token_from_font_function)(int);
int anim_random_frame;
+ int anim_first_level;
void (*draw_busy_anim_function)(boolean);
void (*draw_global_anim_function)(int, int);
// store valid level series information
leveldir_last_valid = leveldir_current;
+ // store first level of this level set for "level_nr" style animations
+ SetAnimationFirstLevel(leveldir_current->first_level);
+
// needed if last screen (level choice) changed graphics, sounds or music
ReloadCustomArtwork(0);
gfx.anim_random_frame = GfxRandom[x][y];
}
+void SetAnimationFirstLevel(int first_level)
+{
+ gfx.anim_first_level = first_level;
+}
+
int getGraphicAnimationFrame(int graphic, int sync_frame)
{
// animation synchronized with global frame counter, not move position
void FloodFillLevelExt(int, int, int, int x, int y, short field[x][y], int, int);
void SetRandomAnimationValue(int, int);
+void SetAnimationFirstLevel(int);
int getGraphicAnimationFrame(int, int);
int getGraphicAnimationFrameXY(int, int, int);