int drawing_stage;
int state;
- int last_game_status;
+ int last_anim_status;
};
struct GlobalAnimMainControlInfo
static int game_mode_anim_classes[NUM_GAME_MODES];
static int anim_class_game_modes[NUM_ANIM_CLASSES];
-static int game_status_last = GAME_MODE_DEFAULT;
+static int anim_status_last = GAME_MODE_DEFAULT;
static int anim_classes_last = ANIM_CLASS_NONE;
part->step_delay_value = graphic_info[control].step_delay;
part->state = ANIM_STATE_INACTIVE;
- part->last_game_status = -1;
+ part->last_anim_status = -1;
anim->num_parts++;
part_nr++;
part->step_delay_value = graphic_info[control].step_delay;
part->state = ANIM_STATE_INACTIVE;
- part->last_game_status = -1;
+ part->last_anim_status = -1;
if (p < GLOBAL_ANIM_ID_PART_BASE)
{
anim_class_game_modes[anim_class_game_modes_list[i].class_bit] =
anim_class_game_modes_list[i].game_mode;
- game_status_last = GAME_MODE_LOADING;
+ anim_status_last = GAME_MODE_LOADING;
anim_classes_last = ANIM_CLASS_NONE;
}
void DrawGlobalAnimExt(int drawing_stage)
{
- int anim_classes = game_mode_anim_classes[game_status];
+ int anim_classes = game_mode_anim_classes[global.anim_status_next];
int mode_nr;
int i;
// start or stop global animations by change of game mode
// (special handling of animations for "current screen" and "all screens")
- if (game_status != game_status_last)
+ if (global.anim_status != anim_status_last)
{
// stop animations for last screen
- HandleGlobalAnim(ANIM_STOP, game_status_last);
+ HandleGlobalAnim(ANIM_STOP, anim_status_last);
// start animations for current screen
- HandleGlobalAnim(ANIM_START, game_status);
+ HandleGlobalAnim(ANIM_START, global.anim_status);
// start animations for all screens after loading new artwork set
- if (game_status_last == GAME_MODE_LOADING)
+ if (anim_status_last == GAME_MODE_LOADING)
HandleGlobalAnim(ANIM_START, GAME_MODE_DEFAULT);
- game_status_last = game_status;
+ anim_status_last = global.anim_status;
}
// start or stop global animations by change of animation class
anim_classes_last = anim_classes;
}
- if (!setup.toons || game_status == GAME_MODE_LOADING)
+ if (!setup.toons || global.anim_status == GAME_MODE_LOADING)
return;
if (drawing_stage == DRAW_GLOBAL_ANIM_STAGE_1)
int viewport_height;
boolean changed = FALSE;
- if (part->last_game_status == game_status)
+ if (part->last_anim_status == global.anim_status)
return FALSE;
- part->last_game_status = game_status;
+ part->last_anim_status = global.anim_status;
part->drawing_stage = DRAW_GLOBAL_ANIM_STAGE_1;
{ ".TYPENAME", GFX_SPECIAL_ARG_TYPENAME, },
{ ".MENU", GFX_SPECIAL_ARG_MENU, },
{ ".TOONS", GFX_SPECIAL_ARG_TOONS, },
+ { ".FADING", GFX_SPECIAL_ARG_FADING, },
{ ".QUIT", GFX_SPECIAL_ARG_QUIT, },
/* empty suffix always matches -- check as last entry in InitMusicInfo() */
#define GFX_SPECIAL_ARG_TYPENAME 17
#define GFX_SPECIAL_ARG_MENU 18
#define GFX_SPECIAL_ARG_TOONS 19
-#define GFX_SPECIAL_ARG_QUIT 20
+#define GFX_SPECIAL_ARG_FADING 20
+#define GFX_SPECIAL_ARG_QUIT 21
-#define NUM_SPECIAL_GFX_ARGS 21
+#define NUM_SPECIAL_GFX_ARGS 22
/* these additional definitions are currently only used for draw offsets */
#define GFX_SPECIAL_ARG_INFO_MAIN 0
#define GAME_MODE_PSEUDO_TYPENAME 17
#define GAME_MODE_PSEUDO_MENU 18
#define GAME_MODE_PSEUDO_TOONS 19
-#define GAME_MODE_QUIT 20
+#define GAME_MODE_PSEUDO_FADING 20
+#define GAME_MODE_QUIT 21
-#define NUM_GAME_MODES 21
+#define NUM_GAME_MODES 22
/* special definitions currently only used for custom artwork configuration */
#define MUSIC_PREFIX_BACKGROUND 0
/* global values for fading screens and masking borders */
int border_status;
+ /* values for global animations */
+ int anim_status;
+ int anim_status_next;
+
boolean use_envelope_request;
};
FADE_SY = REAL_SY;
FADE_SXSIZE = FULL_SXSIZE;
FADE_SYSIZE = FULL_SYSIZE;
+
+ global.anim_status = global.anim_status_next;
}
void FadeOut(int fade_mask)
{
+ global.anim_status = GAME_MODE_PSEUDO_FADING;
+
#if 0
DrawMaskedBorder(REDRAW_ALL);
#endif
void SetGameStatus(int game_status_new)
{
game_status = game_status_new;
+
+ global.anim_status_next = game_status;
}
void ChangeViewportPropertiesIfNeeded()