From: Holger Schemel Date: Sat, 15 Apr 2006 08:07:25 +0000 (+0200) Subject: rnd-20060415-3-src X-Git-Tag: 3.2.0^2~31 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=553bbcb054a57644d78eb10f6072ba38a04620af rnd-20060415-3-src * fixed bug with creating invisible elements when light switch is on --- diff --git a/ChangeLog b/ChangeLog index 135acdfd..a83ebd68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2006-04-15 * fixed bug with displaying wrong animation frame 0 after CE changes + * fixed bug with creating invisible elements when light switch is on 2006-04-06 * added selection between ECS and AGA graphics for EMC levels to setup diff --git a/src/conftime.h b/src/conftime.h index 826fcf65..6084c1f0 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-04-15 09:32]" +#define COMPILE_DATE_STRING "[2006-04-15 10:02]" diff --git a/src/game.c b/src/game.c index 158239c7..e2128ef1 100644 --- a/src/game.c +++ b/src/game.c @@ -364,6 +364,8 @@ void RemovePlayer(struct PlayerInfo *); boolean SnapField(struct PlayerInfo *, int, int); boolean DropElement(struct PlayerInfo *); +static int getInvisibleActiveFromInvisibleElement(int); +static int getInvisibleFromInvisibleActiveElement(int); static struct GadgetInfo *game_gadget[NUM_GAME_BUTTONS]; @@ -1127,6 +1129,14 @@ static void InitField(int x, int y, boolean init_game) game.light_time_left = level.time_light * FRAMES_PER_SECOND; break; + case EL_INVISIBLE_STEELWALL: + case EL_INVISIBLE_WALL: + case EL_INVISIBLE_SAND: + if (game.light_time_left > 0 || + game.lenses_time_left > 0) + Feld[x][y] = getInvisibleActiveFromInvisibleElement(element); + break; + case EL_EMC_MAGIC_BALL: if (game.ball_state) Feld[x][y] = EL_EMC_MAGIC_BALL_ACTIVE; @@ -5720,7 +5730,7 @@ inline static void TurnRoundExt(int x, int y) static void TurnRound(int x, int y) { int direction = MovDir[x][y]; -#if 1 +#if 0 int element, graphic; #endif