X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Ftoons.c;h=34fa8fbb675f157256375535116f9938538f239e;hb=b2e74ef7ae9ca5c6f198afc177b7a6412079f10e;hp=c9bf81ccf0eb54d3de8dd65cb6c53e941173f02a;hpb=14d7691c65ca4a466ce9b9448153e8fbe8351a81;p=rocksndiamonds.git diff --git a/src/libgame/toons.c b/src/libgame/toons.c index c9bf81cc..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; @@ -159,6 +153,9 @@ void DrawAnim(Bitmap *toon_bitmap, int src_x, int src_y, int width, int height, BlitBitmap(screen_info.save_buffer, backbuffer, buffer_x, buffer_y, pad_width, pad_height, pad_dest_x, pad_dest_y); + + /* prevent immediate redraw of restored toon area in backbuffer */ + redraw_mask = REDRAW_NONE; } boolean AnimateToon(int toon_nr, boolean restart) @@ -352,7 +349,7 @@ void HandleAnimation(int mode) case ANIM_STOP: if (anim_running) { - redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER); + redraw_mask |= REDRAW_FIELD; screen_info.update_function(); @@ -382,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); -}