From: Holger Schemel Date: Sat, 21 Sep 2002 13:52:21 +0000 (+0200) Subject: rnd-20020921-4-src X-Git-Tag: 3.0.0^2~234 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1290799ac0be42dc5db602dd113c5185df0a7e03;p=rocksndiamonds.git rnd-20020921-4-src --- diff --git a/src/conftime.h b/src/conftime.h index ace6340a..74c9728a 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-09-21 01:19]" +#define COMPILE_DATE_STRING "[2002-09-21 15:51]" diff --git a/src/files.c b/src/files.c index f5daeb4a..105f2cf6 100644 --- a/src/files.c +++ b/src/files.c @@ -129,7 +129,7 @@ static void setLevelInfoToDefaults() static int checkLevelElement(int element) { - if (element >= EL_FIRST_RUNTIME) + if (element >= NUM_FILE_ELEMENTS) { Error(ERR_WARN, "invalid level element %d", element); element = EL_CHAR_QUESTION; diff --git a/src/game.c b/src/game.c index 502d60d7..beabbab2 100644 --- a/src/game.c +++ b/src/game.c @@ -229,21 +229,28 @@ void GetPlayerConfig() InitJoysticks(); } -static int getBeltNrFromElement(int element) +static int getBeltNrFromBeltElement(int element) { return (element < EL_CONVEYOR_BELT2_LEFT ? 0 : element < EL_CONVEYOR_BELT3_LEFT ? 1 : element < EL_CONVEYOR_BELT4_LEFT ? 2 : 3); } -static int getBeltNrFromSwitchElement(int element) +static int getBeltNrFromBeltActiveElement(int element) +{ + return (element < EL_CONVEYOR_BELT2_LEFT_ACTIVE ? 0 : + element < EL_CONVEYOR_BELT3_LEFT_ACTIVE ? 1 : + element < EL_CONVEYOR_BELT4_LEFT_ACTIVE ? 2 : 3); +} + +static int getBeltNrFromBeltSwitchElement(int element) { return (element < EL_CONVEYOR_BELT2_SWITCH_LEFT ? 0 : element < EL_CONVEYOR_BELT3_SWITCH_LEFT ? 1 : element < EL_CONVEYOR_BELT4_SWITCH_LEFT ? 2 : 3); } -static int getBeltDirNrFromSwitchElement(int element) +static int getBeltDirNrFromBeltSwitchElement(int element) { static int belt_base_element[4] = { @@ -253,13 +260,13 @@ static int getBeltDirNrFromSwitchElement(int element) EL_CONVEYOR_BELT4_SWITCH_LEFT }; - int belt_nr = getBeltNrFromSwitchElement(element); + int belt_nr = getBeltNrFromBeltSwitchElement(element); int belt_dir_nr = element - belt_base_element[belt_nr]; return (belt_dir_nr % 3); } -static int getBeltDirFromSwitchElement(int element) +static int getBeltDirFromBeltSwitchElement(int element) { static int belt_move_dir[3] = { @@ -268,7 +275,7 @@ static int getBeltDirFromSwitchElement(int element) MV_RIGHT }; - int belt_dir_nr = getBeltDirNrFromSwitchElement(element); + int belt_dir_nr = getBeltDirNrFromBeltSwitchElement(element); return belt_move_dir[belt_dir_nr]; } @@ -443,9 +450,9 @@ static void InitField(int x, int y, boolean init_game) case EL_CONVEYOR_BELT4_SWITCH_RIGHT: if (init_game) { - int belt_nr = getBeltNrFromSwitchElement(Feld[x][y]); - int belt_dir = getBeltDirFromSwitchElement(Feld[x][y]); - int belt_dir_nr = getBeltDirNrFromSwitchElement(Feld[x][y]); + int belt_nr = getBeltNrFromBeltSwitchElement(Feld[x][y]); + int belt_dir = getBeltDirFromBeltSwitchElement(Feld[x][y]); + int belt_dir_nr = getBeltDirNrFromBeltSwitchElement(Feld[x][y]); if (game.belt_dir_nr[belt_nr] == 3) /* initial value */ { @@ -1868,6 +1875,20 @@ void Blurb(int x, int y) static void ToggleBeltSwitch(int x, int y) { static int belt_base_element[4] = + { + EL_CONVEYOR_BELT1_LEFT, + EL_CONVEYOR_BELT2_LEFT, + EL_CONVEYOR_BELT3_LEFT, + EL_CONVEYOR_BELT4_LEFT + }; + static int belt_base_active_element[4] = + { + EL_CONVEYOR_BELT1_LEFT_ACTIVE, + EL_CONVEYOR_BELT2_LEFT_ACTIVE, + EL_CONVEYOR_BELT3_LEFT_ACTIVE, + EL_CONVEYOR_BELT4_LEFT_ACTIVE + }; + static int belt_base_switch_element[4] = { EL_CONVEYOR_BELT1_SWITCH_LEFT, EL_CONVEYOR_BELT2_SWITCH_LEFT, @@ -1883,7 +1904,7 @@ static void ToggleBeltSwitch(int x, int y) }; int element = Feld[x][y]; - int belt_nr = getBeltNrFromSwitchElement(element); + int belt_nr = getBeltNrFromBeltSwitchElement(element); int belt_dir_nr = (game.belt_dir_nr[belt_nr] + 1) % 4; int belt_dir = belt_move_dir[belt_dir_nr]; int xx, yy; @@ -1905,20 +1926,37 @@ static void ToggleBeltSwitch(int x, int y) if (IS_BELT_SWITCH(element)) { - int e_belt_nr = getBeltNrFromSwitchElement(element); + int e_belt_nr = getBeltNrFromBeltSwitchElement(element); if (e_belt_nr == belt_nr) { - Feld[xx][yy] = belt_base_element[belt_nr] + belt_dir_nr; + Feld[xx][yy] = belt_base_switch_element[belt_nr] + belt_dir_nr; DrawLevelField(xx, yy); } } - else if (belt_dir == MV_NO_MOVING && IS_BELT(element)) + else if (IS_BELT(element) && belt_dir != MV_NO_MOVING) { - int e_belt_nr = getBeltNrFromElement(element); + int e_belt_nr = getBeltNrFromBeltElement(element); if (e_belt_nr == belt_nr) - DrawLevelField(xx, yy); /* set belt to parking position */ + { + int belt_part = Feld[xx][yy] - belt_base_element[belt_nr]; + + Feld[xx][yy] = belt_base_active_element[belt_nr] + belt_part; + DrawLevelField(xx, yy); + } + } + else if (IS_BELT_ACTIVE(element) && belt_dir == MV_NO_MOVING) + { + int e_belt_nr = getBeltNrFromBeltActiveElement(element); + + if (e_belt_nr == belt_nr) + { + int belt_part = Feld[xx][yy] - belt_base_active_element[belt_nr]; + + Feld[xx][yy] = belt_base_element[belt_nr] + belt_part; + DrawLevelField(xx, yy); + } } } } @@ -2094,8 +2132,8 @@ void Impact(int x, int y) { int xx, yy; int activated_magic_wall = - (smashed == EL_MAGIC_WALL ? EL_MAGIC_WALL_EMPTY : - EL_BD_MAGIC_WALL_EMPTY); + (smashed == EL_MAGIC_WALL ? EL_MAGIC_WALL_ACTIVE : + EL_BD_MAGIC_WALL_ACTIVE); /* activate magic wall / mill */ for (yy=0; yy0 && IS_FREE(x-1, y)); boolean right_is_free = (xjx, jy = local_player->jy; if (element == EL_MAGIC_WALL_FULL || - element == EL_MAGIC_WALL_EMPTY || + element == EL_MAGIC_WALL_ACTIVE || element == EL_MAGIC_WALL_EMPTYING) { SiebAktivieren(x, y, 1); sieb = TRUE; } else if (element == EL_BD_MAGIC_WALL_FULL || - element == EL_BD_MAGIC_WALL_EMPTY || + element == EL_BD_MAGIC_WALL_ACTIVE || element == EL_BD_MAGIC_WALL_EMPTYING) { SiebAktivieren(x, y, 2); @@ -4943,7 +4981,7 @@ void GameActions() int element = Feld[sieb_x][sieb_y]; if (element == EL_BD_MAGIC_WALL_FULL || - element == EL_BD_MAGIC_WALL_EMPTY || + element == EL_BD_MAGIC_WALL_ACTIVE || element == EL_BD_MAGIC_WALL_EMPTYING) PlaySoundLevel(sieb_x, sieb_y, SND_BD_MAGIC_WALL_ACTIVE); else @@ -4959,13 +4997,13 @@ void GameActions() { element = Feld[x][y]; - if (element == EL_MAGIC_WALL_EMPTY || + if (element == EL_MAGIC_WALL_ACTIVE || element == EL_MAGIC_WALL_FULL) { Feld[x][y] = EL_MAGIC_WALL_DEAD; DrawLevelField(x, y); } - else if (element == EL_BD_MAGIC_WALL_EMPTY || + else if (element == EL_BD_MAGIC_WALL_ACTIVE || element == EL_BD_MAGIC_WALL_FULL) { Feld[x][y] = EL_BD_MAGIC_WALL_DEAD; diff --git a/src/init.c b/src/init.c index 7c877f2d..c2e69b87 100644 --- a/src/init.c +++ b/src/init.c @@ -610,7 +610,7 @@ void InitElementInfo() { EL_AMOEBA_DROP, GFX_TROPFEN }, { EL_BOMB, GFX_BOMBE }, { EL_MAGIC_WALL, GFX_MAGIC_WALL_OFF }, - { EL_MAGIC_WALL_EMPTY, GFX_MAGIC_WALL_EMPTY }, + { EL_MAGIC_WALL_ACTIVE, GFX_MAGIC_WALL_EMPTY }, { EL_MAGIC_WALL_EMPTYING, GFX_MAGIC_WALL_EMPTY }, { EL_MAGIC_WALL_FULL, GFX_MAGIC_WALL_FULL }, { EL_MAGIC_WALL_DEAD, GFX_MAGIC_WALL_DEAD }, @@ -673,7 +673,7 @@ void InitElementInfo() { EL_WALL_EMERALD_PURPLE, GFX_ERZ_EDEL_LILA }, { EL_DARK_YAMYAM, GFX_MAMPFER2 }, { EL_BD_MAGIC_WALL, GFX_MAGIC_WALL_BD_OFF }, - { EL_BD_MAGIC_WALL_EMPTY, GFX_MAGIC_WALL_BD_EMPTY }, + { EL_BD_MAGIC_WALL_ACTIVE, GFX_MAGIC_WALL_BD_EMPTY }, { EL_BD_MAGIC_WALL_EMPTYING, GFX_MAGIC_WALL_BD_EMPTY }, { EL_BD_MAGIC_WALL_FULL, GFX_MAGIC_WALL_BD_FULL }, { EL_BD_MAGIC_WALL_DEAD, GFX_MAGIC_WALL_BD_DEAD }, @@ -735,24 +735,36 @@ void InitElementInfo() { EL_CONVEYOR_BELT1_LEFT, GFX_BELT1_LEFT }, { EL_CONVEYOR_BELT1_MIDDLE, GFX_BELT1_MIDDLE }, { EL_CONVEYOR_BELT1_RIGHT, GFX_BELT1_RIGHT }, + { EL_CONVEYOR_BELT1_LEFT_ACTIVE, GFX_BELT1_LEFT }, + { EL_CONVEYOR_BELT1_MIDDLE_ACTIVE, GFX_BELT1_MIDDLE }, + { EL_CONVEYOR_BELT1_RIGHT_ACTIVE, GFX_BELT1_RIGHT }, { EL_CONVEYOR_BELT1_SWITCH_LEFT, GFX_BELT1_SWITCH_LEFT }, { EL_CONVEYOR_BELT1_SWITCH_MIDDLE, GFX_BELT1_SWITCH_MIDDLE }, { EL_CONVEYOR_BELT1_SWITCH_RIGHT, GFX_BELT1_SWITCH_RIGHT }, { EL_CONVEYOR_BELT2_LEFT, GFX_BELT2_LEFT }, { EL_CONVEYOR_BELT2_MIDDLE, GFX_BELT2_MIDDLE }, { EL_CONVEYOR_BELT2_RIGHT, GFX_BELT2_RIGHT }, + { EL_CONVEYOR_BELT2_LEFT_ACTIVE, GFX_BELT2_LEFT }, + { EL_CONVEYOR_BELT2_MIDDLE_ACTIVE, GFX_BELT2_MIDDLE }, + { EL_CONVEYOR_BELT2_RIGHT_ACTIVE, GFX_BELT2_RIGHT }, { EL_CONVEYOR_BELT2_SWITCH_LEFT, GFX_BELT2_SWITCH_LEFT }, { EL_CONVEYOR_BELT2_SWITCH_MIDDLE, GFX_BELT2_SWITCH_MIDDLE }, { EL_CONVEYOR_BELT2_SWITCH_RIGHT, GFX_BELT2_SWITCH_RIGHT }, { EL_CONVEYOR_BELT3_LEFT, GFX_BELT3_LEFT }, { EL_CONVEYOR_BELT3_MIDDLE, GFX_BELT3_MIDDLE }, { EL_CONVEYOR_BELT3_RIGHT, GFX_BELT3_RIGHT }, + { EL_CONVEYOR_BELT3_LEFT_ACTIVE, GFX_BELT3_LEFT }, + { EL_CONVEYOR_BELT3_MIDDLE_ACTIVE, GFX_BELT3_MIDDLE }, + { EL_CONVEYOR_BELT3_RIGHT_ACTIVE, GFX_BELT3_RIGHT }, { EL_CONVEYOR_BELT3_SWITCH_LEFT, GFX_BELT3_SWITCH_LEFT }, { EL_CONVEYOR_BELT3_SWITCH_MIDDLE, GFX_BELT3_SWITCH_MIDDLE }, { EL_CONVEYOR_BELT3_SWITCH_RIGHT, GFX_BELT3_SWITCH_RIGHT }, { EL_CONVEYOR_BELT4_LEFT, GFX_BELT4_LEFT }, { EL_CONVEYOR_BELT4_MIDDLE, GFX_BELT4_MIDDLE }, { EL_CONVEYOR_BELT4_RIGHT, GFX_BELT4_RIGHT }, + { EL_CONVEYOR_BELT4_LEFT_ACTIVE, GFX_BELT4_LEFT }, + { EL_CONVEYOR_BELT4_MIDDLE_ACTIVE, GFX_BELT4_MIDDLE }, + { EL_CONVEYOR_BELT4_RIGHT_ACTIVE, GFX_BELT4_RIGHT }, { EL_CONVEYOR_BELT4_SWITCH_LEFT, GFX_BELT4_SWITCH_LEFT }, { EL_CONVEYOR_BELT4_SWITCH_MIDDLE, GFX_BELT4_SWITCH_MIDDLE }, { EL_CONVEYOR_BELT4_SWITCH_RIGHT, GFX_BELT4_SWITCH_RIGHT }, @@ -1140,13 +1152,13 @@ void InitElementProperties() EL_QUICKSAND_FILLING, EL_QUICKSAND_EMPTYING, EL_MAGIC_WALL, - EL_MAGIC_WALL_EMPTY, + EL_MAGIC_WALL_ACTIVE, EL_MAGIC_WALL_EMPTYING, EL_MAGIC_WALL_FILLING, EL_MAGIC_WALL_FULL, EL_MAGIC_WALL_DEAD, EL_BD_MAGIC_WALL, - EL_BD_MAGIC_WALL_EMPTY, + EL_BD_MAGIC_WALL_ACTIVE, EL_BD_MAGIC_WALL_EMPTYING, EL_BD_MAGIC_WALL_FULL, EL_BD_MAGIC_WALL_FILLING, @@ -2056,6 +2068,23 @@ void InitElementProperties() }; static int ep_belt_num = SIZEOF_ARRAY_INT(ep_belt); + static int ep_belt_active[] = + { + EL_CONVEYOR_BELT1_LEFT_ACTIVE, + EL_CONVEYOR_BELT1_MIDDLE_ACTIVE, + EL_CONVEYOR_BELT1_RIGHT_ACTIVE, + EL_CONVEYOR_BELT2_LEFT_ACTIVE, + EL_CONVEYOR_BELT2_MIDDLE_ACTIVE, + EL_CONVEYOR_BELT2_RIGHT_ACTIVE, + EL_CONVEYOR_BELT3_LEFT_ACTIVE, + EL_CONVEYOR_BELT3_MIDDLE_ACTIVE, + EL_CONVEYOR_BELT3_RIGHT_ACTIVE, + EL_CONVEYOR_BELT4_LEFT_ACTIVE, + EL_CONVEYOR_BELT4_MIDDLE_ACTIVE, + EL_CONVEYOR_BELT4_RIGHT_ACTIVE, + }; + static int ep_belt_active_num = SIZEOF_ARRAY_INT(ep_belt_active); + static int ep_belt_switch[] = { EL_CONVEYOR_BELT1_SWITCH_LEFT, @@ -2126,6 +2155,7 @@ void InitElementProperties() static long ep2_bit[] = { EP_BIT_BELT, + EP_BIT_BELT_ACTIVE, EP_BIT_BELT_SWITCH, EP_BIT_TUBE }; @@ -2166,6 +2196,7 @@ void InitElementProperties() static int *ep2_array[] = { ep_belt, + ep_belt_active, ep_belt_switch, ep_tube }; @@ -2206,6 +2237,7 @@ void InitElementProperties() static int *ep2_num[] = { &ep_belt_num, + &ep_belt_active_num, &ep_belt_switch_num, &ep_tube_num }; diff --git a/src/main.c b/src/main.c index ac9c9d6f..94fcc56e 100644 --- a/src/main.c +++ b/src/main.c @@ -569,10 +569,18 @@ struct ConfigInfo image_config[] = { "magic_wall.filling.xpos", "0" }, { "magic_wall.filling.ypos", "8" }, { "magic_wall.filling.frames", "4" }, + { "magic_wall.full", "RocksElements.pcx" }, + { "magic_wall.full.xpos", "0" }, + { "magic_wall.full.ypos", "8" }, + { "magic_wall.full.frames", "4" }, { "magic_wall.emptying", "RocksElements.pcx" }, { "magic_wall.emptying.xpos", "0" }, { "magic_wall.emptying.ypos", "8" }, { "magic_wall.emptying.frames", "4" }, + { "magic_wall.dead", "RocksElements.pcx" }, + { "magic_wall.dead.xpos", "0" }, + { "magic_wall.dead.ypos", "8" }, + { "magic_wall.dead.frames", "1" }, { "bd_magic_wall", "RocksElements.pcx" }, { "bd_magic_wall.xpos", "12" }, @@ -586,10 +594,18 @@ struct ConfigInfo image_config[] = { "bd_magic_wall.filling.xpos", "12" }, { "bd_magic_wall.filling.ypos", "10" }, { "bd_magic_wall.filling.frames", "4" }, + { "bd_magic_wall.full", "RocksElements.pcx" }, + { "bd_magic_wall.full.xpos", "12" }, + { "bd_magic_wall.full.ypos", "10" }, + { "bd_magic_wall.full.frames", "4" }, { "bd_magic_wall.emptying", "RocksElements.pcx" }, { "bd_magic_wall.emptying.xpos", "12" }, { "bd_magic_wall.emptying.ypos", "10" }, { "bd_magic_wall.emptying.frames", "4" }, + { "bd_magic_wall.dead", "RocksElements.pcx" }, + { "bd_magic_wall.dead.xpos", "12" }, + { "bd_magic_wall.dead.ypos", "10" }, + { "bd_magic_wall.dead.frames", "1" }, { "wall_emerald", "RocksElements.pcx" }, { "wall_emerald.xpos", "4" }, diff --git a/src/main.h b/src/main.h index df5ea274..88d3c4d6 100644 --- a/src/main.h +++ b/src/main.h @@ -85,9 +85,10 @@ /* values for 'Elementeigenschaften2' */ #define EP_BIT_BELT (1 << 0) -#define EP_BIT_BELT_SWITCH (1 << 1) -#define EP_BIT_TUBE (1 << 2) -#define EP_BIT_EM_SLIPPERY_WALL (1 << 3) +#define EP_BIT_BELT_ACTIVE (1 << 1) +#define EP_BIT_BELT_SWITCH (1 << 2) +#define EP_BIT_TUBE (1 << 3) +#define EP_BIT_EM_SLIPPERY_WALL (1 << 4) #define IS_AMOEBALIVE(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBALIVE) #define IS_AMOEBOID(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBOID) @@ -121,7 +122,9 @@ #define IS_QUICK_GATE(e) (Elementeigenschaften1[e] & EP_BIT_QUICK_GATE) #define IS_OVER_PLAYER(e) (Elementeigenschaften1[e] & EP_BIT_OVER_PLAYER) #define IS_ACTIVE_BOMB(e) (Elementeigenschaften1[e] & EP_BIT_ACTIVE_BOMB) + #define IS_BELT(e) (Elementeigenschaften2[e] & EP_BIT_BELT) +#define IS_BELT_ACTIVE(e) (Elementeigenschaften2[e] & EP_BIT_BELT_ACTIVE) #define IS_BELT_SWITCH(e) (Elementeigenschaften2[e] & EP_BIT_BELT_SWITCH) #define IS_TUBE(e) (Elementeigenschaften2[e] & EP_BIT_TUBE) #define IS_EM_SLIPPERY_WALL(e) (Elementeigenschaften2[e] & EP_BIT_EM_SLIPPERY_WALL) @@ -635,8 +638,8 @@ /* "real" (and therefore drawable) runtime elements */ #define EL_FIRST_RUNTIME_REAL NUM_FILE_ELEMENTS -#define EL_MAGIC_WALL_EMPTY (EL_FIRST_RUNTIME_REAL + 0) -#define EL_BD_MAGIC_WALL_EMPTY (EL_FIRST_RUNTIME_REAL + 1) +#define EL_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 0) +#define EL_BD_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 1) #define EL_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 2) #define EL_BD_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 3) #define EL_MAGIC_WALL_DEAD (EL_FIRST_RUNTIME_REAL + 4) @@ -665,9 +668,24 @@ #define EL_BD_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 27) #define EL_AMOEBA_DRIPPING (EL_FIRST_RUNTIME_REAL + 28) #define EL_SP_EXIT_OPEN (EL_FIRST_RUNTIME_REAL + 29) +#define EL_INVISIBLE_STEELWALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 30) +#define EL_INVISIBLE_SAND_ACTIVE (EL_FIRST_RUNTIME_REAL + 31) +#define EL_INVISIBLE_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 32) +#define EL_CONVEYOR_BELT1_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 33) +#define EL_CONVEYOR_BELT1_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 34) +#define EL_CONVEYOR_BELT1_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 35) +#define EL_CONVEYOR_BELT2_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 36) +#define EL_CONVEYOR_BELT2_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 37) +#define EL_CONVEYOR_BELT2_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 38) +#define EL_CONVEYOR_BELT3_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 39) +#define EL_CONVEYOR_BELT3_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 40) +#define EL_CONVEYOR_BELT3_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 41) +#define EL_CONVEYOR_BELT4_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 42) +#define EL_CONVEYOR_BELT4_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 43) +#define EL_CONVEYOR_BELT4_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 44) /* "unreal" (and therefore not drawable) runtime elements */ -#define EL_FIRST_RUNTIME_UNREAL (EL_FIRST_RUNTIME_REAL + 30) +#define EL_FIRST_RUNTIME_UNREAL (EL_FIRST_RUNTIME_REAL + 45) #define EL_BLOCKED (EL_FIRST_RUNTIME_UNREAL + 0) #define EL_EXPLOSION (EL_FIRST_RUNTIME_UNREAL + 1) @@ -1406,44 +1424,44 @@ #define IMG_MAGIC_WALL 82 #define IMG_MAGIC_WALL_ACTIVE 83 #define IMG_MAGIC_WALL_FILLING 84 -#define IMG_MAGIC_WALL_EMPTYING 85 -#define IMG_BD_MAGIC_WALL 86 -#define IMG_BD_MAGIC_WALL_ACTIVE 87 -#define IMG_BD_MAGIC_WALL_FILLING 88 -#define IMG_BD_MAGIC_WALL_EMPTYING 89 -#define IMG_WALL_EMERALD 90 -#define IMG_WALL_DIAMOND 91 -#define IMG_WALL_EMERALD_RED 92 -#define IMG_WALL_EMERALD_PURPLE 93 -#define IMG_WALL_EMERALD_YELLOW 94 -#define IMG_WALL_BD_DIAMOND 95 -#define IMG_EMERALD_RED 96 -#define IMG_EMERALD_RED_FALLING 97 -#define IMG_EMERALD_PURPLE 98 -#define IMG_EMERALD_PURPLE_FALLING 99 -#define IMG_EMERALD_YELLOW 100 -#define IMG_EMERALD_YELLOW_FALLING 101 -#define IMG_WALL_GROWING_XY 102 -#define IMG_WALL_GROWING_X 103 -#define IMG_WALL_GROWING_Y 104 -#define IMG_DYNABOMB_XL 105 -#define IMG_BLACK_ORB 106 -#define IMG_SPEED_PILL 107 -#define IMG_BD_DIAMOND 108 -#define IMG_BD_DIAMOND_FALLING 109 -#define IMG_WALL_GROWING_RIGHT 110 -#define IMG_WALL_GROWING_LEFT 111 -#define IMG_EXIT_CLOSED 112 -#define IMG_EXIT_OPENING 113 -#define IMG_EXIT_OPEN 114 -#define IMG_DARK_YAMYAM 115 -#define IMG_DYNABOMB_ACTIVE 116 -#define IMG_DYNABOMB_NR 117 -#define IMG_DYNABOMB_SZ 118 -#define IMG_ARROW_LEFT 119 -#define IMG_ARROW_RIGHT 120 -#define IMG_ARROW_UP 121 -#define IMG_ARROW_DOWN 122 +#define IMG_MAGIC_WALL_FULL 85 +#define IMG_MAGIC_WALL_EMPTYING 86 +#define IMG_MAGIC_WALL_DEAD 87 +#define IMG_BD_MAGIC_WALL 88 +#define IMG_BD_MAGIC_WALL_ACTIVE 89 +#define IMG_BD_MAGIC_WALL_FILLING 90 +#define IMG_BD_MAGIC_WALL_FULL 91 +#define IMG_BD_MAGIC_WALL_EMPTYING 92 +#define IMG_BD_MAGIC_WALL_DEAD 93 +#define IMG_WALL_EMERALD 94 +#define IMG_WALL_DIAMOND 95 +#define IMG_WALL_EMERALD_RED 96 +#define IMG_WALL_EMERALD_PURPLE 97 +#define IMG_WALL_EMERALD_YELLOW 98 +#define IMG_WALL_BD_DIAMOND 99 +#define IMG_EMERALD_RED 100 +#define IMG_EMERALD_RED_FALLING 101 +#define IMG_EMERALD_PURPLE 102 +#define IMG_EMERALD_PURPLE_FALLING 103 +#define IMG_EMERALD_YELLOW 104 +#define IMG_EMERALD_YELLOW_FALLING 105 +#define IMG_WALL_GROWING_XY 106 +#define IMG_WALL_GROWING_X 107 +#define IMG_WALL_GROWING_Y 108 +#define IMG_DYNABOMB_XL 109 +#define IMG_BLACK_ORB 110 +#define IMG_SPEED_PILL 111 +#define IMG_BD_DIAMOND 112 +#define IMG_BD_DIAMOND_FALLING 113 +#define IMG_WALL_GROWING_RIGHT 114 +#define IMG_WALL_GROWING_LEFT 115 +#define IMG_EXIT_CLOSED 116 +#define IMG_EXIT_OPENING 117 +#define IMG_EXIT_OPEN 118 +#define IMG_DARK_YAMYAM 119 +#define IMG_DYNABOMB_ACTIVE 120 +#define IMG_DYNABOMB_NR 121 +#define IMG_DYNABOMB_SZ 122 #define IMG_BD_BUTTERFLY 123 #define IMG_BD_BUTTERFLY_MOVING 124 #define IMG_BD_BUTTERFLY_RIGHT 125 @@ -1580,8 +1598,8 @@ #define IMG_SATELLITE_MOVING 256 #define IMG_ACID_SPLASHING_LEFT 257 #define IMG_ACID_SPLASHING_RIGHT 258 -#define IMG_SPARK_BLUE 259 -#define IMG_SPARK_WHITE 260 +#define IMG_TWINKLE_BLUE 259 +#define IMG_TWINKLE_WHITE 260 #define IMG_DRAGON_FIRE_LEFT1 261 #define IMG_DRAGON_FIRE_LEFT2 262 #define IMG_DRAGON_FIRE_LEFT3 263 @@ -1656,7 +1674,7 @@ #define IMG_SP_TERMINAL 332 #define IMG_SP_TERMINAL_ACTIVE 333 #define IMG_SP_BUGGY_BASE 334 -#define IMG_SP_BUGGY_BASE_ACTIVATING 335 +#define IMG_SP_BUGGY_BASE_ACTIVE 335 #define IMG_SP_HARD_BASE1 336 #define IMG_SP_HARD_BASE2 337 #define IMG_SP_HARD_BASE3 338 @@ -1789,16 +1807,15 @@ #define IMG_TUBE_RIGHT_UP 465 #define IMG_TUBE_HORIZONTAL_UP 466 #define IMG_TUBE_LEFT_UP 467 -#define IMG_TRAP_INACTIVE 468 +#define IMG_TRAP 468 #define IMG_TRAP_ACTIVE 469 -#define IMG_TRAP_ACTIVATING 470 -#define IMG_BD_WALL 471 -#define IMG_BD_ROCK 472 -#define IMG_BD_ROCK_FALLING 473 -#define IMG_BD_ROCK_PUSHING 474 -#define IMG_DX_BOMB 475 +#define IMG_BD_WALL 470 +#define IMG_BD_ROCK 471 +#define IMG_BD_ROCK_FALLING 472 +#define IMG_BD_ROCK_PUSHING 473 +#define IMG_DX_SUPABOMB 474 -#define NUM_IMAGE_FILES 476 +#define NUM_IMAGE_FILES 475 /* values for sound configuration suffixes */ @@ -1826,7 +1843,7 @@ #define SND_SP_EMPTY_SPACE_DIGGING 18 #define SND_SP_BASE_DIGGING 19 #define SND_SP_BUGGY_BASE_DIGGING 20 -#define SND_SP_BUGGY_BASE_ACTIVATING 21 +#define SND_SP_BUGGY_BASE_ACTIVE 21 #define SND_SP_INFOTRON_COLLECTING 22 #define SND_SP_INFOTRON_IMPACT 23 #define SND_SP_ZONK_PUSHING 24 diff --git a/src/tools.c b/src/tools.c index 16ceba09..9a8c477c 100644 --- a/src/tools.c +++ b/src/tools.c @@ -458,7 +458,7 @@ void DrawPlayer(struct PlayerInfo *player) } #endif - if (element == EL_EXPLODING) + if (element == EL_EXPLOSION) return; /* draw things in the field the player is leaving, if needed */ @@ -653,7 +653,7 @@ void DrawPlayer(struct PlayerInfo *player) DrawGraphicThruMask(sx, sy, graphic + phase); } - if (player_is_moving && last_element == EL_EXPLODING) + if (player_is_moving && last_element == EL_EXPLOSION) { int phase = Frame[last_jx][last_jy]; int delay = 2; @@ -1408,9 +1408,9 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, graphic += phase2; } } - else if (element == EL_MAGIC_WALL_EMPTY || + else if (element == EL_MAGIC_WALL_ACTIVE || element == EL_MAGIC_WALL_EMPTYING || - element == EL_BD_MAGIC_WALL_EMPTY || + element == EL_BD_MAGIC_WALL_ACTIVE || element == EL_BD_MAGIC_WALL_EMPTYING || element == EL_MAGIC_WALL_FULL || element == EL_BD_MAGIC_WALL_FULL) @@ -1574,9 +1574,9 @@ void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element, graphic += phase2; } } - else if (element == EL_MAGIC_WALL_EMPTY || + else if (element == EL_MAGIC_WALL_ACTIVE || element == EL_MAGIC_WALL_EMPTYING || - element == EL_BD_MAGIC_WALL_EMPTY || + element == EL_BD_MAGIC_WALL_ACTIVE || element == EL_BD_MAGIC_WALL_EMPTYING || element == EL_MAGIC_WALL_FULL || element == EL_BD_MAGIC_WALL_FULL) @@ -3003,9 +3003,9 @@ int get_next_element(int element) case EL_QUICKSAND_FILLING: return EL_QUICKSAND_FULL; case EL_QUICKSAND_EMPTYING: return EL_QUICKSAND_EMPTY; case EL_MAGIC_WALL_FILLING: return EL_MAGIC_WALL_FULL; - case EL_MAGIC_WALL_EMPTYING: return EL_MAGIC_WALL_EMPTY; + case EL_MAGIC_WALL_EMPTYING: return EL_MAGIC_WALL_ACTIVE; case EL_BD_MAGIC_WALL_FILLING: return EL_BD_MAGIC_WALL_FULL; - case EL_BD_MAGIC_WALL_EMPTYING: return EL_BD_MAGIC_WALL_EMPTY; + case EL_BD_MAGIC_WALL_EMPTYING: return EL_BD_MAGIC_WALL_ACTIVE; case EL_AMOEBA_DRIPPING: return EL_AMOEBA_WET; default: return element; @@ -3061,7 +3061,7 @@ int el2gfx_OLD(int element) case EL_AMOEBA_DROP: return GFX_TROPFEN; case EL_BOMB: return GFX_BOMBE; case EL_MAGIC_WALL: return GFX_MAGIC_WALL_OFF; - case EL_MAGIC_WALL_EMPTY: return GFX_MAGIC_WALL_EMPTY; + case EL_MAGIC_WALL_ACTIVE: return GFX_MAGIC_WALL_EMPTY; case EL_MAGIC_WALL_EMPTYING: return GFX_MAGIC_WALL_EMPTY; case EL_MAGIC_WALL_FULL: return GFX_MAGIC_WALL_FULL; case EL_MAGIC_WALL_DEAD: return GFX_MAGIC_WALL_DEAD; @@ -3124,7 +3124,7 @@ int el2gfx_OLD(int element) case EL_WALL_EMERALD_PURPLE: return GFX_ERZ_EDEL_LILA; case EL_DARK_YAMYAM: return GFX_MAMPFER2; case EL_BD_MAGIC_WALL: return GFX_MAGIC_WALL_BD_OFF; - case EL_BD_MAGIC_WALL_EMPTY: return GFX_MAGIC_WALL_BD_EMPTY; + case EL_BD_MAGIC_WALL_ACTIVE: return GFX_MAGIC_WALL_BD_EMPTY; case EL_BD_MAGIC_WALL_EMPTYING: return GFX_MAGIC_WALL_BD_EMPTY; case EL_BD_MAGIC_WALL_FULL: return GFX_MAGIC_WALL_BD_FULL; case EL_BD_MAGIC_WALL_DEAD: return GFX_MAGIC_WALL_BD_DEAD; @@ -3187,24 +3187,36 @@ int el2gfx_OLD(int element) case EL_CONVEYOR_BELT1_LEFT: return GFX_BELT1_LEFT; case EL_CONVEYOR_BELT1_MIDDLE: return GFX_BELT1_MIDDLE; case EL_CONVEYOR_BELT1_RIGHT: return GFX_BELT1_RIGHT; + case EL_CONVEYOR_BELT1_LEFT_ACTIVE: return GFX_BELT1_LEFT; + case EL_CONVEYOR_BELT1_MIDDLE_ACTIVE:return GFX_BELT1_MIDDLE; + case EL_CONVEYOR_BELT1_RIGHT_ACTIVE:return GFX_BELT1_RIGHT; case EL_CONVEYOR_BELT1_SWITCH_LEFT: return GFX_BELT1_SWITCH_LEFT; case EL_CONVEYOR_BELT1_SWITCH_MIDDLE:return GFX_BELT1_SWITCH_MIDDLE; case EL_CONVEYOR_BELT1_SWITCH_RIGHT:return GFX_BELT1_SWITCH_RIGHT; case EL_CONVEYOR_BELT2_LEFT: return GFX_BELT2_LEFT; case EL_CONVEYOR_BELT2_MIDDLE: return GFX_BELT2_MIDDLE; case EL_CONVEYOR_BELT2_RIGHT: return GFX_BELT2_RIGHT; + case EL_CONVEYOR_BELT2_LEFT_ACTIVE: return GFX_BELT2_LEFT; + case EL_CONVEYOR_BELT2_MIDDLE_ACTIVE:return GFX_BELT2_MIDDLE; + case EL_CONVEYOR_BELT2_RIGHT_ACTIVE:return GFX_BELT2_RIGHT; case EL_CONVEYOR_BELT2_SWITCH_LEFT: return GFX_BELT2_SWITCH_LEFT; case EL_CONVEYOR_BELT2_SWITCH_MIDDLE:return GFX_BELT2_SWITCH_MIDDLE; case EL_CONVEYOR_BELT2_SWITCH_RIGHT:return GFX_BELT2_SWITCH_RIGHT; case EL_CONVEYOR_BELT3_LEFT: return GFX_BELT3_LEFT; case EL_CONVEYOR_BELT3_MIDDLE: return GFX_BELT3_MIDDLE; case EL_CONVEYOR_BELT3_RIGHT: return GFX_BELT3_RIGHT; + case EL_CONVEYOR_BELT3_LEFT_ACTIVE: return GFX_BELT3_LEFT; + case EL_CONVEYOR_BELT3_MIDDLE_ACTIVE:return GFX_BELT3_MIDDLE; + case EL_CONVEYOR_BELT3_RIGHT_ACTIVE:return GFX_BELT3_RIGHT; case EL_CONVEYOR_BELT3_SWITCH_LEFT: return GFX_BELT3_SWITCH_LEFT; case EL_CONVEYOR_BELT3_SWITCH_MIDDLE:return GFX_BELT3_SWITCH_MIDDLE; case EL_CONVEYOR_BELT3_SWITCH_RIGHT:return GFX_BELT3_SWITCH_RIGHT; case EL_CONVEYOR_BELT4_LEFT: return GFX_BELT4_LEFT; case EL_CONVEYOR_BELT4_MIDDLE: return GFX_BELT4_MIDDLE; case EL_CONVEYOR_BELT4_RIGHT: return GFX_BELT4_RIGHT; + case EL_CONVEYOR_BELT4_LEFT_ACTIVE: return GFX_BELT4_LEFT; + case EL_CONVEYOR_BELT4_MIDDLE_ACTIVE:return GFX_BELT4_MIDDLE; + case EL_CONVEYOR_BELT4_RIGHT_ACTIVE:return GFX_BELT4_RIGHT; case EL_CONVEYOR_BELT4_SWITCH_LEFT: return GFX_BELT4_SWITCH_LEFT; case EL_CONVEYOR_BELT4_SWITCH_MIDDLE:return GFX_BELT4_SWITCH_MIDDLE; case EL_CONVEYOR_BELT4_SWITCH_RIGHT:return GFX_BELT4_SWITCH_RIGHT;