X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fcartoons.c;h=bd00d1af01a6a04bc2dc9906a8dca6465a25f724;hb=41364660abbcb81a83f5018be3655352ecdf1ac9;hp=96ad97938182c11f9353ce87717f7ffeaf01ac57;hpb=833cc59e0cc1802432f21ddbaa763c99e541fafe;p=rocksndiamonds.git diff --git a/src/cartoons.c b/src/cartoons.c index 96ad9793..bd00d1af 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -107,8 +107,8 @@ void DoAnimation() void HandleAnimation(int mode) { - static long animstart_delay = -1; - static long animstart_delay_value = 0; + static unsigned long animstart_delay = -1; + static unsigned long animstart_delay_value = 0; static boolean anim_restart = TRUE; static boolean reset_delay = TRUE; static int toon_nr = 0; @@ -195,8 +195,8 @@ boolean AnimateToon(int toon_nr, boolean restart) static int delta_x = 0, delta_y = 0; static int frame = 0, frame_step = 1; static boolean horiz_move, vert_move; - static long anim_delay = 0; - static int anim_delay_value = 0; + static unsigned long anim_delay = 0; + static unsigned long anim_delay_value = 0; static int width,height; static int pad_x,pad_y; static int cut_x,cut_y; @@ -462,10 +462,12 @@ boolean AnimateToon(int toon_nr, boolean restart) if (!DelayReached(&anim_delay, anim_delay_value)) { - if (game_status==HELPSCREEN && !restart) - DrawAnim(anim_pixmap,anim_clip_gc, - src_x+cut_x,src_y+cut_y, width,height, - REAL_SX+dest_x,REAL_SY+dest_y, pad_x,pad_y); + if ((game_status == HELPSCREEN || + (game_status == MAINMENU && redraw_mask & REDRAW_MICROLEVEL)) + && !restart) + DrawAnim(anim_pixmap, anim_clip_gc, + src_x + cut_x, src_y + cut_y, width, height, + REAL_SX + dest_x, REAL_SY + dest_y, pad_x, pad_y); return(FALSE); }