From: Holger Schemel Date: Sat, 15 Apr 2006 00:07:00 +0000 (+0200) Subject: rnd-20060415-1-src X-Git-Tag: 3.2.0^2~33 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;ds=sidebyside;h=44051f2e9b98cc3cf5e065616ef0c7569262dd06;p=rocksndiamonds.git rnd-20060415-1-src * fixed bug with displaying wrong animation frame 0 after CE changes --- diff --git a/ChangeLog b/ChangeLog index f0745cf8..135acdfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-04-15 + * fixed bug with displaying wrong animation frame 0 after CE changes + 2006-04-06 * added selection between ECS and AGA graphics for EMC levels to setup diff --git a/src/conftime.h b/src/conftime.h index 8fc5c7a6..d11440cc 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-04-07 01:18]" +#define COMPILE_DATE_STRING "[2006-04-15 01:54]" diff --git a/src/game.c b/src/game.c index d78023fd..bf409f08 100644 --- a/src/game.c +++ b/src/game.c @@ -41,6 +41,7 @@ #define USE_STOP_CHANGED_ELEMENTS (USE_NEW_STUFF * 1) #define USE_ELEMENT_TOUCHING_BUGFIX (USE_NEW_STUFF * 1) #define USE_NEW_CONTINUOUS_SNAPPING (USE_NEW_STUFF * 1) +#define USE_GFX_RESET_GFX_ANIMATION (USE_NEW_STUFF * 1) #define USE_QUICKSAND_IMPACT_BUGFIX (USE_NEW_STUFF * 0) @@ -3018,7 +3019,7 @@ static void ResetRandomAnimationValue(int x, int y) static void ResetGfxAnimation(int x, int y) { -#if 0 +#if USE_GFX_RESET_GFX_ANIMATION int element, graphic; #endif @@ -3026,7 +3027,7 @@ static void ResetGfxAnimation(int x, int y) GfxAction[x][y] = ACTION_DEFAULT; GfxDir[x][y] = MovDir[x][y]; -#if 0 +#if USE_GFX_RESET_GFX_ANIMATION element = Feld[x][y]; graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]); @@ -8325,8 +8326,10 @@ static void CreateFieldExt(int x, int y, int element, boolean is_change) Feld[x][y] = new_element; +#if !USE_GFX_RESET_GFX_ANIMATION ResetGfxAnimation(x, y); ResetRandomAnimationValue(x, y); +#endif if (element_info[new_element].move_direction_initial == MV_START_PREVIOUS) MovDir[x][y] = previous_move_direction; @@ -8340,6 +8343,11 @@ static void CreateFieldExt(int x, int y, int element, boolean is_change) new_element = Feld[x][y]; /* element may have changed */ +#if USE_GFX_RESET_GFX_ANIMATION + ResetGfxAnimation(x, y); + ResetRandomAnimationValue(x, y); +#endif + DrawLevelField(x, y); if (GFX_CRUMBLED(new_element)) diff --git a/src/tools.c b/src/tools.c index 1c02798b..b6e9f10a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -503,6 +503,17 @@ inline int getGraphicAnimationFrame(int graphic, int sync_frame) if (graphic_info[graphic].anim_global_sync || sync_frame < 0) sync_frame = FrameCounter; +#if 0 + if (graphic == element_info[EL_CUSTOM_START + 255].graphic[ACTION_DEFAULT] && + sync_frame == 0 && + FrameCounter > 10) + { + int x = 1 / 0; + + printf("::: FOO!\n"); + } +#endif + return getAnimationFrame(graphic_info[graphic].anim_frames, graphic_info[graphic].anim_delay, graphic_info[graphic].anim_mode,