X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=4970aac4afd76360e37aebac14ba5450a3c783b5;hb=1e2c52c04364f8b724bde8ee540c56dd1062a1c9;hp=b0a19802b855a91a6389231c5ed3006cf2e6d9f9;hpb=7b47ce7ba0f673f0de5130daf5726104d0b38902;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index b0a19802..4970aac4 100644 --- a/src/main.c +++ b/src/main.c @@ -58,7 +58,8 @@ unsigned long Properties1[MAX_NUM_ELEMENTS]; unsigned long Properties2[MAX_NUM_ELEMENTS]; int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; -short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int lev_fieldx, lev_fieldy; int scroll_x, scroll_y; @@ -89,19 +90,19 @@ struct TapeInfo tape; struct SetupInfo setup; struct GameInfo game; struct GlobalInfo global; -struct FileInfo *image_files; -struct FileInfo *sound_files; -struct GraphicInfo graphic_info[NUM_IMAGE_FILES]; -struct SoundInfo sound_info[NUM_SOUND_FILES]; +struct GraphicInfo *graphic_info = NULL; +struct SoundInfo *sound_info = NULL; /* ------------------------------------------------------------------------- */ /* element definitions */ /* ------------------------------------------------------------------------- */ -struct ElementInfo element_info[MAX_NUM_ELEMENTS] = +struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = { - /* "real" level file elements */ + /* ----------------------------------------------------------------------- */ + /* "real" level file elements */ + /* ----------------------------------------------------------------------- */ { "empty_space", @@ -417,7 +418,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "unused_63", - NULL, + "unused", "(not used)" }, { @@ -636,7 +637,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "black_orb", - NULL, + "black_orb", "black orb bomb" }, { @@ -661,22 +662,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "arrow_blue_left", - NULL, + "arrow", "arrow left" }, { "arrow_blue_right", - NULL, + "arrow", "arrow right" }, { "arrow_blue_up", - NULL, + "arrow", "arrow up" }, { "arrow_blue_down", - NULL, + "arrow", "arrow down" }, { @@ -696,402 +697,402 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "char_space", - NULL, + "char", "letter ' '" }, { "char_exclam", - NULL, + "char", "letter '!'" }, { "char_quotedbl", - NULL, + "char", "letter '\"'" }, { "char_numbersign", - NULL, + "char", "letter '#'" }, { "char_dollar", - NULL, + "char", "letter '$'" }, { "char_procent", - NULL, + "char", "letter '%'" }, { "char_ampersand", - NULL, + "char", "letter '&'" }, { "char_apostrophe", - NULL, + "char", "letter '''" }, { "char_parenleft", - NULL, + "char", "letter '('" }, { "char_parenright", - NULL, + "char", "letter ')'" }, { "char_asterisk", - NULL, + "char", "letter '*'" }, { "char_plus", - NULL, + "char", "letter '+'" }, { "char_comma", - NULL, + "char", "letter ','" }, { "char_minus", - NULL, + "char", "letter '-'" }, { "char_period", - NULL, + "char", "letter '.'" }, { "char_slash", - NULL, + "char", "letter '/'" }, { "char_0", - NULL, + "char", "letter '0'" }, { "char_1", - NULL, + "char", "letter '1'" }, { "char_2", - NULL, + "char", "letter '2'" }, { "char_3", - NULL, + "char", "letter '3'" }, { "char_4", - NULL, + "char", "letter '4'" }, { "char_5", - NULL, + "char", "letter '5'" }, { "char_6", - NULL, + "char", "letter '6'" }, { "char_7", - NULL, + "char", "letter '7'" }, { "char_8", - NULL, + "char", "letter '8'" }, { "char_9", - NULL, + "char", "letter '9'" }, { "char_colon", - NULL, + "char", "letter ':'" }, { "char_semicolon", - NULL, + "char", "letter ';'" }, { "char_less", - NULL, + "char", "letter '<'" }, { "char_equal", - NULL, + "char", "letter '='" }, { "char_greater", - NULL, + "char", "letter '>'" }, { "char_question", - NULL, + "char", "letter '?'" }, { "char_at", - NULL, + "char", "letter '@'" }, { "char_a", - NULL, + "char", "letter 'A'" }, { "char_b", - NULL, + "char", "letter 'B'" }, { "char_c", - NULL, + "char", "letter 'C'" }, { "char_d", - NULL, + "char", "letter 'D'" }, { "char_e", - NULL, + "char", "letter 'E'" }, { "char_f", - NULL, + "char", "letter 'F'" }, { "char_g", - NULL, + "char", "letter 'G'" }, { "char_h", - NULL, + "char", "letter 'H'" }, { "char_i", - NULL, + "char", "letter 'I'" }, { "char_j", - NULL, + "char", "letter 'J'" }, { "char_k", - NULL, + "char", "letter 'K'" }, { "char_l", - NULL, + "char", "letter 'L'" }, { "char_m", - NULL, + "char", "letter 'M'" }, { "char_n", - NULL, + "char", "letter 'N'" }, { "char_o", - NULL, + "char", "letter 'O'" }, { "char_p", - NULL, + "char", "letter 'P'" }, { "char_q", - NULL, + "char", "letter 'Q'" }, { "char_r", - NULL, + "char", "letter 'R'" }, { "char_s", - NULL, + "char", "letter 'S'" }, { "char_t", - NULL, + "char", "letter 'T'" }, { "char_u", - NULL, + "char", "letter 'U'" }, { "char_v", - NULL, + "char", "letter 'V'" }, { "char_w", - NULL, + "char", "letter 'W'" }, { "char_x", - NULL, + "char", "letter 'X'" }, { "char_y", - NULL, + "char", "letter 'Y'" }, { "char_z", - NULL, + "char", "letter 'Z'" }, { "char_ae", - NULL, + "char", "letter 'Ä'" }, { "char_oe", - NULL, + "char", "letter 'Ö'" }, { "char_ue", - NULL, + "char", "letter 'Ü'" }, { "char_copyright", - NULL, + "char", "letter '^'" }, { "char_underscore", - NULL, + "char", "letter ''" }, { "char_empty", - NULL, + "char", "letter ''" }, { "char_degree", - NULL, + "char", "letter ''" }, { "char_tm", - NULL, + "char", "letter ''" }, { "char_cursor", - NULL, + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { - NULL, - NULL, + "char_unused", + "char", "letter ''" }, { @@ -1366,12 +1367,12 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "unused_254", - NULL, + "unused", "(not used)" }, { "unused_255", - NULL, + "unused", "(not used)" }, { @@ -1441,12 +1442,12 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "unused_269", - NULL, + "unused", "-" }, { "unused_270", - NULL, + "unused", "-" }, { @@ -1681,22 +1682,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "dx_unknown_15", - NULL, + "unknown", "dx unknown element 15" }, { "dx_unknown_42", - NULL, + "unknown", "dx unknown element 42" }, { "unused_319", - NULL, + "unused", "(not used)" }, { "unused_320", - NULL, + "unused", "(not used)" }, { @@ -1886,12 +1887,12 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = }, { "unused_358", - NULL, + "unused", "-" }, { "unused_359", - NULL, + "unused", "-" }, { @@ -2535,7 +2536,9 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = "custom element 128" }, - /* "real" (and therefore drawable) runtime elements */ + /* ----------------------------------------------------------------------- */ + /* "real" (and therefore drawable) runtime elements */ + /* ----------------------------------------------------------------------- */ { "em_key1", @@ -2763,8 +2766,283 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = "-" }, + /* ----------------------------------------------------------------------- */ + /* "unreal" (and therefore not drawable) runtime elements */ + /* ----------------------------------------------------------------------- */ + + { + "blocked", + "-", + "-" + }, + { + "explosion", + "-", + "-" + }, + { + "nut_cracking", + "-", + "-" + }, + { + "acid_splash_left", + "-", + "-" + }, { - "", + "acid_splash_right", + "-", + "-" + }, + { + "amoeba_creating", + "-", + "-" + }, + { + "amoeba_shrinking", + "-", + "-" + }, + { + "wall_growing_active", + "-", + "-" + }, + { + "flames", + "-", + "-" + }, + { + "player_is_leaving", + "-", + "-" + }, + { + "quicksand_filling", + "-", + "-" + }, + { + "magic_wall_filling", + "-", + "-" + }, + { + "bd_magic_wall_filling", + "-", + "-" + }, + + /* ----------------------------------------------------------------------- */ + /* dummy elements (never used as game elements, only used as graphics) */ + /* ----------------------------------------------------------------------- */ + + { + "steelwall_topleft", + "-", + "-" + }, + { + "steelwall_topright", + "-", + "-" + }, + { + "steelwall_bottomleft", + "-", + "-" + }, + { + "steelwall_bottomright", + "-", + "-" + }, + { + "steelwall_horizontal", + "-", + "-" + }, + { + "steelwall_vertical", + "-", + "-" + }, + { + "invisible_steelwall_topleft", + "-", + "-" + }, + { + "invisible_steelwall_topright", + "-", + "-" + }, + { + "invisible_steelwall_bottomleft", + "-", + "-" + }, + { + "invisible_steelwall_bottomright", + "-", + "-" + }, + { + "invisible_steelwall_horizontal", + "-", + "-" + }, + { + "invisible_steelwall_vertical", + "-", + "-" + }, + { + "sand_crumbled", + "-", + "-" + }, + { + "bd_amoeba_part1", + "-", + "-" + }, + { + "bd_amoeba_part2", + "-", + "-" + }, + { + "bd_amoeba_part3", + "-", + "-" + }, + { + "bd_amoeba_part4", + "-", + "-" + }, + { + "amoeba_wet_part1", + "-", + "-" + }, + { + "amoeba_wet_part2", + "-", + "-" + }, + { + "amoeba_wet_part3", + "-", + "-" + }, + { + "amoeba_wet_part4", + "-", + "-" + }, + { + "amoeba_dry_part1", + "-", + "-" + }, + { + "amoeba_dry_part2", + "-", + "-" + }, + { + "amoeba_dry_part3", + "-", + "-" + }, + { + "amoeba_dry_part4", + "-", + "-" + }, + { + "amoeba_full_part1", + "-", + "-" + }, + { + "amoeba_full_part2", + "-", + "-" + }, + { + "amoeba_full_part3", + "-", + "-" + }, + { + "amoeba_full_part4", + "-", + "-" + }, + { + "amoeba_dead_part1", + "-", + "-" + }, + { + "amoeba_dead_part2", + "-", + "-" + }, + { + "amoeba_dead_part3", + "-", + "-" + }, + { + "amoeba_dead_part4", + "-", + "-" + }, + { + "dynabomb_active", + "-", + "-" + }, + { + "shield_normal_active", + "-", + "-" + }, + { + "shield_deadly_active", + "-", + "-" + }, + { + "arrow_red_left", + "-", + "-" + }, + { + "arrow_red_right", + "-", + "-" + }, + { + "arrow_red_up", + "-", + "-" + }, + { + "arrow_red_down", + "-", + "-" + }, + + { + NULL, NULL, "-" } @@ -2775,7 +3053,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = /* element action and direction definitions */ /* ------------------------------------------------------------------------- */ -struct ElementActionInfo element_action_info[] = +struct ElementActionInfo element_action_info[NUM_ACTIONS + 1] = { { ".[DEFAULT]", ACTION_DEFAULT, TRUE }, { ".waiting", ACTION_WAITING, TRUE }, @@ -2799,17 +3077,25 @@ struct ElementActionInfo element_action_info[] = { ".active", ACTION_ACTIVE, TRUE }, { ".other", ACTION_OTHER, FALSE }, - { NULL, 0, 0 }, + { NULL, 0, 0 } }; -struct ElementDirectionInfo element_direction_info[] = +struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS + 1] = { { ".left", MV_BIT_LEFT }, { ".right", MV_BIT_RIGHT }, { ".up", MV_BIT_UP }, { ".down", MV_BIT_DOWN }, - { NULL, 0 }, + { NULL, 0 } +}; + +struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] = +{ + { ".EDITOR", 0, }, + { ".PREVIEW", 0, }, + + { NULL, 0, } };