ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Config.c
(Generate patch)

Comparing Daodan/src/Daodan_Config.c (file contents):
Revision 1000 by alloc, Sun May 4 18:17:11 2014 UTC vs.
Revision 1008 by alloc, Mon Aug 25 23:21:09 2014 UTC

# Line 18 | Line 18 | static const char* helpFile = "daodan_he
18  
19   static const char* defaultSection = "options";
20  
21 < static char invalidCurParamaters[1000] = "";
22 < static char invalidTotalParamaters[3000] = "";
21 > static char invalidCurParamaters[2000] = "";
22 > static char invalidTotalParamaters[4000] = "";
23  
24   void DDrConfig_PrintHelp();
25  
# Line 47 | Line 47 | ConfigSection_t config[] = {
47                  { 0, 0, 0, {0}, {0} }
48          } },
49          { "gameplay", "Gameplay", {
50 +                { "characterawareness",
51 +                        "Makes AI remember the player.",
52 +                        C_BOOL,
53 +                        {.intBoolVal = true},
54 +                        {.intBoolVal = true} },
55                  { "cheatsenabled",
56                          "Enables cheats without having to beat the game first.",
57                          C_BOOL,
# Line 530 | Line 535 | void DDrIniCallback(const char* section,
535                                  STARTUPMESSAGE("Config value type unknown: %d", co->type);
536                  }
537          } else {
538 <                char buf[50];
538 >                char buf[100];
539                  if (!_stricmp(section, "*"))
540 <                        sprintf_s(buf, sizeof(buf), "  %s\n", name);
540 >                        sprintf(buf, "  %s\n", name);
541                  else
542 <                        sprintf_s(buf, sizeof(buf), "  %s.%s\n", section, name);
542 >                        sprintf(buf, "  %s.%s\n", section, name);
543                  if (strlen(buf) + strlen(invalidCurParamaters) < sizeof(invalidCurParamaters) - 1) {
544                          strcpy(invalidCurParamaters + strlen(invalidCurParamaters), buf);
545                  }
# Line 592 | Line 597 | void DDrConfig(int argc, char* argv[])
597  
598          if (strlen(invalidCurParamaters) > 0)
599          {
600 <                sprintf_s(invalidTotalParamaters, sizeof(invalidTotalParamaters), "In %s:\n%s\n", iniName, invalidCurParamaters);
600 >                sprintf(invalidTotalParamaters, "In %s:\n%s\n", iniName, invalidCurParamaters);
601                  invalidCurParamaters[0] = 0;
602          }
603  
# Line 602 | Line 607 | void DDrConfig(int argc, char* argv[])
607  
608          if (strlen(invalidCurParamaters) > 0)
609          {
610 <                sprintf_s(invalidTotalParamaters, sizeof(invalidTotalParamaters), "%sOn command line:\n%s\n", invalidTotalParamaters, invalidCurParamaters);
610 >                sprintf(invalidTotalParamaters, "%sOn command line:\n%s\n", invalidTotalParamaters, invalidCurParamaters);
611          }
612  
613          if (strlen(invalidTotalParamaters) > 0)
614          {
615 <                char msg[3200];
616 <                sprintf_s(msg, sizeof(msg), "Invalid parameters given:\n%sContinue launching Oni?", invalidTotalParamaters);
615 >                char msg[4096];
616 >                sprintf(msg, "Invalid parameters given:\n%sContinue launching Oni?", invalidTotalParamaters);
617                  int res = MessageBox(NULL, msg, "Parameters invalid", MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON1);
618                  if (res == IDNO) {
619                          exit(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)