static int game_mode_anim_classes[NUM_GAME_MODES];
static int anim_class_game_modes[NUM_ANIM_CLASSES];
+static int anim_status_last_before_fading = GAME_MODE_DEFAULT;
static int anim_status_last = GAME_MODE_DEFAULT;
static int anim_classes_last = ANIM_CLASS_NONE;
anim_class_game_modes[anim_class_game_modes_list[i].class_bit] =
anim_class_game_modes_list[i].game_mode;
+ anim_status_last_before_fading = GAME_MODE_LOADING;
anim_status_last = GAME_MODE_LOADING;
anim_classes_last = ANIM_CLASS_NONE;
}
// start or stop global animations by change of game mode
// (special handling of animations for "current screen" and "all screens")
- // stop animations for last screen
- game_mode_anim_action[anim_status_last] = ANIM_STOP;
+ if (global.anim_status_next != anim_status_last_before_fading)
+ {
+ // stop animations for last screen before fading to new screen
+ game_mode_anim_action[anim_status_last] = ANIM_STOP;
- // start animations for current screen
- game_mode_anim_action[global.anim_status] = ANIM_START;
+ // start animations for current screen after fading to new screen
+ game_mode_anim_action[global.anim_status] = ANIM_START;
+ }
// start animations for all screens after loading new artwork set
if (anim_status_last == GAME_MODE_LOADING)
if (drawing_target == DRAW_TO_SCREEN)
{
if (after_fading)
+ {
anim_classes_last = anim_classes_next;
+ anim_status_last_before_fading = global.anim_status;
+ }
anim_status_last = global.anim_status;