projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bafdb99
)
added function to force restarting global animations
author
Holger Schemel
<info@artsoft.org>
Sat, 18 Feb 2023 11:59:15 +0000
(12:59 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 18 Feb 2023 11:59:15 +0000
(12:59 +0100)
src/anim.c
patch
|
blob
|
history
src/anim.h
patch
|
blob
|
history
diff --git
a/src/anim.c
b/src/anim.c
index 3393d93912eef6cc0fb7e29cf1000c7cb157d8cd..3f0a727cf47f96aa22feb70efab694be8b98122b 100644
(file)
--- a/
src/anim.c
+++ b/
src/anim.c
@@
-1997,6
+1997,17
@@
static void ResetGlobalAnim_Clicked(void)
InitGlobalAnim_Clicked(-1, -1, ANIM_CLICKED_RESET);
}
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;
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 3d0153c99532c1c3ec8d23c9216d3c9128d932ea..a1be4b06122679300e62eaff686b233fe3119d54 100644
(file)
--- 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 InitGlobalAnimations(void);
void DrawGlobalAnimations(int, int);
+void RestartGlobalAnims(void);
+
boolean HandleGlobalAnimClicks(int, int, int, boolean);
int getGlobalAnimSyncFrame(void);
boolean HandleGlobalAnimClicks(int, int, int, boolean);
int getGlobalAnimSyncFrame(void);