return;
}
- if (Feld[x][y] == EL_BLOCKED &&
- (Store[oldx][oldy] == EL_MORAST_LEER ||
- Store[oldx][oldy] == EL_MAGIC_WALL_EMPTY ||
+ if (Feld[x][y] == EL_BLOCKED && Feld[oldx][oldy] == EL_QUICKSAND_EMPTYING)
+ {
+ Feld[oldx][oldy] = EL_MORAST_LEER;
+ Store[oldx][oldy] = Store2[oldx][oldy] = 0;
+ }
+ else if (Feld[x][y] == EL_BLOCKED &&
+ (Store[oldx][oldy] == EL_MAGIC_WALL_EMPTY ||
Store[oldx][oldy] == EL_MAGIC_WALL_BD_EMPTY ||
Store[oldx][oldy] == EL_AMOEBE_NASS))
{
if (IS_FREE(x, y+1))
{
InitMovingField(x, y, MV_DOWN);
- Feld[x][y] = EL_FELSBROCKEN;
- Store[x][y] = EL_MORAST_LEER;
+ Feld[x][y] = EL_QUICKSAND_EMPTYING;
+ Store[x][y] = EL_FELSBROCKEN;
}
else if (Feld[x][y+1] == EL_MORAST_LEER)
{
Feld[x][y] = EL_MORAST_LEER;
Feld[x][y+1] = EL_MORAST_VOLL;
+ Store[x][y+1] = Store[x][y];
+ Store[x][y] = 0;
}
}
else if ((element == EL_FELSBROCKEN || element == EL_BD_ROCK) &&
Feld[x][y+1] == EL_MORAST_LEER)
{
InitMovingField(x, y, MV_DOWN);
- Store[x][y] = EL_MORAST_VOLL;
+ Feld[x][y] = EL_QUICKSAND_FILLING;
+ Store[x][y] = element;
}
else if (element == EL_MAGIC_WALL_FULL)
{
/* Store[x][y+1] must be zero, because:
(EL_MORAST_VOLL -> EL_FELSBROCKEN): Store[x][y+1] == EL_MORAST_LEER
*/
+#if 0
#if OLD_GAME_BEHAVIOUR
else if (IS_SLIPPERY(Feld[x][y+1]) && !Store[x][y+1])
#else
else if (IS_SLIPPERY(Feld[x][y+1]) && !Store[x][y+1] &&
!IS_FALLING(x, y+1) && !JustStopped[x][y+1] &&
element != EL_DX_SUPABOMB)
+#endif
+#else
+ else if (IS_SLIPPERY(Feld[x][y+1]) &&
+ !IS_FALLING(x, y+1) && !JustStopped[x][y+1] &&
+ element != EL_DX_SUPABOMB)
#endif
{
boolean left = (x>0 && IS_FREE(x-1, y) &&
if (element == EL_TROPFEN)
step /= 2;
- else if (Store[x][y] == EL_MORAST_VOLL || Store[x][y] == EL_MORAST_LEER)
+ else if (element == EL_QUICKSAND_FILLING || element == EL_QUICKSAND_EMPTYING)
step /= 4;
else if (CAN_FALL(element) && horiz_move &&
y < lev_fieldy-1 && IS_BELT(Feld[x][y+1]))
}
}
- if (Store[x][y] == EL_MORAST_VOLL)
+ if (element == EL_QUICKSAND_FILLING)
{
+ element = Feld[newx][newy] = EL_MORAST_VOLL;
+ Store[newx][newy] = Store[x][y];
Store[x][y] = 0;
- Feld[newx][newy] = EL_MORAST_VOLL;
- element = EL_MORAST_VOLL;
}
- else if (Store[x][y] == EL_MORAST_LEER)
+ else if (element == EL_QUICKSAND_EMPTYING)
{
- Store[x][y] = 0;
Feld[x][y] = EL_MORAST_LEER;
+ element = Feld[newx][newy] = Store[x][y];
+ Store[x][y] = 0;
}
else if (Store[x][y] == EL_MAGIC_WALL_FULL)
{
void DrawScreenField(int x, int y)
{
int ux = LEVELX(x), uy = LEVELY(y);
- int element;
+ int element, content;
if (!IN_LEV_FIELD(ux, uy))
{
}
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 (Store[ux][uy] == EL_MORAST_LEER ||
- Store[ux][uy] == EL_MAGIC_WALL_EMPTY ||
- Store[ux][uy] == EL_MAGIC_WALL_BD_EMPTY ||
- Store[ux][uy] == EL_AMOEBE_NASS)
+ if (element == EL_QUICKSAND_EMPTYING ||
+ content == EL_MAGIC_WALL_EMPTY ||
+ content == EL_MAGIC_WALL_BD_EMPTY ||
+ content == EL_AMOEBE_NASS)
cut_mode = CUT_ABOVE;
- else if (Store[ux][uy] == EL_MORAST_VOLL ||
- Store[ux][uy] == EL_MAGIC_WALL_FULL ||
- Store[ux][uy] == EL_MAGIC_WALL_BD_FULL)
+ else if (element == EL_QUICKSAND_FILLING ||
+ content == EL_MAGIC_WALL_FULL ||
+ content == EL_MAGIC_WALL_BD_FULL)
cut_mode = CUT_BELOW;
if (cut_mode == CUT_ABOVE)
- DrawScreenElementShifted(x, y, 0, 0, Store[ux][uy], NO_CUTTING);
+ {
+ if (element == EL_QUICKSAND_EMPTYING)
+ DrawScreenElementShifted(x, y, 0, 0, element, NO_CUTTING);
+ else
+ DrawScreenElementShifted(x, y, 0, 0, content, NO_CUTTING);
+ }
else
DrawScreenElement(x, y, EL_LEERRAUM);
if (horiz_move)
DrawScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING);
else
- DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode);
+ {
+ if (element == EL_QUICKSAND_FILLING || element == EL_QUICKSAND_EMPTYING)
+ DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode);
+ else
+ DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode);
+ }
- if (Store[ux][uy] == EL_SALZSAEURE)
+ if (content == EL_SALZSAEURE)
DrawLevelElementThruMask(ux, uy + 1, EL_SALZSAEURE);
}
else if (IS_BLOCKED(ux, uy))
int sx, sy;
int horiz_move;
boolean cut_mode = NO_CUTTING;
+ int element_old, content_old;
Blocked2Moving(ux, uy, &oldx, &oldy);
sx = SCREENX(oldx);
horiz_move = (MovDir[oldx][oldy] == MV_LEFT ||
MovDir[oldx][oldy] == MV_RIGHT);
- if (Store[oldx][oldy] == EL_MORAST_LEER ||
- Store[oldx][oldy] == EL_MAGIC_WALL_EMPTY ||
- Store[oldx][oldy] == EL_MAGIC_WALL_BD_EMPTY ||
- Store[oldx][oldy] == EL_AMOEBE_NASS)
+ element_old = Feld[oldx][oldy];
+ content_old = Store[oldx][oldy];
+
+ if (element_old == EL_QUICKSAND_EMPTYING ||
+ content_old == EL_MAGIC_WALL_EMPTY ||
+ content_old == EL_MAGIC_WALL_BD_EMPTY ||
+ content_old == EL_AMOEBE_NASS)
cut_mode = CUT_ABOVE;
DrawScreenElement(x, y, EL_LEERRAUM);
- element = Feld[oldx][oldy];
if (horiz_move)
- DrawScreenElementShifted(sx,sy, MovPos[oldx][oldy],0,element,NO_CUTTING);
+ DrawScreenElementShifted(sx, sy, MovPos[oldx][oldy], 0, element_old,
+ NO_CUTTING);
else
- DrawScreenElementShifted(sx,sy, 0,MovPos[oldx][oldy],element,cut_mode);
+ {
+ if (element_old == EL_QUICKSAND_EMPTYING)
+ DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old,
+ cut_mode);
+ else
+ DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old,
+ cut_mode);
+ }
}
else if (IS_DRAWABLE(element))
DrawScreenElement(x, y, element);
case EL_DIAMANT: return GFX_DIAMANT;
case EL_MORAST_LEER: return GFX_MORAST_LEER;
case EL_MORAST_VOLL: return GFX_MORAST_VOLL;
+ case EL_QUICKSAND_EMPTYING: return GFX_MORAST_LEER;
case EL_TROPFEN: return GFX_TROPFEN;
case EL_BOMBE: return GFX_BOMBE;
case EL_MAGIC_WALL_OFF: return GFX_MAGIC_WALL_OFF;