X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=1dd7a167c16985f3605f9af9d1c4e2cb87679b4c;hb=499ad3bb12d513266ddcebe41a84eee8237a7fb5;hp=c57461a567a5e30ee4c08e26f6adf21ad70dfb4e;hpb=65dcb102effc9b2dd3b45df14fc35b3f224b79c6;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index c57461a5..1dd7a167 100644 --- a/src/main.c +++ b/src/main.c @@ -183,6 +183,7 @@ SetupFileHash *image_config_hash = NULL; SetupFileHash *element_token_hash = NULL; SetupFileHash *graphic_token_hash = NULL; SetupFileHash *font_token_hash = NULL; +SetupFileHash *hide_setup_hash = NULL; /* ------------------------------------------------------------------------- */ @@ -5454,6 +5455,30 @@ struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] = { ".part_6", ACTION_PART_6, FALSE }, { ".part_7", ACTION_PART_7, FALSE }, { ".part_8", ACTION_PART_8, FALSE }, + { ".part_9", ACTION_PART_9, FALSE }, + { ".part_10", ACTION_PART_10, FALSE }, + { ".part_11", ACTION_PART_11, FALSE }, + { ".part_12", ACTION_PART_12, FALSE }, + { ".part_13", ACTION_PART_13, FALSE }, + { ".part_14", ACTION_PART_14, FALSE }, + { ".part_15", ACTION_PART_15, FALSE }, + { ".part_16", ACTION_PART_16, FALSE }, + { ".part_17", ACTION_PART_17, FALSE }, + { ".part_18", ACTION_PART_18, FALSE }, + { ".part_19", ACTION_PART_19, FALSE }, + { ".part_20", ACTION_PART_20, FALSE }, + { ".part_21", ACTION_PART_21, FALSE }, + { ".part_22", ACTION_PART_22, FALSE }, + { ".part_23", ACTION_PART_23, FALSE }, + { ".part_24", ACTION_PART_24, FALSE }, + { ".part_25", ACTION_PART_25, FALSE }, + { ".part_26", ACTION_PART_26, FALSE }, + { ".part_27", ACTION_PART_27, FALSE }, + { ".part_28", ACTION_PART_28, FALSE }, + { ".part_29", ACTION_PART_29, FALSE }, + { ".part_30", ACTION_PART_30, FALSE }, + { ".part_31", ACTION_PART_31, FALSE }, + { ".part_32", ACTION_PART_32, FALSE }, { ".other", ACTION_OTHER, FALSE }, /* empty suffix always matches -- check as last entry in InitSoundInfo() */ @@ -5510,6 +5535,8 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { ".SUBMENU", GFX_SPECIAL_ARG_SUBMENU, }, { ".MENU", GFX_SPECIAL_ARG_MENU, }, { ".TOONS", GFX_SPECIAL_ARG_TOONS, }, + { ".SCORESOLD", GFX_SPECIAL_ARG_SCORESOLD, }, + { ".SCORESNEW", GFX_SPECIAL_ARG_SCORESNEW, }, { ".FADING", GFX_SPECIAL_ARG_FADING, }, { ".QUIT", GFX_SPECIAL_ARG_QUIT, }, @@ -5577,7 +5604,10 @@ struct FontInfo font_info[NUM_FONTS + 1] = { NULL } }; -struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1] = +struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1]; + +/* this contains predefined structure elements to init "global_anim_info" */ +struct GlobalAnimNameInfo global_anim_name_info[NUM_GLOBAL_ANIM_TOKENS + 1] = { /* (real) graphic definitions used to define animation graphics */ { "gfx.global.anim_1", }, @@ -5588,6 +5618,30 @@ struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1] = { "gfx.global.anim_6", }, { "gfx.global.anim_7", }, { "gfx.global.anim_8", }, + { "gfx.global.anim_9", }, + { "gfx.global.anim_10", }, + { "gfx.global.anim_11", }, + { "gfx.global.anim_12", }, + { "gfx.global.anim_13", }, + { "gfx.global.anim_14", }, + { "gfx.global.anim_15", }, + { "gfx.global.anim_16", }, + { "gfx.global.anim_17", }, + { "gfx.global.anim_18", }, + { "gfx.global.anim_19", }, + { "gfx.global.anim_20", }, + { "gfx.global.anim_21", }, + { "gfx.global.anim_22", }, + { "gfx.global.anim_23", }, + { "gfx.global.anim_24", }, + { "gfx.global.anim_25", }, + { "gfx.global.anim_26", }, + { "gfx.global.anim_27", }, + { "gfx.global.anim_28", }, + { "gfx.global.anim_29", }, + { "gfx.global.anim_30", }, + { "gfx.global.anim_31", }, + { "gfx.global.anim_32", }, /* (dummy) graphic definitions used to define animation controls */ { "global.anim_1", }, @@ -5598,6 +5652,30 @@ struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1] = { "global.anim_6", }, { "global.anim_7", }, { "global.anim_8", }, + { "global.anim_9", }, + { "global.anim_10", }, + { "global.anim_11", }, + { "global.anim_12", }, + { "global.anim_13", }, + { "global.anim_14", }, + { "global.anim_15", }, + { "global.anim_16", }, + { "global.anim_17", }, + { "global.anim_18", }, + { "global.anim_19", }, + { "global.anim_20", }, + { "global.anim_21", }, + { "global.anim_22", }, + { "global.anim_23", }, + { "global.anim_24", }, + { "global.anim_25", }, + { "global.anim_26", }, + { "global.anim_27", }, + { "global.anim_28", }, + { "global.anim_29", }, + { "global.anim_30", }, + { "global.anim_31", }, + { "global.anim_32", }, { NULL } }; @@ -5630,6 +5708,7 @@ static void print_usage() " -g, --graphics DIRECTORY alternative graphics DIRECTORY\n" " -s, --sounds DIRECTORY alternative sounds DIRECTORY\n" " -m, --music DIRECTORY alternative music DIRECTORY\n" + " --mytapes use private tapes for tape tests\n" " -n, --network network multiplayer game\n" " --serveronly only start network server\n" " -v, --verbose verbose mode\n" @@ -5659,13 +5738,20 @@ static void print_usage() static void print_version() { - Print("%s %d.%d.%d.%d%s\n", - PROGRAM_TITLE_STRING, - PROGRAM_VERSION_MAJOR, - PROGRAM_VERSION_MINOR, - PROGRAM_VERSION_PATCH, - PROGRAM_VERSION_BUILD, - PROGRAM_VERSION_EXTRA); + Print("%s", getProgramInitString()); + + if (!strEqual(getProgramVersionString(), getProgramRealVersionString())) + { + Print(" (%s %d.%d.%d.%d%s)", + PROGRAM_TITLE_STRING, + PROGRAM_VERSION_MAJOR, + PROGRAM_VERSION_MINOR, + PROGRAM_VERSION_PATCH, + PROGRAM_VERSION_BUILD, + PROGRAM_VERSION_EXTRA); + } + + Print("\n"); if (options.debug) { @@ -5701,6 +5787,7 @@ static void InitProgramConfig(char *command_filename) { char *program_title = PROGRAM_TITLE_STRING; char *program_icon_file = PROGRAM_ICON_FILENAME; + char *program_version = getProgramRealVersionString(); char *config_filename = getProgramConfigFilename(command_filename); char *userdata_basename = getBaseNameNoSuffix(command_filename); char *userdata_subdir; @@ -5726,6 +5813,11 @@ static void InitProgramConfig(char *command_filename) strlen(setup.internal.program_title) > 0) program_title = getStringCopy(setup.internal.program_title); + // set program version from potentially redefined program version + if (setup.internal.program_version != NULL && + strlen(setup.internal.program_version) > 0) + program_version = getStringCopy(setup.internal.program_version); + // set program icon file from potentially redefined program icon file if (setup.internal.program_icon_file != NULL && strlen(setup.internal.program_icon_file) > 0) @@ -5754,6 +5846,7 @@ static void InitProgramConfig(char *command_filename) program_title, program_icon_file, COOKIE_PREFIX, + program_version, GAME_VERSION_ACTUAL); }