From: Holger Schemel Date: Sat, 21 Sep 2002 14:16:23 +0000 (+0200) Subject: rnd-20020921-5-src X-Git-Tag: 3.0.0^2~233 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b1aea9dea523d02f9539d7d85761861092ad4a83;p=rocksndiamonds.git rnd-20020921-5-src --- diff --git a/src/conftime.h b/src/conftime.h index 74c9728a..39b701d2 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-09-21 15:51]" +#define COMPILE_DATE_STRING "[2002-09-21 16:16]" diff --git a/src/game.c b/src/game.c index beabbab2..725f69b7 100644 --- a/src/game.c +++ b/src/game.c @@ -1996,6 +1996,20 @@ static void ToggleSwitchgateSwitch(int x, int y) } } +static int getInvisibleActiveFromInvisibleElement(int element) +{ + return (element == EL_INVISIBLE_STEELWALL ? EL_INVISIBLE_STEELWALL_ACTIVE : + element == EL_INVISIBLE_WALL ? EL_INVISIBLE_WALL_ACTIVE : + EL_INVISIBLE_SAND_ACTIVE); +} + +static int getInvisibleFromInvisibleActiveElement(int element) +{ + return (element == EL_INVISIBLE_STEELWALL_ACTIVE ? EL_INVISIBLE_STEELWALL : + element == EL_INVISIBLE_WALL_ACTIVE ? EL_INVISIBLE_WALL : + EL_INVISIBLE_SAND); +} + static void RedrawAllLightSwitchesAndInvisibleElements() { int x, y; @@ -2018,11 +2032,24 @@ static void RedrawAllLightSwitchesAndInvisibleElements() Feld[x][y] = EL_LIGHT_SWITCH; DrawLevelField(x, y); } + else if (element == EL_INVISIBLE_STEELWALL || + element == EL_INVISIBLE_WALL || + element == EL_INVISIBLE_SAND) + { + if (game.light_time_left > 0) + Feld[x][y] = getInvisibleActiveFromInvisibleElement(element); + + DrawLevelField(x, y); + } + else if (element == EL_INVISIBLE_STEELWALL_ACTIVE || + element == EL_INVISIBLE_WALL_ACTIVE || + element == EL_INVISIBLE_SAND_ACTIVE) + { + if (game.light_time_left == 0) + Feld[x][y] = getInvisibleFromInvisibleActiveElement(element); - if (element == EL_INVISIBLE_STEELWALL || - element == EL_INVISIBLE_WALL || - element == EL_INVISIBLE_SAND) DrawLevelField(x, y); + } } } } @@ -5021,22 +5048,7 @@ void GameActions() game.light_time_left--; if (game.light_time_left == 0) - { - for (y=0; y 0) @@ -5885,6 +5897,7 @@ int DigField(struct PlayerInfo *player, case EL_EMPTY: case EL_SAND: case EL_INVISIBLE_SAND: + case EL_INVISIBLE_SAND_ACTIVE: case EL_TRAP: case EL_SP_BASE: case EL_SP_BUGGY_BASE: diff --git a/src/init.c b/src/init.c index c2e69b87..b10b8ec9 100644 --- a/src/init.c +++ b/src/init.c @@ -653,6 +653,7 @@ void InitElementInfo() { EL_PACMAN_LEFT, GFX_PACMAN_LEFT }, { EL_PACMAN_DOWN, GFX_PACMAN_DOWN }, { EL_INVISIBLE_WALL, GFX_UNSICHTBAR }, + { EL_INVISIBLE_WALL_ACTIVE, GFX_UNSICHTBAR_ON }, { EL_WALL_EMERALD, GFX_ERZ_EDEL }, { EL_WALL_DIAMOND, GFX_ERZ_DIAM }, { EL_LAMP, GFX_BIRNE_AUS }, @@ -701,6 +702,7 @@ void InitElementInfo() { EL_SP_BUGGY_BASE_ACTIVE, GFX_SP_BUG_ACTIVE }, { EL_SP_ZONK, GFX_SP_ZONK }, { EL_INVISIBLE_STEELWALL, GFX_INVISIBLE_STEEL }, + { EL_INVISIBLE_STEELWALL_ACTIVE, GFX_INVISIBLE_STEEL_ON }, { EL_BLACK_ORB, GFX_BLACK_ORB }, { EL_EM_GATE1, GFX_EM_GATE_1 }, { EL_EM_GATE2, GFX_EM_GATE_2 }, @@ -790,6 +792,7 @@ void InitElementInfo() { EL_MOLE_DOWN, GFX_MOLE_DOWN }, { EL_STEELWALL_SLANTED, GFX_STEEL_SLANTED }, { EL_INVISIBLE_SAND, GFX_SAND_INVISIBLE }, + { EL_INVISIBLE_SAND_ACTIVE, GFX_SAND_INVISIBLE_ON }, { EL_DX_UNKNOWN_15, GFX_DX_UNKNOWN_15 }, { EL_DX_UNKNOWN_42, GFX_DX_UNKNOWN_42 }, { EL_TIMEGATE_OPEN, GFX_TIMEGATE_OPEN }, @@ -1191,6 +1194,9 @@ void InitElementProperties() EL_SP_EXIT_CLOSED, EL_SP_EXIT_OPEN, EL_INVISIBLE_STEELWALL, + EL_INVISIBLE_STEELWALL_ACTIVE, + EL_INVISIBLE_WALL, + EL_INVISIBLE_WALL_ACTIVE, EL_CONVEYOR_BELT1_SWITCH_LEFT, EL_CONVEYOR_BELT1_SWITCH_MIDDLE, EL_CONVEYOR_BELT1_SWITCH_RIGHT, @@ -1296,6 +1302,7 @@ void InitElementProperties() EL_SP_HARD_BASE5, EL_SP_HARD_BASE6, EL_INVISIBLE_STEELWALL, + EL_INVISIBLE_STEELWALL_ACTIVE, EL_CONVEYOR_BELT1_SWITCH_LEFT, EL_CONVEYOR_BELT1_SWITCH_MIDDLE, EL_CONVEYOR_BELT1_SWITCH_RIGHT, @@ -1469,6 +1476,9 @@ void InitElementProperties() EL_SP_EXIT_CLOSED, EL_SP_EXIT_OPEN, EL_INVISIBLE_STEELWALL, + EL_INVISIBLE_STEELWALL_ACTIVE, + EL_INVISIBLE_WALL, + EL_INVISIBLE_WALL_ACTIVE, EL_STEELWALL_SLANTED, EL_EMC_STEELWALL1, EL_EMC_STEELWALL2, @@ -1751,7 +1761,9 @@ void InitElementProperties() EL_EM_GATE3_GRAY, EL_EM_GATE4_GRAY, EL_DYNAMITE, + EL_INVISIBLE_STEELWALL, EL_INVISIBLE_WALL, + EL_INVISIBLE_SAND, EL_LAMP, EL_LAMP_ACTIVE, EL_WALL_EMERALD, @@ -1808,7 +1820,6 @@ void InitElementProperties() EL_SP_HARD_BASE4, EL_SP_HARD_BASE5, EL_SP_HARD_BASE6, - EL_INVISIBLE_STEELWALL, EL_CONVEYOR_BELT1_SWITCH_LEFT, EL_CONVEYOR_BELT1_SWITCH_MIDDLE, EL_CONVEYOR_BELT1_SWITCH_RIGHT, @@ -1934,7 +1945,8 @@ void InitElementProperties() EL_SP_BASE, EL_SP_BUGGY_BASE, EL_TRAP, - EL_INVISIBLE_SAND + EL_INVISIBLE_SAND, + EL_INVISIBLE_SAND_ACTIVE }; static int ep_eatable_num = SIZEOF_ARRAY_INT(ep_eatable); diff --git a/src/tools.c b/src/tools.c index 9a8c477c..5ab9b5a9 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1438,6 +1438,7 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, else if (rechts_massiv) graphic = GFX_MAUER_L; } +#if 0 else if ((element == EL_INVISIBLE_STEELWALL || element == EL_INVISIBLE_WALL || element == EL_INVISIBLE_SAND) && game.light_time_left) @@ -1446,6 +1447,7 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, element == EL_INVISIBLE_WALL ? GFX_UNSICHTBAR_ON : GFX_SAND_INVISIBLE_ON); } +#endif if (dx || dy) DrawGraphicShifted(x, y, dx, dy, graphic, cut_mode, mask_mode); @@ -1608,6 +1610,7 @@ void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element, else if (rechts_massiv) graphic = GFX_MAUER_L; } +#if 0 else if ((element == EL_INVISIBLE_STEELWALL || element == EL_INVISIBLE_WALL || element == EL_INVISIBLE_SAND) && game.light_time_left) @@ -1616,6 +1619,7 @@ void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element, element == EL_INVISIBLE_WALL ? GFX_UNSICHTBAR_ON : GFX_SAND_INVISIBLE_ON); } +#endif if (dx || dy) DrawNewGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, mask_mode); @@ -3104,6 +3108,7 @@ int el2gfx_OLD(int element) case EL_PACMAN_LEFT: return GFX_PACMAN_LEFT; case EL_PACMAN_DOWN: return GFX_PACMAN_DOWN; case EL_INVISIBLE_WALL: return GFX_UNSICHTBAR; + case EL_INVISIBLE_WALL_ACTIVE: return GFX_UNSICHTBAR_ON; case EL_WALL_EMERALD: return GFX_ERZ_EDEL; case EL_WALL_DIAMOND: return GFX_ERZ_DIAM; case EL_LAMP: return GFX_BIRNE_AUS; @@ -3153,6 +3158,7 @@ int el2gfx_OLD(int element) case EL_SP_ZONK: return GFX_SP_ZONK; /* ^^^^^^^^^^ non-standard position in supaplex graphic set! */ case EL_INVISIBLE_STEELWALL: return GFX_INVISIBLE_STEEL; + case EL_INVISIBLE_STEELWALL_ACTIVE: return GFX_INVISIBLE_STEEL_ON; case EL_BLACK_ORB: return GFX_BLACK_ORB; case EL_EM_GATE1: return GFX_EM_GATE_1; case EL_EM_GATE2: return GFX_EM_GATE_2; @@ -3242,6 +3248,7 @@ int el2gfx_OLD(int element) case EL_MOLE_DOWN: return GFX_MOLE_DOWN; case EL_STEELWALL_SLANTED: return GFX_STEEL_SLANTED; case EL_INVISIBLE_SAND: return GFX_SAND_INVISIBLE; + case EL_INVISIBLE_SAND_ACTIVE: return GFX_SAND_INVISIBLE_ON; case EL_DX_UNKNOWN_15: return GFX_DX_UNKNOWN_15; case EL_DX_UNKNOWN_42: return GFX_DX_UNKNOWN_42; case EL_TIMEGATE_OPEN: return GFX_TIMEGATE_OPEN;