SetTileCursorXY(laser.start_edge.x, laser.start_edge.y);
SetTileCursorActive(TRUE);
+ // restart all delay counters after initially cycling game elements
+ ResetFrameCounter(&rotate_delay);
+ ResetFrameCounter(&pacman_delay);
ResetFrameCounter(&energy_delay);
+ ResetFrameCounter(&overload_delay);
}
static void FadeOutLaser(void)
}
static void DrawFieldAnimated_MM(int x, int y)
+{
+ DrawField_MM(x, y);
+
+ laser.redraw = TRUE;
+}
+
+static void DrawFieldAnimatedIfNeeded_MM(int x, int y)
{
int element = Tile[x][y];
+ int graphic = el2gfx(element);
- if (IS_BLOCKED(x, y))
+ if (!getGraphicInfo_NewFrame(x, y, graphic))
return;
DrawField_MM(x, y);
- if (IS_MIRROR(element) ||
- IS_MIRROR_FIXED(element) ||
- element == EL_PRISM)
+ laser.redraw = TRUE;
+}
+
+static void DrawFieldTwinkle(int x, int y)
+{
+ if (MovDelay[x][y] != 0) // wait some time before next frame
{
- if (MovDelay[x][y] != 0) // wait some time before next frame
- {
- MovDelay[x][y]--;
+ MovDelay[x][y]--;
- if (MovDelay[x][y] != 0)
- {
- int graphic = IMG_TWINKLE_WHITE;
- int frame = getGraphicAnimationFrame(graphic, 10 - MovDelay[x][y]);
+ DrawField_MM(x, y);
- DrawGraphicThruMask_MM(SCREENX(x), SCREENY(y), graphic, frame);
- }
+ if (MovDelay[x][y] != 0)
+ {
+ int graphic = IMG_TWINKLE_WHITE;
+ int frame = getGraphicAnimationFrame(graphic, 10 - MovDelay[x][y]);
+
+ DrawGraphicThruMask_MM(SCREENX(x), SCREENY(y), graphic, frame);
}
- }
- laser.redraw = TRUE;
+ laser.redraw = TRUE;
+ }
}
static void Explode_MM(int x, int y, int phase, int mode)
IS_POLAR(Tile[x][y]) ||
IS_POLAR_CROSS(Tile[x][y])) && x == ELX && y == ELY)
{
- check = 0;
-
if (IS_BEAMER(Tile[x][y]))
{
#if 0
LX, LY, laser.beamer_edge, laser.beamer[1].num);
#endif
-#if 0
- laser.num_edges--;
-#endif
+ if (check == 1)
+ laser.num_edges--;
}
ScanLaser();
+
+ check = 0;
}
if (check == 2)
MeltIce(x, y);
else if (IS_WALL_CHANGING(element) && Store[x][y] == EL_WALL_AMOEBA)
GrowAmoeba(x, y);
- else
+ else if (IS_MIRROR(element) ||
+ IS_MIRROR_FIXED(element) ||
+ element == EL_PRISM)
+ DrawFieldTwinkle(x, y);
+ else if (element == EL_GRAY_BALL_OPENING ||
+ element == EL_BOMB_ACTIVE ||
+ element == EL_MINE_ACTIVE)
DrawFieldAnimated_MM(x, y);
+ else if (!IS_BLOCKED(x, y))
+ DrawFieldAnimatedIfNeeded_MM(x, y);
}
AutoRotateMirrors();