From: Holger Schemel Date: Sat, 20 Jan 2001 18:38:52 +0000 (+0100) Subject: rnd-20010120-3-src X-Git-Tag: 2.0.1^2~27 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a03cba579681d7e84e8d85549518ddc7e1dc2f63;p=rocksndiamonds.git rnd-20010120-3-src --- diff --git a/src/game.c b/src/game.c index af833f15..6925cfae 100644 --- a/src/game.c +++ b/src/game.c @@ -1196,15 +1196,21 @@ void RemoveMovingField(int x, int y) return; } - if (Feld[x][y] == EL_BLOCKED && Feld[oldx][oldy] == EL_QUICKSAND_EMPTYING) - { - Feld[oldx][oldy] = EL_MORAST_LEER; + 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] = (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_MAGIC_WALL_EMPTY || - Store[oldx][oldy] == EL_MAGIC_WALL_BD_EMPTY || - Store[oldx][oldy] == EL_AMOEBE_NASS)) + Store[oldx][oldy] == EL_AMOEBE_NASS) { Feld[oldx][oldy] = Store[oldx][oldy]; Store[oldx][oldy] = Store2[oldx][oldy] = 0; @@ -2492,8 +2498,8 @@ void StartMoving(int x, int y) if (IS_FREE(x, y+1)) { InitMovingField(x, y, MV_DOWN); - Feld[x][y] = EL_CHANGED(Store2[x][y]); - Store[x][y] = EL_MAGIC_WALL_EMPTY; + Feld[x][y] = EL_MAGIC_WALL_EMPTYING; + Store[x][y] = EL_CHANGED(Store[x][y]); } else if (Feld[x][y+1] == EL_MAGIC_WALL_EMPTY) { @@ -2509,8 +2515,8 @@ void StartMoving(int x, int y) Feld[x][y] = EL_MAGIC_WALL_EMPTY; Feld[x][y+1] = EL_MAGIC_WALL_FULL; - Store2[x][y+1] = EL_CHANGED(Store2[x][y]); - Store2[x][y] = 0; + Store[x][y+1] = EL_CHANGED(Store[x][y]); + Store[x][y] = 0; } } else if (element == EL_MAGIC_WALL_BD_FULL) @@ -2518,8 +2524,8 @@ void StartMoving(int x, int y) if (IS_FREE(x, y+1)) { InitMovingField(x, y, MV_DOWN); - Feld[x][y] = EL_CHANGED2(Store2[x][y]); - Store[x][y] = EL_MAGIC_WALL_BD_EMPTY; + Feld[x][y] = EL_MAGIC_WALL_BD_EMPTYING; + Store[x][y] = EL_CHANGED2(Store[x][y]); } else if (Feld[x][y+1] == EL_MAGIC_WALL_BD_EMPTY) { @@ -2535,8 +2541,8 @@ void StartMoving(int x, int y) Feld[x][y] = EL_MAGIC_WALL_BD_EMPTY; Feld[x][y+1] = EL_MAGIC_WALL_BD_FULL; - Store2[x][y+1] = EL_CHANGED2(Store2[x][y]); - Store2[x][y] = 0; + Store[x][y+1] = EL_CHANGED2(Store[x][y]); + Store[x][y] = 0; } } else if (CAN_CHANGE(element) && @@ -2544,10 +2550,10 @@ void StartMoving(int x, int y) Feld[x][y+1] == EL_MAGIC_WALL_BD_EMPTY)) { InitMovingField(x, y, MV_DOWN); - Store[x][y] = - (Feld[x][y+1] == EL_MAGIC_WALL_EMPTY ? EL_MAGIC_WALL_FULL : - EL_MAGIC_WALL_BD_FULL); - Store2[x][y+1] = element; + Feld[x][y] = + (Feld[x][y+1] == EL_MAGIC_WALL_EMPTY ? EL_MAGIC_WALL_FILLING : + EL_MAGIC_WALL_BD_FILLING); + Store[x][y] = element; } else if (CAN_SMASH(element) && Feld[x][y+1] == EL_SALZSAEURE) { @@ -2942,8 +2948,14 @@ void ContinueMoving(int x, int y) if (element == EL_TROPFEN) step /= 2; - else if (element == EL_QUICKSAND_FILLING || element == EL_QUICKSAND_EMPTYING) + else if (element == EL_QUICKSAND_FILLING || + element == EL_QUICKSAND_EMPTYING) step /= 4; + else if (element == EL_MAGIC_WALL_FILLING || + element == EL_MAGIC_WALL_BD_FILLING || + element == EL_MAGIC_WALL_EMPTYING || + element == EL_MAGIC_WALL_BD_EMPTYING) + step /= 2; else if (CAN_FALL(element) && horiz_move && y < lev_fieldy-1 && IS_BELT(Feld[x][y+1])) step /= 2; @@ -3000,30 +3012,34 @@ void ContinueMoving(int x, int y) element = Feld[newx][newy] = Store[x][y]; Store[x][y] = 0; } - else if (Store[x][y] == EL_MAGIC_WALL_FULL) + else if (element == EL_MAGIC_WALL_FILLING) { - Store[x][y] = 0; element = Feld[newx][newy] = (game.magic_wall_active ? EL_MAGIC_WALL_FULL : EL_MAGIC_WALL_DEAD); + Store[newx][newy] = Store[x][y]; + Store[x][y] = 0; } - else if (Store[x][y] == EL_MAGIC_WALL_EMPTY) + else if (element == EL_MAGIC_WALL_EMPTYING) { - Store[x][y] = Store2[x][y] = 0; Feld[x][y] = (game.magic_wall_active ? EL_MAGIC_WALL_EMPTY : EL_MAGIC_WALL_DEAD); + element = Feld[newx][newy] = Store[x][y]; + Store[x][y] = 0; } - else if (Store[x][y] == EL_MAGIC_WALL_BD_FULL) + else if (element == EL_MAGIC_WALL_BD_FILLING) { - Store[x][y] = 0; element = Feld[newx][newy] = (game.magic_wall_active ? EL_MAGIC_WALL_BD_FULL : EL_MAGIC_WALL_BD_DEAD); + Store[newx][newy] = Store[x][y]; + Store[x][y] = 0; } - else if (Store[x][y] == EL_MAGIC_WALL_BD_EMPTY) + else if (element == EL_MAGIC_WALL_BD_EMPTYING) { - Store[x][y] = Store2[x][y] = 0; Feld[x][y] = (game.magic_wall_active ? EL_MAGIC_WALL_BD_EMPTY : EL_MAGIC_WALL_BD_DEAD); + element = Feld[newx][newy] = Store[x][y]; + Store[x][y] = 0; } else if (Store[x][y] == EL_SALZSAEURE) { @@ -4484,15 +4500,16 @@ void GameActions() boolean sieb = FALSE; int jx = local_player->jx, jy = local_player->jy; - if (element == EL_MAGIC_WALL_EMPTY || element == EL_MAGIC_WALL_FULL || - Store[x][y] == EL_MAGIC_WALL_EMPTY) + if (element == EL_MAGIC_WALL_FULL || + element == EL_MAGIC_WALL_EMPTY || + element == EL_MAGIC_WALL_EMPTYING) { SiebAktivieren(x, y, 1); sieb = TRUE; } - else if (element == EL_MAGIC_WALL_BD_EMPTY || - element == EL_MAGIC_WALL_BD_FULL || - Store[x][y] == EL_MAGIC_WALL_BD_EMPTY) + else if (element == EL_MAGIC_WALL_BD_FULL || + element == EL_MAGIC_WALL_BD_EMPTY || + element == EL_MAGIC_WALL_BD_EMPTYING) { SiebAktivieren(x, y, 2); sieb = TRUE; @@ -4521,7 +4538,8 @@ void GameActions() { element = Feld[x][y]; - if (element == EL_MAGIC_WALL_EMPTY || element == EL_MAGIC_WALL_FULL) + if (element == EL_MAGIC_WALL_EMPTY || + element == EL_MAGIC_WALL_FULL) { Feld[x][y] = EL_MAGIC_WALL_DEAD; DrawLevelField(x, y); diff --git a/src/main.h b/src/main.h index 4e68b379..f82ff333 100644 --- a/src/main.h +++ b/src/main.h @@ -907,8 +907,9 @@ extern int num_element_info; #define EL_TRAP_ACTIVE 522 #define EL_SPRING_MOVING 523 #define EL_SP_MURPHY_CLONE 524 -#define EL_QUICKSAND_FILLING 525 -#define EL_QUICKSAND_EMPTYING 526 +#define EL_QUICKSAND_EMPTYING 525 +#define EL_MAGIC_WALL_EMPTYING 526 +#define EL_MAGIC_WALL_BD_EMPTYING 527 /* "unreal" (and therefore not drawable) runtime elements */ #define EL_BLOCKED 600 @@ -921,6 +922,9 @@ extern int num_element_info; #define EL_MAUERND 607 #define EL_BURNING 608 #define EL_PLAYER_IS_LEAVING 609 +#define EL_QUICKSAND_FILLING 610 +#define EL_MAGIC_WALL_FILLING 611 +#define EL_MAGIC_WALL_BD_FILLING 612 /* game graphics: ** 0 - 255: graphics from "RocksScreen" diff --git a/src/tools.c b/src/tools.c index f7a67afb..14fb4197 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1127,7 +1127,9 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, } } else if (element == EL_MAGIC_WALL_EMPTY || + element == EL_MAGIC_WALL_EMPTYING || element == EL_MAGIC_WALL_BD_EMPTY || + element == EL_MAGIC_WALL_BD_EMPTYING || element == EL_MAGIC_WALL_FULL || element == EL_MAGIC_WALL_BD_FULL) { @@ -1358,18 +1360,20 @@ void DrawScreenField(int x, int y) boolean cut_mode = NO_CUTTING; if (element == EL_QUICKSAND_EMPTYING || - content == EL_MAGIC_WALL_EMPTY || - content == EL_MAGIC_WALL_BD_EMPTY || + element == EL_MAGIC_WALL_EMPTYING || + element == EL_MAGIC_WALL_BD_EMPTYING || content == EL_AMOEBE_NASS) cut_mode = CUT_ABOVE; else if (element == EL_QUICKSAND_FILLING || - content == EL_MAGIC_WALL_FULL || - content == EL_MAGIC_WALL_BD_FULL) + element == EL_MAGIC_WALL_FILLING || + element == EL_MAGIC_WALL_BD_FILLING) cut_mode = CUT_BELOW; if (cut_mode == CUT_ABOVE) { - if (element == EL_QUICKSAND_EMPTYING) + 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); @@ -1381,7 +1385,12 @@ void DrawScreenField(int x, int y) DrawScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING); else { - if (element == EL_QUICKSAND_FILLING || element == EL_QUICKSAND_EMPTYING) + 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); @@ -1408,8 +1417,8 @@ void DrawScreenField(int x, int y) content_old = Store[oldx][oldy]; if (element_old == EL_QUICKSAND_EMPTYING || - content_old == EL_MAGIC_WALL_EMPTY || - content_old == EL_MAGIC_WALL_BD_EMPTY || + element_old == EL_MAGIC_WALL_EMPTYING || + element_old == EL_MAGIC_WALL_BD_EMPTYING || content_old == EL_AMOEBE_NASS) cut_mode = CUT_ABOVE; @@ -1420,7 +1429,9 @@ void DrawScreenField(int x, int y) NO_CUTTING); else { - if (element_old == EL_QUICKSAND_EMPTYING) + 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 @@ -2415,6 +2426,7 @@ int el2gfx(int element) case EL_BOMBE: return GFX_BOMBE; case EL_MAGIC_WALL_OFF: return GFX_MAGIC_WALL_OFF; case EL_MAGIC_WALL_EMPTY: return GFX_MAGIC_WALL_EMPTY; + case EL_MAGIC_WALL_EMPTYING:return GFX_MAGIC_WALL_EMPTY; case EL_MAGIC_WALL_FULL: return GFX_MAGIC_WALL_FULL; case EL_MAGIC_WALL_DEAD: return GFX_MAGIC_WALL_DEAD; case EL_SALZSAEURE: return GFX_SALZSAEURE; @@ -2476,6 +2488,7 @@ int el2gfx(int element) case EL_MAMPFER2: return GFX_MAMPFER2; case EL_MAGIC_WALL_BD_OFF: return GFX_MAGIC_WALL_BD_OFF; case EL_MAGIC_WALL_BD_EMPTY:return GFX_MAGIC_WALL_BD_EMPTY; + case EL_MAGIC_WALL_BD_EMPTYING:return GFX_MAGIC_WALL_BD_EMPTY; case EL_MAGIC_WALL_BD_FULL: return GFX_MAGIC_WALL_BD_FULL; case EL_MAGIC_WALL_BD_DEAD: return GFX_MAGIC_WALL_BD_DEAD; case EL_DYNABOMB_ACTIVE_1: return GFX_DYNABOMB;