From: Holger Schemel Date: Mon, 28 Dec 1998 18:11:15 +0000 (+0100) Subject: rnd-19981228-3 X-Git-Tag: 1.3.0^2~43 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=6df84aae03094174b7418a8c1cce7657d3378d59;p=rocksndiamonds.git rnd-19981228-3 --- diff --git a/src/files.c b/src/files.c index e1765fd8..f0be82d6 100644 --- a/src/files.c +++ b/src/files.c @@ -395,8 +395,10 @@ void LoadLevel(int level_nr) fclose(file); +#if 0 if (level.time <= 10) /* minimum playing time of each level */ level.time = 10; +#endif if (file_version == FILE_VERSION_1_0) { diff --git a/src/game.c b/src/game.c index e69b1e61..e1977faf 100644 --- a/src/game.c +++ b/src/game.c @@ -176,6 +176,7 @@ static void InitField(int x, int y, boolean init_game) switch (Feld[x][y]) { case EL_SPIELFIGUR: + case EL_SP_MURPHY: if (init_game) Feld[x][y] = EL_SPIELER1; /* no break! */ @@ -298,6 +299,10 @@ static void InitField(int x, int y, boolean init_game) MovDir[x][y] = 1 << RND(4); break; + case EL_SP_EMPTY: + Feld[x][y] = EL_LEERRAUM; + break; + default: break; } @@ -4187,10 +4192,36 @@ int DigField(struct PlayerInfo *player, return MF_ACTION; break; + case EL_SP_TERMINAL: + { + int xx, yy; + + for (yy=0; yygems_still_needed > 0) + return MF_NO_ACTION; + + player->LevelSolved = player->GameOver = TRUE; + PlaySoundLevel(x, y, SND_BUING); + break; + case EL_FELSBROCKEN: case EL_BOMBE: case EL_KOKOSNUSS: case EL_ZEIT_LEER: + case EL_SP_ZONK: + case EL_SP_DISK_ORANGE: + case EL_SP_DISK_YELLOW: if (dy || mode == DF_SNAP) return MF_NO_ACTION; diff --git a/src/main.h b/src/main.h index 11588dd9..892c7899 100644 --- a/src/main.h +++ b/src/main.h @@ -768,6 +768,7 @@ extern int num_bg_loops; #define EL_SIEB_TOT 304 #define EL_SIEB2_TOT 305 #define EL_AUSGANG_ACT 306 +#define EL_SP_TERMINAL_ACTIVE 307 /* "unreal" (and therefore not drawable) runtime elements */ #define EL_BLOCKED 400 @@ -1012,46 +1013,46 @@ extern int num_bg_loops; #define GFX_FLAMMEN_DOWN (GFX_START_ROCKSHEROES +15*HEROES_PER_LINE + 8) /* graphics from "RocksMore" */ -#define GFX_SP_EMPTY (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 0) -#define GFX_SP_ZONK (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 1) -#define GFX_SP_BASE (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 2) -#define GFX_SP_MURPHY (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 3) -#define GFX_SP_INFOTRON (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 4) -#define GFX_SP_CHIP_SINGLE (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 5) -#define GFX_SP_HARD_GRAY (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 6) -#define GFX_SP_EXIT (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 7) -#define GFX_SP_DISK_ORANGE (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 0) -#define GFX_SP_PORT1_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 1) -#define GFX_SP_PORT1_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 2) -#define GFX_SP_PORT1_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 3) -#define GFX_SP_PORT1_UP (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 4) -#define GFX_SP_PORT2_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 5) -#define GFX_SP_PORT2_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 6) -#define GFX_SP_PORT2_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 7) -#define GFX_SP_PORT2_UP (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 0) -#define GFX_SP_SNIKSNAK (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 1) -#define GFX_SP_DISK_YELLOW (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 2) -#define GFX_SP_TERMINAL (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 3) -#define GFX_SP_DISK_RED (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 4) -#define GFX_SP_PORT_Y (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 5) -#define GFX_SP_PORT_X (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 6) -#define GFX_SP_PORT_XY (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 7) -#define GFX_SP_ELECTRON (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 0) -#define GFX_SP_BUG (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 1) -#define GFX_SP_CHIP_LEFT (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 2) -#define GFX_SP_CHIP_RIGHT (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 3) -#define GFX_SP_HARD_BASE1 (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 4) -#define GFX_SP_HARD_GREEN (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 5) -#define GFX_SP_HARD_BLUE (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 6) -#define GFX_SP_HARD_RED (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 7) -#define GFX_SP_HARD_YELLOW (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 0) -#define GFX_SP_HARD_BASE2 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 1) -#define GFX_SP_HARD_BASE3 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 2) -#define GFX_SP_HARD_BASE4 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 3) -#define GFX_SP_HARD_BASE5 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 4) -#define GFX_SP_HARD_BASE6 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 5) -#define GFX_SP_CHIP_UPPER (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 6) -#define GFX_SP_CHIP_LOWER (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 7) +#define GFX_SP_EMPTY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 0) +#define GFX_SP_ZONK (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 1) +#define GFX_SP_BASE (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 2) +#define GFX_SP_MURPHY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 3) +#define GFX_SP_INFOTRON (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 4) +#define GFX_SP_CHIP_SINGLE (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 5) +#define GFX_SP_HARD_GRAY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 6) +#define GFX_SP_EXIT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 7) +#define GFX_SP_DISK_ORANGE (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 0) +#define GFX_SP_PORT1_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 1) +#define GFX_SP_PORT1_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 2) +#define GFX_SP_PORT1_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 3) +#define GFX_SP_PORT1_UP (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 4) +#define GFX_SP_PORT2_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 5) +#define GFX_SP_PORT2_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 6) +#define GFX_SP_PORT2_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 7) +#define GFX_SP_PORT2_UP (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 0) +#define GFX_SP_SNIKSNAK (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 1) +#define GFX_SP_DISK_YELLOW (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 2) +#define GFX_SP_TERMINAL (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 3) +#define GFX_SP_DISK_RED (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 4) +#define GFX_SP_PORT_Y (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 5) +#define GFX_SP_PORT_X (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 6) +#define GFX_SP_PORT_XY (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 7) +#define GFX_SP_ELECTRON (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 0) +#define GFX_SP_BUG (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 1) +#define GFX_SP_CHIP_LEFT (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 2) +#define GFX_SP_CHIP_RIGHT (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 3) +#define GFX_SP_HARD_BASE1 (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 4) +#define GFX_SP_HARD_GREEN (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 5) +#define GFX_SP_HARD_BLUE (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 6) +#define GFX_SP_HARD_RED (GFX_START_ROCKSMORE + 3 * MORE_PER_LINE + 7) +#define GFX_SP_HARD_YELLOW (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 0) +#define GFX_SP_HARD_BASE2 (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 1) +#define GFX_SP_HARD_BASE3 (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 2) +#define GFX_SP_HARD_BASE4 (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 3) +#define GFX_SP_HARD_BASE5 (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 4) +#define GFX_SP_HARD_BASE6 (GFX_START_ROCKSMORE + 4 * MORE_PER_LINE + 5) +#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) /* graphics from "RocksFont" */ #define GFX_CHAR_START (GFX_START_ROCKSFONT) diff --git a/src/tools.c b/src/tools.c index 498a44f8..23a0cf6d 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1934,6 +1934,8 @@ int el2gfx(int element) case EL_PFEIL_O: return GFX_PFEIL_O; case EL_PFEIL_U: return GFX_PFEIL_U; case EL_SPEED_PILL: return GFX_SPEED_PILL; + case EL_SP_TERMINAL_ACTIVE: return GFX_SP_TERMINAL; + default: { if (IS_CHAR(element))