X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fcartoons.c;h=07394acdb9538591a3cfb0a7c801b42398b7cd23;hp=44242e8753fad73e83a23599efb9283a4e905a4a;hb=8d46c5298f0fcce7bdb52f3835b2fbbdc403dfe0;hpb=2357c391b4a587709627cc30316734b3c83c8134 diff --git a/src/cartoons.c b/src/cartoons.c index 44242e87..07394acd 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; @@ -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; @@ -310,8 +310,8 @@ boolean AnimateToon(int toon_nr, boolean restart) }, { GAMETOON_XSIZE, GAMETOON_YSIZE, - ((GFX_MAULWURF_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX, - ((GFX_MAULWURF_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY, + ((GFX_MOLE_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX, + ((GFX_MOLE_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY, GAMETOON_FRAMES_4, GAMETOON_FPS, GAMETOON_STEPSIZE, @@ -321,8 +321,8 @@ boolean AnimateToon(int toon_nr, boolean restart) }, { GAMETOON_XSIZE, GAMETOON_YSIZE, - ((GFX_MAULWURF_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX, - ((GFX_MAULWURF_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY, + ((GFX_MOLE_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX, + ((GFX_MOLE_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY, GAMETOON_FRAMES_4, GAMETOON_FPS, GAMETOON_STEPSIZE, @@ -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); }