X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fmain.c;h=ca59e8f692fc7a70d71b948f6197db1fe5067334;hp=bfa11abd651c4b346c8f4977443f9a56c7c93fbc;hb=a7c06161253796a30a0237a7f5a044f459c8cf35;hpb=ba702cd338586991ab20176cf5587afbb4d77af7 diff --git a/src/main.c b/src/main.c index bfa11abd..ca59e8f6 100644 --- a/src/main.c +++ b/src/main.c @@ -17,13 +17,16 @@ #include "init.h" #include "game.h" #include "tape.h" +#include "tools.h" #include "events.h" #include "config.h" +Bitmap *bitmap_db_store; Bitmap *bitmap_db_cross; Bitmap *bitmap_db_field; Bitmap *bitmap_db_panel; Bitmap *bitmap_db_door; +Bitmap *bitmap_db_toons; DrawBuffer *fieldbuffer; DrawBuffer *drawto_field; @@ -38,7 +41,15 @@ SDL_Thread *server_thread; int key_joystick_mapping = 0; +#if 1 +#if NEW_SCROLL +boolean redraw[2 + MAX_LEV_FIELDX + 2][2 + MAX_LEV_FIELDY + 2]; +#else +boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2]; +#endif +#else boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; +#endif int redraw_x1 = 0, redraw_y1 = 0; short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; @@ -74,19 +85,47 @@ int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +int GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; + +int ActiveElement[MAX_NUM_ELEMENTS]; +int ActiveButton[NUM_IMAGE_FILES]; +int ActiveFont[NUM_FONTS]; int lev_fieldx, lev_fieldy; int scroll_x, scroll_y; +int WIN_XSIZE = 672, WIN_YSIZE = 560; +int SCR_FIELDX = 17, SCR_FIELDY = 17; +int SX = 8, SY = 8; +int REAL_SX = 6, REAL_SY = 6; +int DX = 566, DY = 60; +int VX = 566, VY = 400; +int EX = 566, EY = 356; +int dDX, dDY; +int SXSIZE = 17 * TILEX; /* SCR_FIELDX * TILEX */ +int SYSIZE = 17 * TILEY; /* SCR_FIELDY * TILEY */ +int FULL_SXSIZE = 2 + 17 * TILEX + 2; /* 2 + SXSIZE + 2 */ +int FULL_SYSIZE = 2 + 17 * TILEY + 2; /* 2 + SYSIZE + 2 */ +int TILESIZE_VAR = TILESIZE; + +#if 1 +int FX, FY; +#else int FX = SX, FY = SY; +#endif int ScrollStepSize; int ScreenMovDir = MV_NONE, ScreenMovPos = 0; int ScreenGfxPos = 0; int BorderElement = EL_STEELWALL; int GameFrameDelay = GAME_FRAME_DELAY; int FfwdFrameDelay = FFWD_FRAME_DELAY; +#if 1 +int BX1, BY1; +int BX2, BY2; +#else int BX1 = 0, BY1 = 0; int BX2 = SCR_FIELDX - 1, BY2 = SCR_FIELDY - 1; +#endif int SBX_Left, SBX_Right; int SBY_Upper, SBY_Lower; int ZX, ZY; @@ -106,19 +145,32 @@ struct SetupInfo setup; struct GameInfo game; struct GlobalInfo global; struct BorderInfo border; -struct TitleInfo title; +struct ViewportInfo viewport; +struct TitleFadingInfo fading; +struct TitleFadingInfo title_initial_default; +struct TitleFadingInfo title_default; +struct TitleMessageInfo titlemessage_initial_default; struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES]; +struct TitleMessageInfo titlemessage_default; struct TitleMessageInfo titlemessage[MAX_NUM_TITLE_MESSAGES]; struct TitleMessageInfo readme; +struct InitInfo init, init_last; struct MenuInfo menu; struct DoorInfo door_1, door_2; +struct RequestInfo request; struct PreviewInfo preview; + struct GraphicInfo *graphic_info = NULL; struct SoundInfo *sound_info = NULL; struct MusicInfo *music_info = NULL; struct MusicFileInfo *music_file_info = NULL; struct HelpAnimInfo *helpanim_info = NULL; + SetupFileHash *helptext_info = NULL; +SetupFileHash *image_config_hash = NULL; +SetupFileHash *element_token_hash = NULL; +SetupFileHash *graphic_token_hash = NULL; +SetupFileHash *font_token_hash = NULL; /* ------------------------------------------------------------------------- */ @@ -1247,23 +1299,23 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "sp_gravity_port_right", - "sp_port", - "gravity port (leading right)" + "sp_gravity_port", + "gravity-on/off port (leading right)" }, { "sp_gravity_port_down", - "sp_port", - "gravity port (leading down)" + "sp_gravity_port", + "gravity-on/off port (leading down)" }, { "sp_gravity_port_left", - "sp_port", - "gravity port (leading left)" + "sp_gravity_port", + "gravity-on/off port (leading left)" }, { "sp_gravity_port_up", - "sp_port", - "gravity port (leading up)" + "sp_gravity_port", + "gravity-on/off port (leading up)" }, { "sp_sniksnak", @@ -1433,7 +1485,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = { "dc_gate_white", "gate", - "white gate" + "white door" }, { "dc_gate_white_gray", @@ -3427,43 +3479,43 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "sp_gravity_on_port_right", - "sp_port", - "gravity on port (leading right)" + "sp_gravity_on_port", + "gravity-on port (leading right)" }, { "sp_gravity_on_port_down", - "sp_port", - "gravity on port (leading down)" + "sp_gravity_on_port", + "gravity-on port (leading down)" }, { "sp_gravity_on_port_left", - "sp_port", - "gravity on port (leading left)" + "sp_gravity_on_port", + "gravity-on port (leading left)" }, { "sp_gravity_on_port_up", - "sp_port", - "gravity on port (leading up)" + "sp_gravity_on_port", + "gravity-on port (leading up)" }, { "sp_gravity_off_port_right", - "sp_port", - "gravity off port (leading right)" + "sp_gravity_off_port", + "gravity-off port (leading right)" }, { "sp_gravity_off_port_down", - "sp_port", - "gravity off port (leading down)" + "sp_gravity_off_port", + "gravity-off port (leading down)" }, { "sp_gravity_off_port_left", - "sp_port", - "gravity off port (leading left)" + "sp_gravity_off_port", + "gravity-off port (leading left)" }, { "sp_gravity_off_port_up", - "sp_port", - "gravity off port (leading up)" + "sp_gravity_off_port", + "gravity-off port (leading up)" }, { "balloon_switch_none", @@ -4445,6 +4497,11 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = "quicksand", "fast quicksand (with rock)" }, + { + "from_level_template", + "from_level_template", + "element taken from level template" + }, /* ----------------------------------------------------------------------- */ /* "real" (and therefore drawable) runtime elements */ @@ -5066,6 +5123,46 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = "sb_default", "-" }, + { + "graphic_1", + "graphic", + "-" + }, + { + "graphic_2", + "graphic", + "-" + }, + { + "graphic_3", + "graphic", + "-" + }, + { + "graphic_4", + "graphic", + "-" + }, + { + "graphic_5", + "graphic", + "-" + }, + { + "graphic_6", + "graphic", + "-" + }, + { + "graphic_7", + "graphic", + "-" + }, + { + "graphic_8", + "graphic", + "-" + }, { "internal_clipboard_custom", "internal", @@ -5347,871 +5444,45 @@ struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] = struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] = { - { ".left", MV_BIT_LEFT }, - { ".right", MV_BIT_RIGHT }, - { ".up", MV_BIT_UP }, - { ".down", MV_BIT_DOWN }, - { ".upleft", MV_BIT_UP }, - { ".upright", MV_BIT_RIGHT }, - { ".downleft", MV_BIT_LEFT }, - { ".downright", MV_BIT_DOWN }, + { ".left", MV_BIT_LEFT }, + { ".right", MV_BIT_RIGHT }, + { ".up", MV_BIT_UP }, + { ".down", MV_BIT_DOWN }, + { ".upleft", MV_BIT_UP }, + { ".upright", MV_BIT_RIGHT }, + { ".downleft", MV_BIT_LEFT }, + { ".downright", MV_BIT_DOWN }, - { NULL, 0 } + { NULL, 0 } }; struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { - { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, }, - { ".TITLE", GFX_SPECIAL_ARG_TITLE, }, - { ".MESSAGE", GFX_SPECIAL_ARG_MESSAGE, }, - { ".MAIN", GFX_SPECIAL_ARG_MAIN, }, - { ".LEVELS", GFX_SPECIAL_ARG_LEVELS }, - { ".SCORES", GFX_SPECIAL_ARG_SCORES, }, - { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, }, - { ".INFO", GFX_SPECIAL_ARG_INFO, }, - { ".SETUP", GFX_SPECIAL_ARG_SETUP, }, - { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, }, - { ".DOOR", GFX_SPECIAL_ARG_DOOR, }, - { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, }, - { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, }, + { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, }, + { ".LOADING", GFX_SPECIAL_ARG_LOADING, }, + { ".TITLE_INITIAL", GFX_SPECIAL_ARG_TITLE_INITIAL, }, + { ".TITLE", GFX_SPECIAL_ARG_TITLE, }, + { ".MAIN", GFX_SPECIAL_ARG_MAIN, }, + { ".LEVELS", GFX_SPECIAL_ARG_LEVELS }, + { ".LEVELNR", GFX_SPECIAL_ARG_LEVELNR }, + { ".SCORES", GFX_SPECIAL_ARG_SCORES, }, + { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, }, + { ".INFO", GFX_SPECIAL_ARG_INFO, }, + { ".SETUP", GFX_SPECIAL_ARG_SETUP, }, + { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, }, + { ".DOOR", GFX_SPECIAL_ARG_DOOR, }, + { ".TAPE", GFX_SPECIAL_ARG_TAPE, }, + { ".PANEL", GFX_SPECIAL_ARG_PANEL, }, + { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, }, + { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, }, /* empty suffix always matches -- check as last entry in InitMusicInfo() */ - { "", GFX_SPECIAL_ARG_DEFAULT, }, + { "", GFX_SPECIAL_ARG_DEFAULT, }, - { NULL, 0, } + { NULL, 0, } }; -struct TokenIntPtrInfo image_config_vars[] = -{ - { - "titlemessage_initial_1.x", - &titlemessage_initial[0].x - }, - { - "titlemessage_initial_1.y", - &titlemessage_initial[0].y - }, - { - "titlemessage_initial_1.width", - &titlemessage_initial[0].width - }, - { - "titlemessage_initial_1.height", - &titlemessage_initial[0].height - }, - { - "titlemessage_initial_1.chars", - &titlemessage_initial[0].chars - }, - { - "titlemessage_initial_1.lines", - &titlemessage_initial[0].lines - }, - { - "titlemessage_initial_1.align", - &titlemessage_initial[0].align - }, - { - "titlemessage_initial_1.autowrap", - &titlemessage_initial[0].autowrap - }, - { - "titlemessage_initial_1.centered", - &titlemessage_initial[0].centered - }, - { - "titlemessage_initial_1.skip_comments", - &titlemessage_initial[0].skip_comments - }, - { - "titlemessage_initial_1.sort_priority", - &titlemessage_initial[0].sort_priority - }, - { - "titlemessage_initial_2.x", - &titlemessage_initial[1].x - }, - { - "titlemessage_initial_2.y", - &titlemessage_initial[1].y - }, - { - "titlemessage_initial_2.width", - &titlemessage_initial[1].width - }, - { - "titlemessage_initial_2.height", - &titlemessage_initial[1].height - }, - { - "titlemessage_initial_2.chars", - &titlemessage_initial[1].chars - }, - { - "titlemessage_initial_2.lines", - &titlemessage_initial[1].lines - }, - { - "titlemessage_initial_2.align", - &titlemessage_initial[1].align - }, - { - "titlemessage_initial_2.autowrap", - &titlemessage_initial[1].autowrap - }, - { - "titlemessage_initial_2.centered", - &titlemessage_initial[1].centered - }, - { - "titlemessage_initial_2.skip_comments", - &titlemessage_initial[1].skip_comments - }, - { - "titlemessage_initial_2.sort_priority", - &titlemessage_initial[1].sort_priority - }, - { - "titlemessage_initial_3.x", - &titlemessage_initial[2].x - }, - { - "titlemessage_initial_3.y", - &titlemessage_initial[2].y - }, - { - "titlemessage_initial_3.width", - &titlemessage_initial[2].width - }, - { - "titlemessage_initial_3.height", - &titlemessage_initial[2].height - }, - { - "titlemessage_initial_3.chars", - &titlemessage_initial[2].chars - }, - { - "titlemessage_initial_3.lines", - &titlemessage_initial[2].lines - }, - { - "titlemessage_initial_3.align", - &titlemessage_initial[2].align - }, - { - "titlemessage_initial_3.autowrap", - &titlemessage_initial[2].autowrap - }, - { - "titlemessage_initial_3.centered", - &titlemessage_initial[2].centered - }, - { - "titlemessage_initial_3.skip_comments", - &titlemessage_initial[2].skip_comments - }, - { - "titlemessage_initial_3.sort_priority", - &titlemessage_initial[2].sort_priority - }, - { - "titlemessage_initial_4.x", - &titlemessage_initial[3].x - }, - { - "titlemessage_initial_4.y", - &titlemessage_initial[3].y - }, - { - "titlemessage_initial_4.width", - &titlemessage_initial[3].width - }, - { - "titlemessage_initial_4.height", - &titlemessage_initial[3].height - }, - { - "titlemessage_initial_4.chars", - &titlemessage_initial[3].chars - }, - { - "titlemessage_initial_4.lines", - &titlemessage_initial[3].lines - }, - { - "titlemessage_initial_4.align", - &titlemessage_initial[3].align - }, - { - "titlemessage_initial_4.autowrap", - &titlemessage_initial[3].autowrap - }, - { - "titlemessage_initial_4.centered", - &titlemessage_initial[3].centered - }, - { - "titlemessage_initial_4.skip_comments", - &titlemessage_initial[3].skip_comments - }, - { - "titlemessage_initial_4.sort_priority", - &titlemessage_initial[3].sort_priority - }, - { - "titlemessage_initial_5.x", - &titlemessage_initial[4].x - }, - { - "titlemessage_initial_5.y", - &titlemessage_initial[4].y - }, - { - "titlemessage_initial_5.width", - &titlemessage_initial[4].width - }, - { - "titlemessage_initial_5.height", - &titlemessage_initial[4].height - }, - { - "titlemessage_initial_5.chars", - &titlemessage_initial[4].chars - }, - { - "titlemessage_initial_5.lines", - &titlemessage_initial[4].lines - }, - { - "titlemessage_initial_5.align", - &titlemessage_initial[4].align - }, - { - "titlemessage_initial_5.autowrap", - &titlemessage_initial[4].autowrap - }, - { - "titlemessage_initial_5.centered", - &titlemessage_initial[4].centered - }, - { - "titlemessage_initial_5.skip_comments", - &titlemessage_initial[4].skip_comments - }, - { - "titlemessage_initial_5.sort_priority", - &titlemessage_initial[4].sort_priority - }, - { - "titlemessage_1.x", - &titlemessage[0].x - }, - { - "titlemessage_1.y", - &titlemessage[0].y - }, - { - "titlemessage_1.width", - &titlemessage[0].width - }, - { - "titlemessage_1.height", - &titlemessage[0].height - }, - { - "titlemessage_1.chars", - &titlemessage[0].chars - }, - { - "titlemessage_1.lines", - &titlemessage[0].lines - }, - { - "titlemessage_1.align", - &titlemessage[0].align - }, - { - "titlemessage_1.autowrap", - &titlemessage[0].autowrap - }, - { - "titlemessage_1.centered", - &titlemessage[0].centered - }, - { - "titlemessage_1.skip_comments", - &titlemessage[0].skip_comments - }, - { - "titlemessage_1.sort_priority", - &titlemessage[0].sort_priority - }, - { - "titlemessage_2.x", - &titlemessage[1].x - }, - { - "titlemessage_2.y", - &titlemessage[1].y - }, - { - "titlemessage_2.width", - &titlemessage[1].width - }, - { - "titlemessage_2.height", - &titlemessage[1].height - }, - { - "titlemessage_2.chars", - &titlemessage[1].chars - }, - { - "titlemessage_2.lines", - &titlemessage[1].lines - }, - { - "titlemessage_2.align", - &titlemessage[1].align - }, - { - "titlemessage_2.autowrap", - &titlemessage[1].autowrap - }, - { - "titlemessage_2.centered", - &titlemessage[1].centered - }, - { - "titlemessage_2.skip_comments", - &titlemessage[1].skip_comments - }, - { - "titlemessage_2.sort_priority", - &titlemessage[1].sort_priority - }, - { - "titlemessage_3.x", - &titlemessage[2].x - }, - { - "titlemessage_3.y", - &titlemessage[2].y - }, - { - "titlemessage_3.width", - &titlemessage[2].width - }, - { - "titlemessage_3.height", - &titlemessage[2].height - }, - { - "titlemessage_3.chars", - &titlemessage[2].chars - }, - { - "titlemessage_3.lines", - &titlemessage[2].lines - }, - { - "titlemessage_3.align", - &titlemessage[2].align - }, - { - "titlemessage_3.autowrap", - &titlemessage[2].autowrap - }, - { - "titlemessage_3.centered", - &titlemessage[2].centered - }, - { - "titlemessage_3.skip_comments", - &titlemessage[2].skip_comments - }, - { - "titlemessage_3.sort_priority", - &titlemessage[2].sort_priority - }, - { - "titlemessage_4.x", - &titlemessage[3].x - }, - { - "titlemessage_4.y", - &titlemessage[3].y - }, - { - "titlemessage_4.width", - &titlemessage[3].width - }, - { - "titlemessage_4.height", - &titlemessage[3].height - }, - { - "titlemessage_4.chars", - &titlemessage[3].chars - }, - { - "titlemessage_4.lines", - &titlemessage[3].lines - }, - { - "titlemessage_4.align", - &titlemessage[3].align - }, - { - "titlemessage_4.autowrap", - &titlemessage[3].autowrap - }, - { - "titlemessage_4.centered", - &titlemessage[3].centered - }, - { - "titlemessage_4.skip_comments", - &titlemessage[3].skip_comments - }, - { - "titlemessage_4.sort_priority", - &titlemessage[3].sort_priority - }, - { - "titlemessage_5.x", - &titlemessage[4].x - }, - { - "titlemessage_5.y", - &titlemessage[4].y - }, - { - "titlemessage_5.width", - &titlemessage[4].width - }, - { - "titlemessage_5.height", - &titlemessage[4].height - }, - { - "titlemessage_5.chars", - &titlemessage[4].chars - }, - { - "titlemessage_5.lines", - &titlemessage[4].lines - }, - { - "titlemessage_5.align", - &titlemessage[4].align - }, - { - "titlemessage_5.autowrap", - &titlemessage[4].autowrap - }, - { - "titlemessage_5.centered", - &titlemessage[4].centered - }, - { - "titlemessage_5.skip_comments", - &titlemessage[4].skip_comments - }, - { - "titlemessage_5.sort_priority", - &titlemessage[4].sort_priority - }, - - { - "readme.x", - &readme.x - }, - { - "readme.y", - &readme.y - }, - { - "readme.width", - &readme.width - }, - { - "readme.height", - &readme.height - }, - { - "readme.chars", - &readme.chars - }, - { - "readme.lines", - &readme.lines - }, - { - "readme.align", - &readme.align - }, - { - "readme.autowrap", - &readme.autowrap - }, - { - "readme.centered", - &readme.centered - }, - { - "readme.skip_comments", - &readme.skip_comments - }, - { - "readme.sort_priority", - &readme.sort_priority - }, - - { - "global.num_toons", - &global.num_toons - }, - - { - "border.draw_masked.TITLE", - &border.draw_masked[GFX_SPECIAL_ARG_TITLE] - }, - { - "border.draw_masked.MAIN", - &border.draw_masked[GFX_SPECIAL_ARG_MAIN] - }, - { - "border.draw_masked.LEVELS", - &border.draw_masked[GFX_SPECIAL_ARG_LEVELS] - }, - { - "border.draw_masked.SCORES", - &border.draw_masked[GFX_SPECIAL_ARG_SCORES] - }, - { - "border.draw_masked.EDITOR", - &border.draw_masked[GFX_SPECIAL_ARG_EDITOR] - }, - { - "border.draw_masked.INFO", - &border.draw_masked[GFX_SPECIAL_ARG_INFO] - }, - { - "border.draw_masked.SETUP", - &border.draw_masked[GFX_SPECIAL_ARG_SETUP] - }, - { - "border.draw_masked.PLAYING", - &border.draw_masked[GFX_SPECIAL_ARG_PLAYING] - }, - { - "border.draw_masked.DOOR", - &border.draw_masked[GFX_SPECIAL_ARG_DOOR] - }, - - { - "title.fade_delay", - &title.fade_delay - }, - { - "title.post_delay", - &title.post_delay - }, - { - "title.auto_delay", - &title.auto_delay - }, - - { - "menu.fade_delay", - &menu.fade_delay - }, - { - "menu.post_delay", - &menu.post_delay - }, - { - "menu.auto_delay", - &menu.auto_delay - }, - - { - "menu.draw_xoffset", - &menu.draw_xoffset[GFX_SPECIAL_ARG_DEFAULT] - }, - { - "menu.draw_yoffset", - &menu.draw_yoffset[GFX_SPECIAL_ARG_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.INFO[ELEMENTS]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] - }, - { - "menu.draw_yoffset.INFO[ELEMENTS]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] - }, - { - "menu.draw_xoffset.INFO[MUSIC]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] - }, - { - "menu.draw_yoffset.INFO[MUSIC]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] - }, - { - "menu.draw_xoffset.INFO[CREDITS]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] - }, - { - "menu.draw_yoffset.INFO[CREDITS]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] - }, - { - "menu.draw_xoffset.INFO[PROGRAM]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] - }, - { - "menu.draw_yoffset.INFO[PROGRAM]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] - }, - { - "menu.draw_xoffset.INFO[VERSION]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_VERSION] - }, - { - "menu.draw_yoffset.INFO[VERSION]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_VERSION] - }, - { - "menu.draw_xoffset.INFO[LEVELSET]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] - }, - { - "menu.draw_yoffset.INFO[LEVELSET]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] - }, - { - "menu.draw_xoffset.SETUP", - &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP] - }, - { - "menu.draw_yoffset.SETUP", - &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP] - }, - - { - "menu.scrollbar_xoffset", - &menu.scrollbar_xoffset - }, - - { - "menu.list_size", - &menu.list_size[GFX_SPECIAL_ARG_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] - }, - - { "main.button.name.x", &menu.main.button.name.x }, - { "main.button.name.y", &menu.main.button.name.y }, - { "main.button.levels.x", &menu.main.button.levels.x }, - { "main.button.levels.y", &menu.main.button.levels.y }, - { "main.button.scores.x", &menu.main.button.scores.x }, - { "main.button.scores.y", &menu.main.button.scores.y }, - { "main.button.editor.x", &menu.main.button.editor.x }, - { "main.button.editor.y", &menu.main.button.editor.y }, - { "main.button.info.x", &menu.main.button.info.x }, - { "main.button.info.y", &menu.main.button.info.y }, - { "main.button.game.x", &menu.main.button.game.x }, - { "main.button.game.y", &menu.main.button.game.y }, - { "main.button.setup.x", &menu.main.button.setup.x }, - { "main.button.setup.y", &menu.main.button.setup.y }, - { "main.button.quit.x", &menu.main.button.quit.x }, - { "main.button.quit.y", &menu.main.button.quit.y }, - - { "main.button.prev_level.x", &menu.main.button.prev_level.x }, - { "main.button.prev_level.y", &menu.main.button.prev_level.y }, - { "main.button.next_level.x", &menu.main.button.next_level.x }, - { "main.button.next_level.y", &menu.main.button.next_level.y }, - - { "main.text.name.x", &menu.main.text.name.x }, - { "main.text.name.y", &menu.main.text.name.y }, - { "main.text.name.width", &menu.main.text.name.width }, - { "main.text.name.height", &menu.main.text.name.height }, - { "main.text.name.align", &menu.main.text.name.align }, - { "main.text.levels.x", &menu.main.text.levels.x }, - { "main.text.levels.y", &menu.main.text.levels.y }, - { "main.text.levels.width", &menu.main.text.levels.width }, - { "main.text.levels.height", &menu.main.text.levels.height }, - { "main.text.levels.align", &menu.main.text.levels.align }, - { "main.text.scores.x", &menu.main.text.scores.x }, - { "main.text.scores.y", &menu.main.text.scores.y }, - { "main.text.scores.width", &menu.main.text.scores.width }, - { "main.text.scores.height", &menu.main.text.scores.height }, - { "main.text.scores.align", &menu.main.text.scores.align }, - { "main.text.editor.x", &menu.main.text.editor.x }, - { "main.text.editor.y", &menu.main.text.editor.y }, - { "main.text.editor.width", &menu.main.text.editor.width }, - { "main.text.editor.height", &menu.main.text.editor.height }, - { "main.text.editor.align", &menu.main.text.editor.align }, - { "main.text.info.x", &menu.main.text.info.x }, - { "main.text.info.y", &menu.main.text.info.y }, - { "main.text.info.width", &menu.main.text.info.width }, - { "main.text.info.height", &menu.main.text.info.height }, - { "main.text.info.align", &menu.main.text.info.align }, - { "main.text.game.x", &menu.main.text.game.x }, - { "main.text.game.y", &menu.main.text.game.y }, - { "main.text.game.width", &menu.main.text.game.width }, - { "main.text.game.height", &menu.main.text.game.height }, - { "main.text.game.align", &menu.main.text.game.align }, - { "main.text.setup.x", &menu.main.text.setup.x }, - { "main.text.setup.y", &menu.main.text.setup.y }, - { "main.text.setup.width", &menu.main.text.setup.width }, - { "main.text.setup.height", &menu.main.text.setup.height }, - { "main.text.setup.align", &menu.main.text.setup.align }, - { "main.text.quit.x", &menu.main.text.quit.x }, - { "main.text.quit.y", &menu.main.text.quit.y }, - { "main.text.quit.width", &menu.main.text.quit.width }, - { "main.text.quit.height", &menu.main.text.quit.height }, - { "main.text.quit.align", &menu.main.text.quit.align }, - - { "main.text.current_level.x", &menu.main.text.current_level.x }, - { "main.text.current_level.y", &menu.main.text.current_level.y }, - { "main.text.current_level.align", &menu.main.text.current_level.align }, - { "main.text.first_level.x", &menu.main.text.first_level.x }, - { "main.text.first_level.y", &menu.main.text.first_level.y }, - { "main.text.first_level.align", &menu.main.text.first_level.align }, - { "main.text.last_level.x", &menu.main.text.last_level.x }, - { "main.text.last_level.y", &menu.main.text.last_level.y }, - { "main.text.last_level.align", &menu.main.text.last_level.align }, - { "main.text.level_info_1.x", &menu.main.text.level_info_1.x }, - { "main.text.level_info_1.y", &menu.main.text.level_info_1.y }, - { "main.text.level_info_1.align", &menu.main.text.level_info_1.align }, - { "main.text.level_info_1.chars", &menu.main.text.level_info_1.chars }, - { "main.text.level_info_2.x", &menu.main.text.level_info_2.x }, - { "main.text.level_info_2.y", &menu.main.text.level_info_2.y }, - { "main.text.level_info_2.align", &menu.main.text.level_info_2.align }, - { "main.text.level_info_2.chars", &menu.main.text.level_info_2.chars }, - { "main.text.title_1.x", &menu.main.text.title_1.x }, - { "main.text.title_1.y", &menu.main.text.title_1.y }, - { "main.text.title_1.align", &menu.main.text.title_1.align }, - { "main.text.title_2.x", &menu.main.text.title_2.x }, - { "main.text.title_2.y", &menu.main.text.title_2.y }, - { "main.text.title_2.align", &menu.main.text.title_2.align }, - { "main.text.title_3.x", &menu.main.text.title_3.x }, - { "main.text.title_3.y", &menu.main.text.title_3.y }, - { "main.text.title_3.align", &menu.main.text.title_3.align }, - - { "main.input.name.x", &menu.main.input.name.x }, - { "main.input.name.y", &menu.main.input.name.y }, - { "main.input.name.align", &menu.main.input.name.align }, - - { "preview.x", &preview.x }, - { "preview.y", &preview.y }, - { "preview.align", &preview.align }, - { "preview.xsize", &preview.xsize }, - { "preview.ysize", &preview.ysize }, - { "preview.xoffset", &preview.xoffset }, - { "preview.yoffset", &preview.yoffset }, - { "preview.tile_size", &preview.tile_size }, - { "preview.step_offset", &preview.step_offset }, - { "preview.step_delay", &preview.step_delay }, - { "preview.anim_mode", &preview.anim_mode }, - - { "door_1.width", &door_1.width }, - { "door_1.height", &door_1.height }, - { "door_1.step_offset", &door_1.step_offset }, - { "door_1.step_delay", &door_1.step_delay }, - { "door_1.anim_mode", &door_1.anim_mode }, - { "door_2.width", &door_2.width }, - { "door_2.height", &door_2.height }, - { "door_2.step_offset", &door_2.step_offset }, - { "door_2.step_delay", &door_2.step_delay }, - { "door_2.anim_mode", &door_2.anim_mode }, - - { "game.panel.level.x", &game.panel.level.x }, - { "game.panel.level.y", &game.panel.level.y }, - { "game.panel.level.align", &game.panel.level.align }, - { "game.panel.level.digits", &game.panel.level.chars }, - { "game.panel.gems.x", &game.panel.gems.x }, - { "game.panel.gems.y", &game.panel.gems.y }, - { "game.panel.gems.align", &game.panel.gems.align }, - { "game.panel.gems.digits", &game.panel.gems.chars }, - { "game.panel.inventory.x", &game.panel.inventory.x }, - { "game.panel.inventory.y", &game.panel.inventory.y }, - { "game.panel.inventory.align", &game.panel.inventory.align }, - { "game.panel.inventory.digits", &game.panel.inventory.chars }, - { "game.panel.keys.x", &game.panel.keys.x }, - { "game.panel.keys.y", &game.panel.keys.y }, - { "game.panel.keys.align", &game.panel.keys.align }, - { "game.panel.score.x", &game.panel.score.x }, - { "game.panel.score.y", &game.panel.score.y }, - { "game.panel.score.align", &game.panel.score.align }, - { "game.panel.score.digits", &game.panel.score.chars }, - { "game.panel.time.x", &game.panel.time.x }, - { "game.panel.time.y", &game.panel.time.y }, - { "game.panel.time.align", &game.panel.time.align }, - { "game.panel.time.digits", &game.panel.time.chars }, - - { "[player].boring_delay_fixed", &game.player_boring_delay_fixed }, - { "[player].boring_delay_random", &game.player_boring_delay_random }, - { "[player].sleeping_delay_fixed", &game.player_sleeping_delay_fixed }, - { "[player].sleeping_delay_random", &game.player_sleeping_delay_random }, - - { NULL, NULL, } -}; +#include "conf_var.c" /* include auto-generated data structure definitions */ /* ------------------------------------------------------------------------- */ @@ -6261,6 +5532,8 @@ struct FontInfo font_info[NUM_FONTS + 1] = { "font.game_info" }, { "font.info.elements" }, { "font.info.levelset" }, + + { NULL } }; @@ -6296,6 +5569,7 @@ static void print_usage() " --serveronly only start network server\n" " -v, --verbose verbose mode\n" " --debug display debugging information\n" + " --debug-x11-sync enable X11 synchronous mode\n" " -e, --execute COMMAND execute batch COMMAND\n" "\n" "Valid commands for '--execute' option:\n" @@ -6309,6 +5583,7 @@ static void print_usage() " \"dump tape FILE\" dump tape data from FILE\n" " \"autoplay LEVELDIR [NR ...]\" play level tapes for LEVELDIR\n" " \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n" + " \"create images DIRECTORY\" write BMP images to DIRECTORY\n" "\n", program.command_basename); } @@ -6323,6 +5598,7 @@ int main(int argc, char *argv[]) MSDOS_POINTER_FILENAME, COOKIE_PREFIX, FILENAME_PREFIX, GAME_VERSION_ACTUAL); + InitExitMessageFunction(DisplayExitMessage); InitExitFunction(CloseAllAndExit); InitPlatformDependentStuff();