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

Comparing Daodan/src/Daodan.c (file contents):
Revision 692 by alloc, Thu Mar 7 17:26:13 2013 UTC vs.
Revision 693 by alloc, Thu Mar 7 22:38:21 2013 UTC

# Line 39 | Line 39 | bool patch_argb8888 = true;
39   bool patch_killvtune = true;
40   bool patch_getcmdline = true;
41   bool patch_disablecmdline = true;
42 + bool patch_optionsvisible = true;
43  
44   bool patch_safeprintf = true;
45   bool patch_daodandisplayenum = true;
# Line 56 | Line 57 | bool opt_topmost = false;
57  
58   typedef int (__cdecl *CHINESEPROC)(DWORD WINAPI);
59   bool patch_chinese = false;
60 +
61 +
62 +
63 + void ONICALL DDrShowResumeButton(int window, int visibility)
64 + {
65 +        if (visibility)
66 +                WMrWindow_SetLocation(window, 150, 350);
67 +        WMrWindow_SetVisible(window, visibility);
68 + }
69 +
70 +
71 + /* Options always visible patch */
72 + void ONICALL DDrShowOptionsButton(int window, int visibility)
73 + {
74 +        WMrWindow_SetVisible(window, 1);
75 + }
76 +
77 +
78 +
79   bool DDrPatch_Init()
80   {
81          DDrStartupMessage("patching engine");
# Line 279 | Line 299 | bool DDrPatch_Init()
299  
300   //FLATLINE?     DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen);
301   //FLATLINE?     DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate);
302 +
303 +
304 +        // Fix options not visible in main menu when a game was started
305 +        if(patch_optionsvisible)
306 +        {
307 +                DDrPatch_MakeCall((void*)(OniExe + 0x000d2d2d), DDrShowOptionsButton);
308 +                DDrPatch_MakeCall((void*)(OniExe + 0x000d2d43), DDrShowResumeButton);
309 +        }
310 +
311          return true;
312   }
313  
314 +
315   enum {s_unknown, s_options, s_patch, s_bsl, s_language} ini_section;
316  
317   bool DDrIniCallback(char* section, bool newsection, char* name, char* value)
# Line 386 | Line 416 | bool DDrIniCallback(char* section, bool
416                                  patch_cheater = !_stricmp(inifile_cleanstr(value), "true");
417                          else if (!_stricmp(name, "newweap"))
418                                  patch_newweapon = !_stricmp(inifile_cleanstr(value), "true");
419 +                        else if (!_stricmp(name, "optionsvisible"))
420 +                                patch_optionsvisible = !_stricmp(inifile_cleanstr(value), "true");
421                          else
422                                  DDrStartupMessage("unrecognised patch \"%s\"", name);
423                          break;

Diff Legend

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