#define EMU_NONE 0
#define EMU_BOULDERDASH 1
#define EMU_SOKOBAN 2
+#define EMU_SUPAPLEX 3
/* to control special behaviour of certain game elements */
int game_emulation = EMU_NONE;
int i, j, x, y;
boolean emulate_bd = TRUE; /* unless non-BOULDERDASH elements found */
boolean emulate_sb = TRUE; /* unless non-SOKOBAN elements found */
+ boolean emulate_sp = TRUE; /* unless non-SUPAPLEX elements found */
/* don't play tapes over network */
network_playing = (options.network && !tape.playing);
}
}
- for(y=0; y<lev_fieldy; y++) for(x=0; x<lev_fieldx; x++)
+ for(y=0; y<lev_fieldy; y++)
{
- if (emulate_bd && !IS_BD_ELEMENT(Feld[x][y]))
- emulate_bd = FALSE;
- if (emulate_sb && !IS_SB_ELEMENT(Feld[x][y]))
- emulate_sb = FALSE;
-
- InitField(x, y, TRUE);
+ for(x=0; x<lev_fieldx; x++)
+ {
+ if (emulate_bd && !IS_BD_ELEMENT(Feld[x][y]))
+ emulate_bd = FALSE;
+ if (emulate_sb && !IS_SB_ELEMENT(Feld[x][y]))
+ emulate_sb = FALSE;
+ if (emulate_sp && !IS_SP_ELEMENT(Feld[x][y]))
+ emulate_sp = FALSE;
+
+ InitField(x, y, TRUE);
+ }
}
/* check if any connected player was not found in playfield */
}
game_emulation = (emulate_bd ? EMU_BOULDERDASH :
- emulate_sb ? EMU_SOKOBAN : EMU_NONE);
+ emulate_sb ? EMU_SOKOBAN :
+ emulate_sp ? EMU_SUPAPLEX : EMU_NONE);
scroll_x = scroll_y = -1;
if (local_player->jx >= MIDPOSX-1)
Feld[x][y] = EL_KAEFER;
MovDir[x][y] = direction[0][element - EL_KAEFER_R];
break;
+
case EL_FLIEGER_R:
case EL_FLIEGER_O:
case EL_FLIEGER_L:
Feld[x][y] = EL_FLIEGER;
MovDir[x][y] = direction[0][element - EL_FLIEGER_R];
break;
+
case EL_BUTTERFLY_R:
case EL_BUTTERFLY_O:
case EL_BUTTERFLY_L:
Feld[x][y] = EL_BUTTERFLY;
MovDir[x][y] = direction[0][element - EL_BUTTERFLY_R];
break;
+
case EL_FIREFLY_R:
case EL_FIREFLY_O:
case EL_FIREFLY_L:
Feld[x][y] = EL_FIREFLY;
MovDir[x][y] = direction[0][element - EL_FIREFLY_R];
break;
+
case EL_PACMAN_R:
case EL_PACMAN_O:
case EL_PACMAN_L:
Feld[x][y] = EL_PACMAN;
MovDir[x][y] = direction[0][element - EL_PACMAN_R];
break;
+
+ case EL_SP_SNIKSNAK:
+ MovDir[x][y] = MV_UP;
+ break;
+
+ case EL_SP_ELECTRON:
+ MovDir[x][y] = MV_LEFT;
+ break;
+
default:
MovDir[x][y] = 1 << RND(4);
if (element != EL_KAEFER &&
element != EL_FLIEGER &&
element != EL_BUTTERFLY &&
- element != EL_FIREFLY &&
- element != EL_SP_SNIKSNAK &&
- element != EL_SP_ELECTRON)
+ element != EL_FIREFLY)
break;
for (i=0; i<4; i++)
Store[x][y] = EL_EDELSTEIN_GELB;
break;
}
+
+ if (game_emulation == EMU_SUPAPLEX)
+ Store[x][y] = EL_LEERRAUM;
}
else if (center_element == EL_MAULWURF)
Store[x][y] = EL_EDELSTEIN_ROT;
Store[x][y] = ((x == ex && y == ey) ? EL_DIAMANT : EL_EDELSTEIN);
else if (center_element == EL_BUTTERFLY)
Store[x][y] = EL_EDELSTEIN_BD;
+ else if (center_element == EL_SP_ELECTRON)
+ Store[x][y] = EL_SP_INFOTRON;
else if (center_element == EL_MAMPFER)
Store[x][y] = level.mampfer_inhalt[MampferNr][x-ex+1][y-ey+1];
else if (center_element == EL_AMOEBA2DIAM)
InitMovDir(x, y);
DrawLevelField(x, y);
}
- else if (!(phase%delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+ else if (!(phase % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
{
+ int graphic = GFX_EXPLOSION;
+
+ if (game_emulation == EMU_SUPAPLEX)
+ graphic = (Store[x][y] == EL_SP_INFOTRON ?
+ GFX_SP_EXPLODE_INFOTRON :
+ GFX_SP_EXPLODE_EMPTY);
+
if (phase == delay)
ErdreichAnbroeckeln(SCREENX(x), SCREENY(y));
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_EXPLOSION+(phase/delay-1));
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic + (phase / delay - 1));
}
}
return;
}
}
- else if (element == EL_FELSBROCKEN)
+ else if (element == EL_FELSBROCKEN || element == EL_SP_ZONK)
{
if (IS_ENEMY(smashed) ||
smashed == EL_BOMBE || smashed == EL_SP_DISK_ORANGE ||
{
MovDelay[x][y]--;
- if (element == EL_ROBOT || element == EL_MAMPFER ||
- element == EL_MAMPFER2)
+ if (element == EL_ROBOT ||
+ element == EL_MAMPFER || element == EL_MAMPFER2)
{
int phase = MovDelay[x][y] % 8;
&& MovDelay[x][y]%4 == 3)
PlaySoundLevel(x, y, SND_NJAM);
}
+ else if (element == EL_SP_ELECTRON)
+ DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL);
else if (element == EL_DRACHE)
{
int i;
TurnRound(x, y);
if (element == EL_KAEFER || element == EL_FLIEGER ||
- element == EL_SP_SNIKSNAK || element == EL_SP_ELECTRON)
+ element == EL_SP_SNIKSNAK)
DrawLevelField(x, y);
else if (element == EL_BUTTERFLY || element == EL_FIREFLY)
DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_NORMAL);
else if (element == EL_SONDE)
DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_NORMAL);
+ else if (element == EL_SP_ELECTRON)
+ DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL);
return;
}
MauerAbleger(x, y);
else if (element == EL_BURNING)
CheckForDragon(x, y);
+ else if (element == EL_SP_TERMINAL)
+ DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL, 7, 10, ANIM_NORMAL);
+ else if (element == EL_SP_TERMINAL_ACTIVE)
+ DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL_ACTIVE, 7, 2, ANIM_NORMAL);
if (SiebAktiv)
{
int xx, yy;
for (yy=0; yy<lev_fieldy; yy++)
+ {
for (xx=0; xx<lev_fieldx; xx++)
+ {
if (Feld[xx][yy] == EL_SP_DISK_YELLOW)
Bang(xx, yy);
+ else if (Feld[xx][yy] == EL_SP_TERMINAL)
+ Feld[xx][yy] = EL_SP_TERMINAL_ACTIVE;
+ }
+ }
- Feld[x][y] = EL_SP_TERMINAL_ACTIVE;
- DrawLevelField(x, y);
return MF_ACTION;
}
break;
#define MINI_MORE_STARTY 160
#define MICRO_MORE_STARTX 0
#define MICRO_MORE_STARTY 208
-#define MORE_PER_LINE 8
+#define MORE_PER_LINE 16
#define MINI_MORE_PER_LINE 16
#define MICRO_MORE_PER_LINE 16
#define FONT_CHARS_PER_LINE 16
#define EL_PLAYER_IS_LEAVING 408
/* game graphics:
-** 0 - 209: graphics from "RocksScreen"
-** 210 - 255: graphics from "RocksMore"
-** 256 - 511: graphics from "RocksFont"
-** 512 - 767: graphics from "RocksHeroes"
+** 0 - 255: graphics from "RocksScreen"
+** 256 - 511: graphics from "RocksMore"
+** 512 - 767: graphics from "RocksFont"
+** 768 - 1023: graphics from "RocksHeroes"
*/
#define GFX_START_ROCKSSCREEN 0
-#define GFX_END_ROCKSSCREEN 209
-#define GFX_START_ROCKSMORE 210
-#define GFX_END_ROCKSMORE 255
-#define GFX_START_ROCKSFONT 256
-#define GFX_END_ROCKSFONT 511
-#define GFX_START_ROCKSHEROES 512
-#define GFX_END_ROCKSHEROES 767
+#define GFX_END_ROCKSSCREEN 255
+#define GFX_START_ROCKSMORE 256
+#define GFX_END_ROCKSMORE 511
+#define GFX_START_ROCKSFONT 512
+#define GFX_END_ROCKSFONT 767
+#define GFX_START_ROCKSHEROES 768
+#define GFX_END_ROCKSHEROES 1023
-#define NUM_TILES 768
+#define NUM_TILES 1024
/* graphics from "RocksScreen" */
/* Zeile 0 (0) */
#define GFX_SP_CHIP_UPPER (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 6)
#define GFX_SP_CHIP_LOWER (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 7)
+#define GFX_SP_EXPLODE_EMPTY (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 8)
+#define GFX_SP_EXPLODE_INFOTRON (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 8)
+#define GFX_SP_SNIKSNAK_LEFT (GFX_START_ROCKSMORE + 8 * MORE_PER_LINE + 8)
+#define GFX_SP_SNIKSNAK_RIGHT (GFX_START_ROCKSMORE + 8 * MORE_PER_LINE +12)
+#define GFX_SP_SNIKSNAK_UP (GFX_START_ROCKSMORE + 9 * MORE_PER_LINE + 8)
+#define GFX_SP_SNIKSNAK_DOWN (GFX_START_ROCKSMORE + 9 * MORE_PER_LINE +12)
+
+#define GFX2_SP_ELECTRON (GFX_START_ROCKSMORE + 10 * MORE_PER_LINE + 8)
+#define GFX2_SP_TERMINAL (GFX_START_ROCKSMORE + 11 * MORE_PER_LINE + 8)
+#define GFX2_SP_TERMINAL_ACTIVE (GFX_START_ROCKSMORE + 12 * MORE_PER_LINE + 8)
+
/* graphics from "RocksFont" */
#define GFX_CHAR_START (GFX_START_ROCKSFONT)
#define GFX_CHAR_ASCII0 (GFX_CHAR_START-32)
{
int ux = LEVELX(x), uy = LEVELY(y);
int graphic = el2gfx(element);
- int phase4 = ABS(MovPos[ux][uy]) / (TILEX / 4);
- int phase = phase4 / 2;
+ int phase8 = ABS(MovPos[ux][uy]) / (TILEX / 8);
+ int phase4 = phase8 / 2;
+ int phase2 = phase8 / 4;
int dir = MovDir[ux][uy];
if (element == EL_PACMAN || element == EL_KAEFER || element == EL_FLIEGER)
{
- graphic += 4*!phase;
+ graphic += 4 * !phase2;
if (dir == MV_UP)
graphic += 1;
else if (dir == MV_DOWN)
graphic += 3;
}
+ else if (element == EL_SP_SNIKSNAK)
+ {
+ if (dir == MV_LEFT)
+ graphic = GFX_SP_SNIKSNAK_LEFT;
+ else if (dir == MV_RIGHT)
+ graphic = GFX_SP_SNIKSNAK_RIGHT;
+ else if (dir == MV_UP)
+ graphic = GFX_SP_SNIKSNAK_UP;
+ else
+ graphic = GFX_SP_SNIKSNAK_DOWN;
+
+ graphic += (phase8 < 4 ? phase8 : 7 - phase8);
+ }
+ else if (element == EL_SP_ELECTRON)
+ {
+ graphic = GFX2_SP_ELECTRON + getGraphicAnimationPhase(8, 2, ANIM_NORMAL);
+ }
else if (element == EL_MAULWURF || element == EL_PINGUIN ||
element == EL_SCHWEIN || element == EL_DRACHE)
{
}
else if (element == EL_BUTTERFLY || element == EL_FIREFLY)
{
- graphic += !phase;
+ graphic += !phase2;
}
else if ((element == EL_FELSBROCKEN || IS_GEM(element)) && !cut_mode)
{
if (element != EL_SP_INFOTRON)
- graphic += phase * (element == EL_FELSBROCKEN ? 2 : 1);
+ graphic += phase2 * (element == EL_FELSBROCKEN ? 2 : 1);
}
else if (element == EL_SIEB_LEER || element == EL_SIEB2_LEER ||
element == EL_SIEB_VOLL || element == EL_SIEB2_VOLL)
if (IS_CHAR(element))
return GFX_CHAR_START + (element - EL_CHAR_START);
else if (element >= EL_SP_START && element <= EL_SP_END)
- return GFX_START_ROCKSMORE + (element - EL_SP_START);
+ {
+ int nr_element = element - EL_SP_START;
+ int gfx_per_line = 8;
+ int nr_graphic =
+ (nr_element / gfx_per_line) * MORE_PER_LINE +
+ (nr_element % gfx_per_line);
+
+ return GFX_START_ROCKSMORE + nr_graphic;
+ }
else
return -1;
}