X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=8f53e89daf091101eac19c2396f4c4df7f49b119;hb=f86b45bef20957bce2bca71880becbbb145203b1;hp=68b2cd695d0b50fc80a4d3f89f2405fd1435ce69;hpb=f187fddd964c6da2ab42b3da9f43961842f62572;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 68b2cd69..8f53e89d 100644 --- a/src/main.h +++ b/src/main.h @@ -898,6 +898,23 @@ (e) == EL_PEARL ? EL_BOMB : \ (e) == EL_CRYSTAL ? EL_CRYSTAL : \ EL_ROCK) + +#define IS_BD_PLAYER_ELEMENT(e) ((e) == EL_BD_INBOX || \ + (e) == EL_BD_PLAYER || \ + (e) == EL_BD_PLAYER_WITH_BOMB || \ + (e) == EL_BD_PLAYER_GLUED || \ + (e) == EL_BD_PLAYER_STIRRING) + +#define IS_BD_BITER(e) ((e) == EL_BD_BITER || \ + (e) == EL_BD_BITER_RIGHT || \ + (e) == EL_BD_BITER_UP || \ + (e) == EL_BD_BITER_LEFT || \ + (e) == EL_BD_BITER_DOWN) + +#define IS_SOKOBAN_OBJECT_OR_FIELD(e) ((e) == EL_SOKOBAN_OBJECT || \ + (e) == EL_SOKOBAN_FIELD_EMPTY || \ + (e) == EL_SOKOBAN_FIELD_FULL) + #define IS_DRAWABLE(e) ((e) < EL_BLOCKED) #define IS_NOT_DRAWABLE(e) ((e) >= EL_BLOCKED) #define TAPE_IS_EMPTY(x) ((x).length == 0) @@ -1060,7 +1077,7 @@ #define SC_PEARL 12 #define SC_SHIELD 13 #define SC_ELEM_BONUS 14 -#define SC_UNKNOWN_15 15 +#define SC_DIAMOND_EXTRA 15 #define LEVEL_SCORE_ELEMENTS 16 // level elements with score @@ -1993,7 +2010,8 @@ #define EL_DF_END_2 EL_DF_SLOPE_END // BD style elements -#define EL_BD_PLAYER 1253 +#define EL_BD_EMPTY_SPACE 1253 +#define EL_BD_EMPTY EL_BD_EMPTY_SPACE #define EL_BD_SAND 1254 #define EL_BD_SAND_2 1255 #define EL_BD_SAND_BALL 1256 @@ -2120,13 +2138,14 @@ #define EL_BD_DRAGONFLY_DOWN 1377 #define EL_BD_BOMB 1378 #define EL_BD_NITRO_PACK 1379 -#define EL_BD_PLAYER_WITH_BOMB 1380 -#define EL_BD_PLAYER_GLUED 1381 -#define EL_BD_PLAYER_STIRRING 1382 -#define EL_BD_FAKE_BONUS 1383 -#define EL_BD_COVERED 1384 +#define EL_BD_PLAYER 1380 +#define EL_BD_PLAYER_WITH_BOMB 1381 +#define EL_BD_PLAYER_GLUED 1382 +#define EL_BD_PLAYER_STIRRING 1383 +#define EL_BD_FAKE_BONUS 1384 +#define EL_BD_COVERED 1385 -#define NUM_FILE_ELEMENTS 1385 +#define NUM_FILE_ELEMENTS 1386 // "real" (and therefore drawable) runtime elements @@ -2292,9 +2311,10 @@ #define EL_GRAPHIC_6 (EL_FIRST_DUMMY + 34) #define EL_GRAPHIC_7 (EL_FIRST_DUMMY + 35) #define EL_GRAPHIC_8 (EL_FIRST_DUMMY + 36) +#define EL_BD_GAME_GRAPHICS_COLOR_TEMPLATE (EL_FIRST_DUMMY + 37) // internal elements (only used for internal purposes like copying) -#define EL_FIRST_INTERNAL (EL_FIRST_DUMMY + 37) +#define EL_FIRST_INTERNAL (EL_FIRST_DUMMY + 38) #define EL_INTERNAL_CLIPBOARD_CUSTOM (EL_FIRST_INTERNAL + 0) #define EL_INTERNAL_CLIPBOARD_CHANGE (EL_FIRST_INTERNAL + 1) @@ -3466,7 +3486,61 @@ struct LevelInfo int initial_inventory_size[MAX_PLAYERS]; int initial_inventory_content[MAX_PLAYERS][MAX_INITIAL_INVENTORY_SIZE]; + int bd_cycle_delay_ms; // BD game cycle delay (in milliseconds) + int bd_cycle_delay_c64; // BD game cycle delay (in C64 game units) + int bd_hatching_delay_cycles; // BD hatching delay (in game cycles) + int bd_hatching_delay_seconds; // BD hatching delay (in seconds) + int bd_scheduling_type; // BD engine scheduling type + boolean bd_pal_timing; // BD engine uses special PAL timing + boolean bd_line_shifting_borders; // BD engine uses line-shifting wrap-around + boolean bd_scan_first_and_last_row; // BD engine scans top and bottom border rows + boolean bd_short_explosions; // BD engine uses four game cycles for explosions + boolean bd_gravity_affects_all; // BD engine gravity affects all falling objects + boolean bd_intermission; // BD level is intermission boolean bd_diagonal_movements; // BD style diagonal movements + boolean bd_topmost_player_active; // BD engine uses first player found on playfield + int bd_snap_element; // BD element that is created when player is snapping + int bd_pushing_prob; // BD player probability to push rocks + int bd_pushing_prob_with_sweet; // BD player probability to push rocks after eating sweet + boolean bd_push_mega_rock_with_sweet; // BD player can push mega rocks after eating sweet + boolean bd_magic_wall_wait_hatching; // BD magic wall waits for player's birth + boolean bd_magic_wall_stops_amoeba; // BD magic wall turns amoeba to diamonds + boolean bd_amoeba_wait_for_hatching; // BD amoeba waits for player's birth + boolean bd_amoeba_start_immediately; // BD amoeba growth starts immediately + boolean bd_amoeba_2_explode_by_amoeba;// BD amoeba 2 explodes if touched by BD amoeba + int bd_amoeba_threshold_too_big; // BD amoeba turns to stones if threshold reached + int bd_amoeba_slow_growth_time; // BD amoeba slow growth time (in seconds) + int bd_amoeba_slow_growth_rate; // BD amoeba slow growth rate (in percent) + int bd_amoeba_fast_growth_rate; // BD amoeba fast growth rate (in percent) + int bd_amoeba_content_too_big; // BD amoeba changes to this element if too big + int bd_amoeba_content_enclosed; // BD amoeba changes to this element if enclosed + int bd_amoeba_2_threshold_too_big; // BD amoeba 2 turns to stones if threshold reached + int bd_amoeba_2_slow_growth_time; // BD amoeba 2 slow growth time (in seconds) + int bd_amoeba_2_slow_growth_rate; // BD amoeba 2 slow growth rate (in percent) + int bd_amoeba_2_fast_growth_rate; // BD amoeba 2 fast growth rate (in percent) + int bd_amoeba_2_content_too_big; // BD amoeba 2 changes to this element if too big + int bd_amoeba_2_content_enclosed; // BD amoeba 2 changes to this element if enclosed + int bd_amoeba_2_content_exploding; // BD amoeba 2 changes to this element if exploding + int bd_amoeba_2_content_looks_like; // BD amoeba 2 looks like this other game element + int bd_clock_extra_time; // BD engine extra time when collecting clock + boolean bd_voodoo_collects_diamonds; // BD voodoo doll can collect diamonds for the player + boolean bd_voodoo_hurt_kills_player; // BD voodoo doll hurt in any way, player is killed + boolean bd_voodoo_dies_by_rock; // BD voodoo doll can be killed by a falling rock + boolean bd_voodoo_vanish_by_explosion;// BD voodoo doll can be destroyed by explosions + int bd_voodoo_penalty_time; // BD engine penalty time when voodoo doll destroyed + boolean bd_slime_is_predictable; // BD slime uses predictable random number generator + boolean bd_slime_correct_random; // BD slime needs corrected random number generator + int bd_slime_permeability_rate; // BD slime permeability rate for unpredictable slime + int bd_slime_permeability_bits_c64; // BD slime permeability bits for predictable slime + int bd_slime_random_seed_c64; // BD slime random number seed for predictable slime + int bd_cave_random_seed_c64; // BD cave random number seed for predictable slime + int bd_acid_eats_element; // BD acid eats this game element when spreading + int bd_acid_spread_rate; // BD acid probability of spreading (in percent) + int bd_acid_turns_to_element; // BD acid target element after spreading + int bd_biter_move_delay; // BD biter delay between movements (in BD frames) + int bd_biter_eats_element; // BD biter eats this game element when moving + int bd_bladder_converts_by_element; // BD bladder converts to clock by touching this element + boolean em_slippery_gems; // EM style "gems slip from wall" behaviour boolean em_explodes_by_fire; // EM style chain explosion behaviour boolean use_spring_bug; // for compatibility with old levels