projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added check if rendering to target texture is supported for SDL2
[rocksndiamonds.git]
/
src
/
cartoons.c
diff --git
a/src/cartoons.c
b/src/cartoons.c
index 2e74c72b92a5683da4063eb88a88ff1fd6381775..95b12ecb944bce0d4a9e10359704bc1e53ce1a5a 100644
(file)
--- a/
src/cartoons.c
+++ b/
src/cartoons.c
@@
-164,8
+164,6
@@
static struct GlobalAnimControlInfo global_anim_ctrl[NUM_GAME_MODES];
static struct ToonInfo toons[MAX_NUM_TOONS];
static unsigned int anim_sync_frame = 0;
static struct ToonInfo toons[MAX_NUM_TOONS];
static unsigned int anim_sync_frame = 0;
-static unsigned int anim_sync_frame_delay = 0;
-static unsigned int anim_sync_frame_delay_value = GAME_FRAME_DELAY;
static int game_mode_anim_classes[NUM_GAME_MODES];
static int anim_class_game_modes[NUM_ANIM_CLASSES];
static int game_mode_anim_classes[NUM_GAME_MODES];
static int anim_class_game_modes[NUM_ANIM_CLASSES];
@@
-354,8
+352,6
@@
void InitGlobalAnimControls()
anim_sync_frame = 0;
anim_sync_frame = 0;
- ResetDelayCounter(&anim_sync_frame_delay);
-
for (m = 0; m < NUM_GAME_MODES; m++)
{
mode_nr = m;
for (m = 0; m < NUM_GAME_MODES; m++)
{
mode_nr = m;
@@
-1111,14
+1107,6
@@
static void HandleGlobalAnim(int action, int game_mode)
HandleGlobalAnim_Mode(&global_anim_ctrl[game_mode], action);
}
HandleGlobalAnim_Mode(&global_anim_ctrl[game_mode], action);
}
-void InitAnimation()
-{
-}
-
-void StopAnimation()
-{
-}
-
static void DoAnimationExt()
{
int i;
static void DoAnimationExt()
{
int i;
@@
-1127,13
+1115,8
@@
static void DoAnimationExt()
printf("::: DoAnimation [%d, %d]\n", anim_sync_frame, Counter());
#endif
printf("::: DoAnimation [%d, %d]\n", anim_sync_frame, Counter());
#endif
-#if 1
- WaitUntilDelayReached(&anim_sync_frame_delay, anim_sync_frame_delay_value);
+ // global animations now synchronized with frame delay of screen update
anim_sync_frame++;
anim_sync_frame++;
-#else
- if (DelayReached(&anim_sync_frame_delay, anim_sync_frame_delay_value))
- anim_sync_frame++;
-#endif
for (i = 0; i < NUM_GAME_MODES; i++)
HandleGlobalAnim(ANIM_CONTINUE, i);
for (i = 0; i < NUM_GAME_MODES; i++)
HandleGlobalAnim(ANIM_CONTINUE, i);
@@
-1143,13
+1126,3
@@
static void DoAnimationExt()
redraw_mask = REDRAW_ALL;
#endif
}
redraw_mask = REDRAW_ALL;
#endif
}
-
-void DoAnimation()
-{
- // HandleAnimation(ANIM_CONTINUE);
-
-#if 1
- // force screen redraw in next frame to continue drawing global animations
- redraw_mask = REDRAW_ALL;
-#endif
-}