}
}
-static void ResetGfxFrame(int x, int y, boolean redraw)
+static void ResetGfxFrame(int x, int y)
{
int element = Feld[x][y];
int graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]);
- int last_gfx_frame = GfxFrame[x][y];
if (graphic_info[graphic].anim_global_sync)
GfxFrame[x][y] = FrameCounter;
GfxFrame[x][y] = element_info[element].collect_score;
else if (ANIM_MODE(graphic) == ANIM_CE_DELAY)
GfxFrame[x][y] = ChangeDelay[x][y];
-
- if (redraw && GfxFrame[x][y] != last_gfx_frame)
- DrawLevelGraphicAnimation(x, y, graphic);
}
static void ResetGfxAnimation(int x, int y)
GfxDir[x][y] = MovDir[x][y];
GfxFrame[x][y] = 0;
- ResetGfxFrame(x, y, FALSE);
+ ResetGfxFrame(x, y);
}
static void ResetRandomAnimationValue(int x, int y)
if (MovDelay[x][y])
GfxAction[x][y] = ACTION_TURNING_FROM_LEFT + MV_DIR_TO_BIT(direction);
- ResetGfxFrame(x, y, FALSE);
+ ResetGfxFrame(x, y);
}
static boolean JustBeingPushed(int x, int y)
void GameActions_RND()
{
int magic_wall_x = 0, magic_wall_y = 0;
- int i, x, y, element, graphic;
+ int i, x, y, element, graphic, last_gfx_frame;
InitPlayfieldScanModeVars();
{
element = Feld[x][y];
graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]);
+ last_gfx_frame = GfxFrame[x][y];
+
+ ResetGfxFrame(x, y);
- ResetGfxFrame(x, y, TRUE);
+ if (GfxFrame[x][y] != last_gfx_frame)
+ DrawLevelGraphicAnimation(x, y, graphic);
if (ANIM_MODE(graphic) == ANIM_RANDOM &&
IS_NEXT_FRAME(GfxFrame[x][y], graphic))