projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improved forced restart of global animations when restarting game
[rocksndiamonds.git]
/
src
/
anim.c
diff --git
a/src/anim.c
b/src/anim.c
index 8b307ea4482f1c54d0a892ea4250b689cc04ec37..710383f3c608c03e4e3832fea3b13e6ab6cc3bbf 100644
(file)
--- a/
src/anim.c
+++ b/
src/anim.c
@@
-857,6
+857,10
@@
static void DrawGlobalAnimationsExt(int drawing_target, int drawing_stage)
}
}
}
}
+ // when restarting global animations, do not redraw them, but stop here
+ if (drawing_stage == DRAW_GLOBAL_ANIM_STAGE_RESTART)
+ return;
+
if (global.anim_status == GAME_MODE_LOADING)
return;
if (global.anim_status == GAME_MODE_LOADING)
return;
@@
-2155,7
+2159,7
@@
void RestartGlobalAnimsByStatus(int status)
global.anim_status = status;
// force restarting global animations by changed global animation status
global.anim_status = status;
// force restarting global animations by changed global animation status
-
SDLRedrawWindow(
);
+
DrawGlobalAnimationsExt(DRAW_TO_SCREEN, DRAW_GLOBAL_ANIM_STAGE_RESTART
);
global.anim_status = anim_status_last;
}
global.anim_status = anim_status_last;
}