X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=5acf09fe627d151743b3beb5362c25cde2ce455d;hb=b6847742a0713d8ed21bb6104476db54f8c1a4b9;hp=58b615071e65f342c848b215d3b17cc4bca16ab9;hpb=914431754efb7c8c3321a68f8b828b471cf15e3c;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index 58b61507..5acf09fe 100644 --- a/src/main.c +++ b/src/main.c @@ -24,6 +24,7 @@ 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; @@ -74,6 +75,11 @@ 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; @@ -114,6 +120,7 @@ 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; struct MenuInfo menu; struct DoorInfo door_1, door_2; struct PreviewInfo preview; @@ -123,6 +130,10 @@ 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; /* ------------------------------------------------------------------------- */ @@ -5070,6 +5081,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", @@ -5366,6 +5417,7 @@ struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] = struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { { ".[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, }, @@ -5436,6 +5488,8 @@ struct FontInfo font_info[NUM_FONTS + 1] = { "font.game_info" }, { "font.info.elements" }, { "font.info.levelset" }, + + { NULL } }; @@ -5455,6 +5509,16 @@ struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] = /* main() */ /* ========================================================================= */ +static unsigned long get_cmd_switch(char *switch_string) +{ + unsigned long switch_value = 0; + + if (strEqual(switch_string, "load_xsb_to_ces")) + switch_value = CMD_SWITCH_LOAD_XSB_TO_CES; + + return switch_value; +} + static void print_usage() { printf("\n" @@ -5471,6 +5535,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" @@ -5484,6 +5549,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); } @@ -5501,7 +5567,7 @@ int main(int argc, char *argv[]) InitExitFunction(CloseAllAndExit); InitPlatformDependentStuff(); - GetOptions(argv, print_usage); + GetOptions(argv, print_usage, get_cmd_switch); OpenAll(); EventLoop();