From: Holger Schemel Date: Sat, 20 Jan 2001 19:27:41 +0000 (+0100) Subject: rnd-20010120-4-src X-Git-Tag: 2.0.1^2~26 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=091030459bbdc406295bcb6d9ecc431081ff03db;p=rocksndiamonds.git rnd-20010120-4-src --- diff --git a/src/game.c b/src/game.c index 6925cfae..7fa68505 100644 --- a/src/game.c +++ b/src/game.c @@ -1199,20 +1199,17 @@ void RemoveMovingField(int x, int y) if (Feld[x][y] == EL_BLOCKED && (Feld[oldx][oldy] == EL_QUICKSAND_EMPTYING || Feld[oldx][oldy] == EL_MAGIC_WALL_EMPTYING || - Feld[oldx][oldy] == EL_MAGIC_WALL_BD_EMPTYING)) + Feld[oldx][oldy] == EL_MAGIC_WALL_BD_EMPTYING || + Feld[oldx][oldy] == EL_AMOEBA_DRIPPING)) { Feld[oldx][oldy] = (Feld[oldx][oldy] == EL_QUICKSAND_EMPTYING ? EL_MORAST_LEER : Feld[oldx][oldy] == EL_MAGIC_WALL_EMPTYING ? EL_MAGIC_WALL_EMPTY : Feld[oldx][oldy] == EL_MAGIC_WALL_BD_EMPTYING ? - EL_MAGIC_WALL_BD_EMPTY : 0); - Store[oldx][oldy] = Store2[oldx][oldy] = 0; - } - else if (Feld[x][y] == EL_BLOCKED && - Store[oldx][oldy] == EL_AMOEBE_NASS) - { - Feld[oldx][oldy] = Store[oldx][oldy]; + EL_MAGIC_WALL_BD_EMPTY : + Feld[oldx][oldy] == EL_AMOEBA_DRIPPING ? + EL_AMOEBE_NASS : 0); Store[oldx][oldy] = Store2[oldx][oldy] = 0; } else @@ -2946,7 +2943,7 @@ void ContinueMoving(int x, int y) int newx = x + dx, newy = y + dy; int step = (horiz_move ? dx : dy) * TILEX / 8; - if (element == EL_TROPFEN) + if (element == EL_TROPFEN || element == EL_AMOEBA_DRIPPING) step /= 2; else if (element == EL_QUICKSAND_FILLING || element == EL_QUICKSAND_EMPTYING) @@ -3041,16 +3038,17 @@ void ContinueMoving(int x, int y) element = Feld[newx][newy] = Store[x][y]; Store[x][y] = 0; } - else if (Store[x][y] == EL_SALZSAEURE) + else if (element == EL_AMOEBA_DRIPPING) { + Feld[x][y] = EL_AMOEBE_NASS; + element = Feld[newx][newy] = Store[x][y]; Store[x][y] = 0; - Feld[newx][newy] = EL_SALZSAEURE; - element = EL_SALZSAEURE; } - else if (Store[x][y] == EL_AMOEBE_NASS) + else if (Store[x][y] == EL_SALZSAEURE) { Store[x][y] = 0; - Feld[x][y] = EL_AMOEBE_NASS; + Feld[newx][newy] = EL_SALZSAEURE; + element = EL_SALZSAEURE; } MovPos[x][y] = MovDir[x][y] = MovDelay[x][y] = 0; @@ -3450,8 +3448,8 @@ void AmoebeAbleger(int ax, int ay) else { InitMovingField(ax, ay, MV_DOWN); - Feld[ax][ay] = EL_TROPFEN; - Store[ax][ay] = EL_AMOEBE_NASS; + Feld[ax][ay] = EL_AMOEBA_DRIPPING; + Store[ax][ay] = EL_TROPFEN; ContinueMoving(ax, ay); return; } diff --git a/src/main.h b/src/main.h index f82ff333..8ac1161a 100644 --- a/src/main.h +++ b/src/main.h @@ -910,6 +910,7 @@ extern int num_element_info; #define EL_QUICKSAND_EMPTYING 525 #define EL_MAGIC_WALL_EMPTYING 526 #define EL_MAGIC_WALL_BD_EMPTYING 527 +#define EL_AMOEBA_DRIPPING 528 /* "unreal" (and therefore not drawable) runtime elements */ #define EL_BLOCKED 600 diff --git a/src/tools.c b/src/tools.c index 14fb4197..e1ec84bd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1135,7 +1135,7 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, { graphic += 3 + getGraphicAnimationPhase(4, 4, ANIM_REVERSE); } - else if (IS_AMOEBOID(element)) + else if (IS_AMOEBOID(element) || element == EL_AMOEBA_DRIPPING) { graphic = (element == EL_AMOEBE_TOT ? GFX_AMOEBE_TOT : GFX_AMOEBE_LEBT); graphic += (x + 2 * y + 4) % 4; @@ -1362,7 +1362,7 @@ void DrawScreenField(int x, int y) if (element == EL_QUICKSAND_EMPTYING || element == EL_MAGIC_WALL_EMPTYING || element == EL_MAGIC_WALL_BD_EMPTYING || - content == EL_AMOEBE_NASS) + element == EL_AMOEBA_DRIPPING) cut_mode = CUT_ABOVE; else if (element == EL_QUICKSAND_FILLING || element == EL_MAGIC_WALL_FILLING || @@ -1370,31 +1370,16 @@ void DrawScreenField(int x, int y) cut_mode = CUT_BELOW; if (cut_mode == CUT_ABOVE) - { - if (element == EL_QUICKSAND_EMPTYING || - element == EL_MAGIC_WALL_EMPTYING || - element == EL_MAGIC_WALL_BD_EMPTYING) - DrawScreenElementShifted(x, y, 0, 0, element, NO_CUTTING); - else - DrawScreenElementShifted(x, y, 0, 0, content, NO_CUTTING); - } + DrawScreenElementShifted(x, y, 0, 0, element, NO_CUTTING); else DrawScreenElement(x, y, EL_LEERRAUM); if (horiz_move) DrawScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING); + else if (cut_mode == NO_CUTTING) + DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode); else - { - if (element == EL_QUICKSAND_EMPTYING || - element == EL_MAGIC_WALL_EMPTYING || - element == EL_MAGIC_WALL_BD_EMPTYING || - element == EL_QUICKSAND_FILLING || - element == EL_MAGIC_WALL_FILLING || - element == EL_MAGIC_WALL_BD_FILLING) - DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode); - else - DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode); - } + DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode); if (content == EL_SALZSAEURE) DrawLevelElementThruMask(ux, uy + 1, EL_SALZSAEURE); @@ -1419,7 +1404,7 @@ void DrawScreenField(int x, int y) if (element_old == EL_QUICKSAND_EMPTYING || element_old == EL_MAGIC_WALL_EMPTYING || element_old == EL_MAGIC_WALL_BD_EMPTYING || - content_old == EL_AMOEBE_NASS) + element_old == EL_AMOEBA_DRIPPING) cut_mode = CUT_ABOVE; DrawScreenElement(x, y, EL_LEERRAUM); @@ -1427,17 +1412,12 @@ void DrawScreenField(int x, int y) if (horiz_move) DrawScreenElementShifted(sx, sy, MovPos[oldx][oldy], 0, element_old, NO_CUTTING); + else if (cut_mode == NO_CUTTING) + DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old, + cut_mode); else - { - if (element_old == EL_QUICKSAND_EMPTYING || - element_old == EL_MAGIC_WALL_EMPTYING || - element_old == EL_MAGIC_WALL_BD_EMPTYING) - DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old, - cut_mode); - else - DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old, - cut_mode); - } + DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old, + cut_mode); } else if (IS_DRAWABLE(element)) DrawScreenElement(x, y, element); @@ -2436,6 +2416,7 @@ int el2gfx(int element) case EL_AMOEBE_VOLL: return GFX_AMOEBE_VOLL; case EL_AMOEBE_BD: return GFX_AMOEBE_BD; case EL_AMOEBA2DIAM: return GFX_AMOEBA2DIAM; + case EL_AMOEBA_DRIPPING: return GFX_AMOEBE_NASS; case EL_KOKOSNUSS: return GFX_KOKOSNUSS; case EL_LIFE: return GFX_LIFE; case EL_LIFE_ASYNC: return GFX_LIFE_ASYNC;