X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=c721a4cd734808cc3cdf4b6fbb8f1a8269fc26a8;hb=c9bb6e0a6eecbf84320be79b121bd957a938a08c;hp=e9817ae3b7e59b8a8dc1cf13b13ad10c8b57f503;hpb=ac4c028b525860750de315d626730ac493f56944;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index e9817ae3..c721a4cd 100644 --- a/src/main.c +++ b/src/main.c @@ -27,8 +27,8 @@ Bitmap *bitmap_db_field, *bitmap_db_door; #if 0 Pixmap tile_clipmask[NUM_TILES]; #endif -DrawBuffer *fieldbuffer; -DrawBuffer *drawto_field; +DrawBuffer *fieldbuffer; +DrawBuffer *drawto_field; int game_status = -1; boolean level_editor_test_game = FALSE; @@ -44,6 +44,7 @@ short Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +short ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; @@ -92,6 +93,8 @@ struct TapeInfo tape; struct SetupInfo setup; struct GameInfo game; struct GlobalInfo global; +struct MenuInfo menu; +struct DoorInfo door; struct GraphicInfo *graphic_info = NULL; struct SoundInfo *sound_info = NULL; @@ -289,45 +292,42 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = "blue key" }, { - "gate_1_closed", + "gate_1", "gate", "red door" }, { - "gate_2_closed", + "gate_2", "gate", "yellow door" }, { - "gate_3_closed", + "gate_3", "gate", "green door" }, { - "gate_4_closed", + "gate_4", "gate", "blue door" }, { - "gate_1_gray_closed", + "gate_1_gray", "gate", "gray door (opened by red key)" }, { - "gate_2_gray_closed", + "gate_2_gray", "gate", - "gray door (opened by yellow key)" - }, + "gray door (opened by yellow key)"}, { - "gate_3_gray_closed", + "gate_3_gray", "gate", - "gray door (opened by green key)" - }, + "gray door (opened by green key)"}, { - "gate_4_gray_closed", + "gate_4_gray", "gate", - "gray door (opened by blue key)" - }, + "gray door (opened by blue key)"}, { "dynamite", "dynamite", @@ -1118,22 +1118,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = "growing wall (any direction)" }, { - "em_gate_1_closed", + "em_gate_1", "gate", "red door (EM style)" }, { - "em_gate_2_closed", + "em_gate_2", "gate", "yellow door (EM style)" }, { - "em_gate_3_closed", + "em_gate_3", "gate", "green door (EM style)" }, { - "em_gate_4_closed", + "em_gate_4", "gate", "blue door (EM style)" }, @@ -1353,22 +1353,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = "chip (lower half)" }, { - "em_gate_1_gray_closed", + "em_gate_1_gray", "gate", "gray door (EM style, red key)" }, { - "em_gate_2_gray_closed", + "em_gate_2_gray", "gate", "gray door (EM style, yellow key)" }, { - "em_gate_3_gray_closed", + "em_gate_3_gray", "gate", "gray door (EM style, green key)" }, { - "em_gate_4_gray_closed", + "em_gate_4_gray", "gate", "gray door (EM style, blue key)" }, @@ -2777,86 +2777,6 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = "magic_wall", "-" }, - { - "gate_1_open", - "gate", - "red door" - }, - { - "gate_2_open", - "gate", - "yellow door" - }, - { - "gate_3_open", - "gate", - "green door" - }, - { - "gate_4_open", - "gate", - "blue door" - }, - { - "gate_1_gray_open", - "gate", - "gray door (opened by red key)" - }, - { - "gate_2_gray_open", - "gate", - "gray door (opened by yellow key)" - }, - { - "gate_3_gray_open", - "gate", - "gray door (opened by green key)" - }, - { - "gate_4_gray_open", - "gate", - "gray door (opened by blue key)" - }, - { - "em_gate_1_open", - "gate", - "red door (EM style)" - }, - { - "em_gate_2_open", - "gate", - "yellow door (EM style)" - }, - { - "em_gate_3_open", - "gate", - "green door (EM style)" - }, - { - "em_gate_4_open", - "gate", - "blue door (EM style)" - }, - { - "em_gate_1_gray_open", - "gate", - "gray door (EM style, red key)" - }, - { - "em_gate_2_gray_open", - "gate", - "gray door (EM style, yellow key)" - }, - { - "em_gate_3_gray_open", - "gate", - "gray door (EM style, green key)" - }, - { - "em_gate_4_gray_open", - "gate", - "gray door (EM style, blue key)" - }, /* ----------------------------------------------------------------------- */ /* "unreal" (and therefore not drawable) runtime elements */ @@ -2877,6 +2797,11 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = "-", "-" }, + { + "diamond_breaking", + "-", + "-" + }, { "acid_splash_left", "-", @@ -3012,6 +2937,26 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] = "-", "-" }, + { + "[default]", + "default", + "-" + }, + { + "[bd_default]", + "bd_default", + "-" + }, + { + "[sp_default]", + "sp_default", + "-" + }, + { + "[sb_default]", + "sb_default", + "-" + }, /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */ @@ -3071,22 +3016,56 @@ struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS + 1] = struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] = { - { ".MAIN", 0, }, - { ".LEVELS", 0, }, - { ".SCORES", 0, }, - { ".EDITOR", 0, }, - { ".INFO", 0, }, - { ".SETUP", 0, }, - { ".DOOR", 0, }, - { ".PREVIEW", 0, }, + { ".MAIN", GAME_MODE_MAIN, }, + { ".LEVELS", GAME_MODE_LEVELS }, + { ".SCORES", GAME_MODE_SCORES, }, + { ".EDITOR", GAME_MODE_EDITOR, }, + { ".INFO", GAME_MODE_INFO, }, + { ".SETUP", GAME_MODE_SETUP, }, + { ".DOOR", GAME_MODE_PSEUDO_DOOR, }, + { ".PREVIEW", GAME_MODE_PSEUDO_PREVIEW, }, { NULL, 0, } }; +struct TokenIntPtrInfo image_config_vars[] = +{ + { "global.num_toons", &global.num_toons }, + + { "menu.draw_xoffset", &menu.draw_xoffset_default }, + { "menu.draw_yoffset", &menu.draw_yoffset_default }, + { "menu.draw_xoffset.MAIN", &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN] }, + { "menu.draw_yoffset.MAIN", &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN] }, + { "menu.draw_xoffset.LEVELS", &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS] }, + { "menu.draw_yoffset.LEVELS", &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS] }, + { "menu.draw_xoffset.SCORES", &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES] }, + { "menu.draw_yoffset.SCORES", &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES] }, + { "menu.draw_xoffset.EDITOR", &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR] }, + { "menu.draw_yoffset.EDITOR", &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR] }, + { "menu.draw_xoffset.INFO", &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO] }, + { "menu.draw_yoffset.INFO", &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO] }, + { "menu.draw_xoffset.SETUP", &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP] }, + { "menu.draw_yoffset.SETUP", &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP] }, + + { "menu.list_size", &menu.list_size_default }, + { "menu.list_size.LEVELS", &menu.list_size[GFX_SPECIAL_ARG_LEVELS] }, + { "menu.list_size.SCORES", &menu.list_size[GFX_SPECIAL_ARG_SCORES] }, + { "menu.list_size.INFO", &menu.list_size[GFX_SPECIAL_ARG_INFO] }, + + { "door.step_offset", &door.step_offset }, + { "door.step_delay", &door.step_delay }, + + { NULL, NULL, } +}; + + /* ------------------------------------------------------------------------- */ /* font definitions */ /* ------------------------------------------------------------------------- */ +/* Important: When one entry is a prefix of another entry, the longer entry + must come first, because the dynamic configuration does prefix matching! */ + struct FontInfo font_info[NUM_FONTS + 1] = { { "font.initial_1" }, @@ -3097,19 +3076,26 @@ struct FontInfo font_info[NUM_FONTS + 1] = { "font.title_2" }, { "font.menu_1" }, { "font.menu_2" }, + { "font.text_1.active" }, + { "font.text_2.active" }, + { "font.text_3.active" }, + { "font.text_4.active" }, { "font.text_1" }, { "font.text_2" }, { "font.text_3" }, { "font.text_4" }, - { "font.input" }, - { "font.input.active" }, + { "font.input_1.active" }, + { "font.input_2.active" }, + { "font.input_1" }, + { "font.input_2" }, { "font.option_off" }, { "font.option_on" }, { "font.value_1" }, { "font.value_2" }, { "font.value_old" }, - { "font.tape_recorder" }, { "font.level_number" }, + { "font.tape_recorder" }, + { "font.game_info" }, };