}
}
/* no break! */
- case EL_PLAYER:
- if (init_game)
- Feld[x][y] = EL_PLAYER1;
- /* no break! */
case EL_PLAYER1:
case EL_PLAYER2:
case EL_PLAYER3:
InitGameEngine();
+#if 0
#if DEBUG
#if USE_NEW_AMOEBA_CODE
printf("Using new amoeba code.\n");
#else
printf("Using old amoeba code.\n");
#endif
+#endif
#endif
/* don't play tapes over network */
RemoveMovingField(x, y);
}
- if (IS_MASSIVE(element) || element == EL_DRAGON_FIRE)
+ if (IS_MASSIVE(element) || element == EL_FLAMES)
continue;
if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y)))
if (IS_ACTIVE_BOMB(Feld[ex][ey]))
{
- player = &stored_player[Feld[ex][ey] - EL_DYNABOMB_ACTIVE_1];
+ player = &stored_player[Feld[ex][ey] - EL_DYNABOMB_PLAYER1_ACTIVE];
dynabomb_size = player->dynabomb_size;
dynabomb_xl = player->dynabomb_xl;
player->dynabombs_left++;
RaiseScoreElement(element);
Explode(x, y, EX_PHASE_START, EX_NORMAL);
break;
- case EL_DYNABOMB_ACTIVE_1:
- case EL_DYNABOMB_ACTIVE_2:
- case EL_DYNABOMB_ACTIVE_3:
- case EL_DYNABOMB_ACTIVE_4:
+ case EL_DYNABOMB_PLAYER1_ACTIVE:
+ case EL_DYNABOMB_PLAYER2_ACTIVE:
+ case EL_DYNABOMB_PLAYER3_ACTIVE:
+ case EL_DYNABOMB_PLAYER4_ACTIVE:
case EL_DYNABOMB_NR:
case EL_DYNABOMB_SZ:
case EL_DYNABOMB_XL:
}
}
+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;
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);
- if (element == EL_INVISIBLE_STEELWALL ||
- element == EL_INVISIBLE_WALL ||
- element == EL_INVISIBLE_SAND)
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);
+
+ DrawLevelField(x, y);
+ }
}
}
}
else
RemoveMovingField(xx, yy);
- Feld[xx][yy] = EL_DRAGON_FIRE;
+ Feld[xx][yy] = EL_FLAMES;
if (IN_SCR_FIELD(sx, sy))
DrawGraphic(sx, sy, graphic + phase*3 + i-1);
}
else
{
- if (Feld[xx][yy] == EL_DRAGON_FIRE)
+ if (Feld[xx][yy] == EL_FLAMES)
Feld[xx][yy] = EL_EMPTY;
DrawLevelField(xx, yy);
}
if ((wanna_flame || IS_ENEMY(element1) || IS_ENEMY(element2)) &&
element1 != EL_DRAGON && element2 != EL_DRAGON &&
- element1 != EL_DRAGON_FIRE && element2 != EL_DRAGON_FIRE)
+ element1 != EL_FLAMES && element2 != EL_FLAMES)
{
if (IS_PLAYER(x, y))
DrawPlayerField(x, y);
PlaySoundLevel(x, y, SND_DRAGON_ATTACKING);
MovDelay[x][y] = 50;
- Feld[newx][newy] = EL_DRAGON_FIRE;
+ Feld[newx][newy] = EL_FLAMES;
if (IN_LEV_FIELD(newx1, newy1) && Feld[newx1][newy1] == EL_EMPTY)
- Feld[newx1][newy1] = EL_DRAGON_FIRE;
+ Feld[newx1][newy1] = EL_FLAMES;
if (IN_LEV_FIELD(newx2, newy2) && Feld[newx2][newy2] == EL_EMPTY)
- Feld[newx2][newy2] = EL_DRAGON_FIRE;
+ Feld[newx2][newy2] = EL_FLAMES;
return;
}
}
else
{
Feld[newx][newy] = EL_EMPTY;
- DrawLevelField(newx, newy);
+ DrawNewLevelField(newx, newy);
}
PlaySoundLevel(x, y, SND_YAMYAM_EATING);
else
{
Feld[newx][newy] = EL_EMPTY;
- DrawLevelField(newx, newy);
+ DrawNewLevelField(newx, newy);
}
PlaySoundLevel(x, y, SND_DARK_YAMYAM_EATING);
#endif
else if (element == EL_BUG || element == EL_SPACESHIP ||
element == EL_SP_SNIKSNAK || element == EL_MOLE)
-#if 1
+#if 0
DrawLevelField(x, y);
#else
DrawNewLevelField(x, y);
};
Feld[x][y] = EL_SAND;
- DrawLevelField(x, y);
+ DrawNewLevelField(x, y);
for(i=0; i<4; i++)
{
yy = y + xy[i][1];
if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_SAND)
- DrawLevelField(xx, yy); /* for "ErdreichAnbroeckeln()" */
+ DrawNewLevelField(xx, yy); /* for "ErdreichAnbroeckeln()" */
}
}
if (!CAN_MOVE(element))
MovDir[newx][newy] = 0;
- if (element == EL_BUG || element == EL_SPACESHIP ||
- element == EL_SP_SNIKSNAK || element == EL_PACMAN ||
- element == EL_SP_ELECTRON)
- {
- DrawNewLevelField(x, y);
- DrawNewLevelField(newx, newy);
- }
- else
- {
- DrawLevelField(x, y);
- DrawLevelField(newx, newy);
- }
+ DrawNewLevelField(x, y);
+ DrawNewLevelField(newx, newy);
Stop[newx][newy] = TRUE;
JustStopped[newx][newy] = 3;
}
else /* still moving on */
{
- if (element == EL_BUG || element == EL_SPACESHIP ||
- element == EL_SP_SNIKSNAK || element == EL_PACMAN ||
- element == EL_SP_ELECTRON)
- DrawNewLevelField(x, y);
- else
- DrawLevelField(x, y);
+ DrawNewLevelField(x, y);
}
}
int xx = x + j*xy[i][0], yy = y + j*xy[i][1];
if (IN_LEV_FIELD(xx, yy) &&
- (Feld[xx][yy] == EL_DRAGON_FIRE || Feld[xx][yy] == EL_DRAGON))
+ (Feld[xx][yy] == EL_FLAMES || Feld[xx][yy] == EL_DRAGON))
{
if (Feld[xx][yy] == EL_DRAGON)
dragon_found = TRUE;
{
int xx = x + j*xy[i][0], yy = y + j*xy[i][1];
- if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_DRAGON_FIRE)
+ if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_FLAMES)
{
Feld[xx][yy] = EL_EMPTY;
DrawLevelField(xx, yy);
element == EL_WALL_GROWING_Y ||
element == EL_WALL_GROWING_XY)
MauerAbleger(x, y);
- else if (element == EL_DRAGON_FIRE)
+ else if (element == EL_FLAMES)
CheckForDragon(x, y);
else if (element == EL_SP_BUGGY_BASE || element == EL_SP_BUGGY_BASE_ACTIVE)
CheckBuggyBase(x, y);
game.light_time_left--;
if (game.light_time_left == 0)
- {
- for (y=0; y<lev_fieldy; y++) for (x=0; x<lev_fieldx; x++)
- {
- element = Feld[x][y];
-
- if (element == EL_LIGHT_SWITCH_ACTIVE)
- {
- Feld[x][y] = EL_LIGHT_SWITCH;
- DrawLevelField(x, y);
- }
- else if (element == EL_INVISIBLE_STEELWALL ||
- element == EL_INVISIBLE_WALL ||
- element == EL_INVISIBLE_SAND)
- DrawLevelField(x, y);
- }
- }
+ RedrawAllLightSwitchesAndInvisibleElements();
}
if (game.timegate_time_left > 0)
if (element == EL_ACID && dx == 0 && dy == 1)
{
Blurb(jx, jy);
- Feld[jx][jy] = EL_PLAYER;
+ Feld[jx][jy] = EL_PLAYER1;
InitMovingField(jx, jy, MV_DOWN);
Store[jx][jy] = EL_ACID;
ContinueMoving(jx, jy);
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:
}
else
{
- Feld[jx][jy] = EL_DYNABOMB_ACTIVE_1 + (player->element_nr - EL_PLAYER1);
+ Feld[jx][jy] =
+ EL_DYNABOMB_PLAYER1_ACTIVE + (player->element_nr - EL_PLAYER1);
MovDelay[jx][jy] = 96;
player->dynabombs_left--;
if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))