--- Daodan/src/Daodan_Config.c 2014/04/07 10:33:27 994 +++ Daodan/src/Daodan_Config.c 2014/04/09 09:12:52 996 @@ -18,18 +18,21 @@ static const char* helpFile = "daodan_he static const char* defaultSection = "options"; +static char invalidCurParamaters[1000] = ""; +static char invalidTotalParamaters[3000] = ""; + void DDrConfig_PrintHelp(); ConfigSection_t config[] = { { "patches", "Patches", { { "alttab", - "Allows user to switch applications while in Oni (Alt-Tab) and use Windows key, however it may enable the screensaver as well.", + "Allows to Alt-Tab out of Oni and use Windows key. May enable the screensaver as well.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "argb8888", - "Textures using ARGB8888 can be used.", + "Allows using textures with ARGB8888.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -38,28 +41,18 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, - { "bsl", - "Enables d_regen (unfinished) and prevents fly-in portraits from being stretched when playing in widescreen resolutions.", - C_BOOL, - {.intBoolVal = true}, - {.intBoolVal = true} }, - { "cheater", - "Adds new cheat codes (see section below).", - C_BOOL, - {.intBoolVal = true}, - {.intBoolVal = true} }, { "cheatsenabled", "Enables cheats without having to beat the game first.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "cheattable", - "Replaces Oni's cheat table with table that includes new cheats (see section below).", + "Replaces Oni's cheat table with table that includes new cheats including devmode.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "chinese", - "Allow for chinese fonts to be shown.", + "Allow for chinese fonts to be shown if the required DLL is available.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -73,18 +66,23 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, + { "d_regen", + "Enables script command d_regen (query/set regeneration for any character).", + C_BOOL, + {.intBoolVal = true}, + {.intBoolVal = true} }, { "daodandisplayenum", - "Offers more display modes in the Options menu.", + "Offers a more accurate list of available display modes in the Options menu.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "directinput", - "Forces on DirectInput.", + "Enforces the usage of DirectInput on every system. Should be off for Linux/Wine.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "disablecmdline", - "Replaces existing command line parser with Daodan's in order to add new commands. Meant to be used with getcmdline.", + "Disables Oni's existing command line parser as Daodan has its own.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -93,13 +91,8 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, - { "getcmdline", - "Replaces existing command line parser with Daodan's in order to add new commands. Meant to be used with disablecmdline.", - C_BOOL, - {.intBoolVal = true}, - {.intBoolVal = true} }, { "hdscreens_lowres", - "Allow HD screens with resolution < 1024*768.", + "Allow HD intro/ending screens on game resolutions smaller than 1024x768.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -109,7 +102,12 @@ ConfigSection_t config[] = { {.intBoolVal = true}, {.intBoolVal = true} }, { "kickguns", - "Unfinished, do not use.", + "EXPERIMENTAL! Unfinished, do not use.", + C_BOOL, + {.intBoolVal = false}, + {.intBoolVal = false} }, + { "killvtune", + "Prevent loading of vtuneapi.dll.", C_BOOL, {.intBoolVal = false}, {.intBoolVal = false} }, @@ -119,12 +117,12 @@ ConfigSection_t config[] = { {.intBoolVal = true}, {.intBoolVal = true} }, { "levelplugins", - "Allows level files to be loaded from the GDF which do not end in \"_Final\".", + "Allows level files to be loaded which do not end in \"_Final\".", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "newweap", - "Picking up a weapon displays a message containing the weapon name and amount of ammo.", + "Standing above a weapon displays a message containing the weapon name and amount of ammo.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -138,13 +136,8 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, - { "particledisablebit", - "Unlocks particle action disabling/enabling bits for all events so that a particle event can occur multiple times.", - C_BOOL, - {.intBoolVal = false}, - {.intBoolVal = false} }, { "pathfinding", - "Multiplies size of pathfinding grid cache by eight in order to prevent crashes in large levels.", + "Size of pathfinding grid cache increased by eight times in order to prevent crashes in large levels.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -164,17 +157,22 @@ ConfigSection_t config[] = { {.intBoolVal = false}, {.intBoolVal = false} }, { "showtriggervolumes", - "Allows BSL variable \"show_triggervolumes\" to work when set to 1.", + "Allows BSL variable \"show_triggervolumes\" and Ctrl+Shift+X (in devmode) to work.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "throwtest", - "Not recommended for use; experiment with allowing enemies to be thrown over railings.", + "EXPERIMENTAL! Experiment with allowing enemies to be thrown over railings.", C_BOOL, {.intBoolVal = false}, {.intBoolVal = false} }, + { "usedaodanbsl", + "Adds new BSL commands.", + C_BOOL, + {.intBoolVal = true}, + {.intBoolVal = true} }, { "usedaodangl", - "Provides an improved windowed mode (-noswitch); this patch is known to break the hiding of the Windows taskbar in fullscreen mode.", + "Provides an improved windowed mode (-noswitch).", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -183,6 +181,11 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, + { "widescreenportraits", + "Prevents fly-in portraits from being stretched when playing in widescreen resolutions.", + C_BOOL, + {.intBoolVal = true}, + {.intBoolVal = true} }, { "wpfadetime", "Adds working function for existing BSL command wp_fadetime, sets fade time to 4800.", C_BOOL, @@ -192,27 +195,27 @@ ConfigSection_t config[] = { } }, { "options", "Options", { { "border", - "If \"windowhack\" patch is active, make sure game window has border in windowed mode.", + "Add a border if in windowed mode and \"usedaodangl\" patch is active.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, { "debug", - "???", + "Not useful, probably does nothing.", EXT_BOOL, {.intBoolVal = false }, {.extBoolVal = &AKgDebug_DebugMaps } }, { "debugfiles", - "???", + "Logs called BSL functions to script_debug.txt.", EXT_BOOL, {.intBoolVal = false }, {.extBoolVal = &BFgDebugFileEnable } }, { "findsounds", - "???", + "Not useful, extends output of sound_list_broken_links.", EXT_BOOL, {.intBoolVal = false }, {.extBoolVal = &SSgSearchOnDisk } }, { "gamma", - "Enable gamma slider in fullscreen.", + "Enable gamma slider in fullscreen, disable in windowed mode.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, @@ -222,17 +225,17 @@ ConfigSection_t config[] = { {.intBoolVal = 0}, {.callback = DDrConfig_PrintHelp} }, { "ignore_private_data", - "? No effect ?", + "Not useful, probably does nothing.", EXT_BOOL, {.intBoolVal = false }, {.extBoolVal = &opt_ignore_private_data } }, { "sound", - "???", + "Enable sound.", EXT_BOOL, {.intBoolVal = true }, {.extBoolVal = &opt_sound } }, { "switch", - "Always switch screen to resolution on Oni's Options screen, making the game fullscreen; opposite of Oni's built-in argument \"noswitch\".", + "Switch to fullscreen instead of staying in a window.", EXT_BOOL, {.intBoolVal = true}, {.extBoolVal = &M3gResolutionSwitch} }, @@ -241,11 +244,6 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = false}, {.intBoolVal = false} }, - { "usedaodanbsl", - "Adds new BSL commands (see below).", - C_BOOL, - {.intBoolVal = true}, - {.intBoolVal = true} }, { "language", "Localization for hardcoded strings (e.g. \"Savepoints\").", C_STRING, @@ -479,6 +477,12 @@ void DDrIniCallback(const char* section, default: STARTUPMESSAGE("Config value type unknown: %d", co->type); } + } else { + char buf[50]; + sprintf_s(buf, sizeof(buf), " %s.%s\n", section, name); + if (strlen(buf) + strlen(invalidCurParamaters) < sizeof(invalidCurParamaters) - 1) { + strcpy(invalidCurParamaters + strlen(invalidCurParamaters), buf); + } } } @@ -548,12 +552,31 @@ void DDrConfig(int argc, char* argv[]) STARTUPMESSAGE("Error reading daodan.ini, check your syntax!", 0); STARTUPMESSAGE("Finished parsing", 0); - + if (strlen(invalidCurParamaters) > 0) + { + sprintf_s(invalidTotalParamaters, sizeof(invalidTotalParamaters), "In %s:\n%s\n", iniName, invalidCurParamaters); + invalidCurParamaters[0] = 0; + } STARTUPMESSAGE("Parsing command line...", 0); DDrConfig_ParseCommandLine(argc, argv); STARTUPMESSAGE("Finished parsing", 0); + if (strlen(invalidCurParamaters) > 0) + { + sprintf_s(invalidTotalParamaters, sizeof(invalidTotalParamaters), "%sOn command line:\n%s\n", invalidTotalParamaters, invalidCurParamaters); + } + + if (strlen(invalidTotalParamaters) > 0) + { + char msg[3200]; + sprintf_s(msg, sizeof(msg), "Invalid parameters given:\n%sContinue launching Oni?", invalidTotalParamaters); + int res = MessageBox(NULL, msg, "Parameters invalid", MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON1); + if (res == IDNO) { + exit(0); + } + } + // DDrConfig_Print(); }