-void DrawNewScreenField(int x, int y)
-{
- int ux = LEVELX(x), uy = LEVELY(y);
- int element, content;
-
- if (!IN_LEV_FIELD(ux, uy))
- {
- if (ux < -1 || ux > lev_fieldx || uy < -1 || uy > lev_fieldy)
- element = EL_EMPTY;
- else
- element = BorderElement;
-
- DrawNewScreenElement(x, y, element);
- return;
- }
-
- element = Feld[ux][uy];
- content = Store[ux][uy];
-
- if (IS_MOVING(ux, uy))
- {
- int horiz_move = (MovDir[ux][uy] == MV_LEFT || MovDir[ux][uy] == MV_RIGHT);
- boolean cut_mode = NO_CUTTING;
-
- if (element == EL_QUICKSAND_EMPTYING ||
- element == EL_MAGIC_WALL_EMPTYING ||
- element == EL_BD_MAGIC_WALL_EMPTYING ||
- element == EL_AMOEBA_DRIPPING)
- cut_mode = CUT_ABOVE;
- else if (element == EL_QUICKSAND_FILLING ||
- element == EL_MAGIC_WALL_FILLING ||
- element == EL_BD_MAGIC_WALL_FILLING)
- cut_mode = CUT_BELOW;
-
- if (cut_mode == CUT_ABOVE)
- DrawNewScreenElementShifted(x, y, 0, 0, element, NO_CUTTING);
- else
- DrawNewScreenElement(x, y, EL_EMPTY);
-
- if (horiz_move)
- DrawNewScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING);
- else if (cut_mode == NO_CUTTING)
- DrawNewScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode);
- else
- DrawNewScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode);
-
- if (content == EL_ACID)
- DrawNewLevelElementThruMask(ux, uy + 1, EL_ACID);
- }
- else if (IS_BLOCKED(ux, uy))
- {
- int oldx, oldy;
- int sx, sy;
- int horiz_move;
- boolean cut_mode = NO_CUTTING;
- int element_old, content_old;
-
- Blocked2Moving(ux, uy, &oldx, &oldy);
- sx = SCREENX(oldx);
- sy = SCREENY(oldy);
- horiz_move = (MovDir[oldx][oldy] == MV_LEFT ||
- MovDir[oldx][oldy] == MV_RIGHT);
-
- element_old = Feld[oldx][oldy];
- content_old = Store[oldx][oldy];
-
- if (element_old == EL_QUICKSAND_EMPTYING ||
- element_old == EL_MAGIC_WALL_EMPTYING ||
- element_old == EL_BD_MAGIC_WALL_EMPTYING ||
- element_old == EL_AMOEBA_DRIPPING)
- cut_mode = CUT_ABOVE;
-
- DrawNewScreenElement(x, y, EL_EMPTY);
-
- if (horiz_move)
- DrawNewScreenElementShifted(sx, sy, MovPos[oldx][oldy], 0, element_old,
- NO_CUTTING);
- else if (cut_mode == NO_CUTTING)
- DrawNewScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old,
- cut_mode);
- else
- DrawNewScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old,
- cut_mode);
- }
- else if (IS_DRAWABLE(element))
- DrawNewScreenElement(x, y, element);
- else
- DrawNewScreenElement(x, y, EL_EMPTY);
-}
-