From 29519e4b412b6fd0b2a18145f010f53ca09fa456 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 20 Jan 2016 20:17:47 +0100 Subject: [PATCH] small structural code change for global animations preparation --- src/cartoons.c | 19 +++++++++++++++++++ src/cartoons.h | 6 ++++++ src/events.c | 1 + src/init.c | 4 ---- src/libgame/toons.c | 21 --------------------- src/libgame/toons.h | 11 ++++++++--- 6 files changed, 34 insertions(+), 28 deletions(-) diff --git a/src/cartoons.c b/src/cartoons.c index a0115cf9..043bd562 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -71,3 +71,22 @@ void InitToons() REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, GAME_FRAME_DELAY); } + +void DrawGlobalAnim() +{ +} + +void InitAnimation() +{ + HandleAnimation(ANIM_START); +} + +void StopAnimation() +{ + HandleAnimation(ANIM_STOP); +} + +void DoAnimation() +{ + HandleAnimation(ANIM_CONTINUE); +} diff --git a/src/cartoons.h b/src/cartoons.h index b3c20192..a0290d1b 100644 --- a/src/cartoons.h +++ b/src/cartoons.h @@ -14,4 +14,10 @@ void InitToons(void); +void DrawGlobalAnim(void); + +void InitAnimation(void); +void StopAnimation(void); +void DoAnimation(void); + #endif diff --git a/src/events.c b/src/events.c index e82d3667..7282236f 100644 --- a/src/events.c +++ b/src/events.c @@ -19,6 +19,7 @@ #include "editor.h" #include "files.h" #include "tape.h" +#include "cartoons.h" #include "network.h" diff --git a/src/init.c b/src/init.c index 8dfd5f78..9493ab51 100644 --- a/src/init.c +++ b/src/init.c @@ -129,10 +129,6 @@ void DrawInitAnim() FrameCounter++; } -void DrawGlobalAnim() -{ -} - void FreeGadgets() { FreeLevelEditorGadgets(); diff --git a/src/libgame/toons.c b/src/libgame/toons.c index 3868bdb6..34fa8fbb 100644 --- a/src/libgame/toons.c +++ b/src/libgame/toons.c @@ -13,12 +13,6 @@ #include "misc.h" -/* values for toon animation */ -#define ANIM_START 0 -#define ANIM_CONTINUE 1 -#define ANIM_STOP 2 - - static struct ToonScreenInfo screen_info; @@ -385,18 +379,3 @@ void HandleAnimation(int mode) anim_restart = reset_delay = AnimateToon(toon_nr, anim_restart); } - -void InitAnimation() -{ - HandleAnimation(ANIM_START); -} - -void StopAnimation() -{ - HandleAnimation(ANIM_STOP); -} - -void DoAnimation() -{ - HandleAnimation(ANIM_CONTINUE); -} diff --git a/src/libgame/toons.h b/src/libgame/toons.h index 5dc52d02..449687cd 100644 --- a/src/libgame/toons.h +++ b/src/libgame/toons.h @@ -15,6 +15,12 @@ #include "system.h" +/* values for toon animation */ +#define ANIM_START 0 +#define ANIM_CONTINUE 1 +#define ANIM_STOP 2 + + struct ToonScreenInfo { Bitmap *save_buffer; @@ -55,8 +61,7 @@ void InitToonScreen(Bitmap *, void (*update_function)(void), void (*prepare_backbuffer_function)(void), boolean (*redraw_needed_function)(void), struct ToonInfo *, int, int, int, int, int, int); -void InitAnimation(void); -void StopAnimation(void); -void DoAnimation(void); + +void HandleAnimation(int); #endif /* TOONS_H */ -- 2.34.1