X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fcartoons.c;h=bd00d1af01a6a04bc2dc9906a8dca6465a25f724;hb=fd18ece8535cd87bd72989d7d39092d55b283939;hp=6b145d6d253097237e234b38723eb9718234704a;hpb=e5c5bf5c4a76a04f9bf64e92227bf2ef969fd25c;p=rocksndiamonds.git diff --git a/src/cartoons.c b/src/cartoons.c index 6b145d6d..bd00d1af 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -107,14 +107,14 @@ 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; int draw_mode; - if (!setup.toons_on) + if (!setup.toons) return; switch(mode) @@ -124,7 +124,7 @@ void HandleAnimation(int mode) reset_delay = TRUE; /* Fill empty backbuffer for animation functions */ - if (setup.direct_draw_on && game_status == PLAYING) + if (setup.direct_draw && game_status == PLAYING) { int xx,yy; @@ -138,7 +138,7 @@ void HandleAnimation(int mode) SetDrawtoField(DRAW_DIRECT); } - if (setup.soft_scrolling_on && game_status == PLAYING) + if (setup.soft_scrolling && game_status == PLAYING) { int fx = FX, fy = FY; @@ -158,12 +158,12 @@ void HandleAnimation(int mode) redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER); /* Redraw background even when in direct drawing mode */ - draw_mode = setup.direct_draw_on; - setup.direct_draw_on = FALSE; + draw_mode = setup.direct_draw; + setup.direct_draw = FALSE; BackToFront(); - setup.direct_draw_on = draw_mode; + setup.direct_draw = draw_mode; return; break; @@ -191,12 +191,12 @@ void HandleAnimation(int mode) boolean AnimateToon(int toon_nr, boolean restart) { - static pos_x = 0, pos_y = 0; - static delta_x = 0, delta_y = 0; + static int pos_x = 0, pos_y = 0; + 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); }