From: Holger Schemel Date: Sat, 18 Feb 2023 11:59:15 +0000 (+0100) Subject: added function to force restarting global animations X-Git-Tag: 4.3.5.1~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=6e82bad55aa0275be6b0aaa8faff735760408b6c;p=rocksndiamonds.git added function to force restarting global animations --- diff --git a/src/anim.c b/src/anim.c index 3393d939..3f0a727c 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1997,6 +1997,17 @@ static void ResetGlobalAnim_Clicked(void) InitGlobalAnim_Clicked(-1, -1, ANIM_CLICKED_RESET); } +void RestartGlobalAnims(void) +{ + int anim_status_last = global.anim_status; + + global.anim_status = GAME_MODE_LOADING; + + SDLRedrawWindow(); + + global.anim_status = anim_status_last; +} + boolean HandleGlobalAnimClicks(int mx, int my, int button, boolean force_click) { static boolean click_consumed = FALSE; diff --git a/src/anim.h b/src/anim.h index 3d0153c9..a1be4b06 100644 --- a/src/anim.h +++ b/src/anim.h @@ -18,6 +18,8 @@ int getAnimationFrame(int, int, int, int, int); void InitGlobalAnimations(void); void DrawGlobalAnimations(int, int); +void RestartGlobalAnims(void); + boolean HandleGlobalAnimClicks(int, int, int, boolean); int getGlobalAnimSyncFrame(void);