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 689 by alloc, Mon Mar 4 15:52:19 2013 UTC vs.
Revision 692 by alloc, Thu Mar 7 17:26:13 2013 UTC

# Line 1 | Line 1
1 + #include <windows.h>
2   #include <string.h>
3  
4   #include "Daodan.h"
# Line 11 | Line 12
12   #include "Daodan_WindowHack.h"
13  
14   #include "Oni.h"
14 #include "Oni_Persistence.h"
15  
16 < #include "BFW_Utility.h"
16 > #include "Oni_GL.h"
17 > #include "Daodan_GL.h"
18  
19 < #include "oni_gl.h"
19 < #include "daodan_gl.h"
20 <
21 < #include "inifile.h"
19 > #include "Inifile_Reader.h"
20  
21   HMODULE DDrDLLModule;
22   HMODULE DDrONiModule;
# Line 54 | Line 52 | bool patch_cheater = true;
52   bool patch_newweapon = true;
53   bool opt_usedaodanbsl = true;
54   bool opt_border = true;
57 bool opt_shadow = false;
55   bool opt_topmost = false;
56  
57   typedef int (__cdecl *CHINESEPROC)(DWORD WINAPI);
# Line 143 | Line 140 | bool DDrPatch_Init()
140          // Disable UUrPlatform_Initalize/Terminate, this enables the Alt-Tab and the Windows key but has the possible side effect of allowing the screensaver to enable itself in-game.
141          if (patch_alttab)
142          {
143 +                // 0xC3 = ret, so makes those functions just have a "ret" instruction at their start
144                  DDrPatch_Byte  ((char*)UUrPlatform_Initialize, 0xC3);
145                  DDrPatch_Byte  ((char*)UUrPlatform_Terminate, 0xC3);
146          }
# Line 312 | Line 310 | bool DDrIniCallback(char* section, bool
310                                  opt_usedaodanbsl = !_stricmp(inifile_cleanstr(value), "true");
311                          else if (!_stricmp(name, "border"))
312                                  opt_border = !_stricmp(inifile_cleanstr(value), "true");
315                        else if (!_stricmp(name, "shadow"))
316                                opt_shadow = !_stricmp(inifile_cleanstr(value), "true");
313                          else if (!_stricmp(name, "topmost"))
314                                  opt_topmost = !_stricmp(inifile_cleanstr(value), "true");
315                          else if (!_stricmp(name, "multibyte"))
# Line 330 | Line 326 | bool DDrIniCallback(char* section, bool
326                                  opt_sound = !_stricmp(inifile_cleanstr(value), "true");
327                          else if (!_stricmp(name, "switch"))
328                                  M3gResolutionSwitch = !_stricmp(inifile_cleanstr(value), "true");
333                        //else if (!_stricmp(name, "devmode"))
334                                //turn_dev_mode_on = !_stricmp(inifile_cleanstr(value), "true");
329                          else
330                                  DDrStartupMessage("unrecognised option \"%s\"", name);
331                          break;
# Line 588 | Line 582 | void __cdecl DDrMain(int argc, char* arg
582  
583          DDrStartupMessage("daodan attached!");
584          
585 +        // Tell Oni to not load non levelX_final-files by default:
586          opt_ignore_private_data = false;
587 +
588 +        // Enable sound by default:
589          opt_sound = true;
590          
591          DDrConfig();
# Line 679 | Line 676 | void __cdecl DDrMain(int argc, char* arg
676                  DDrPatch_MakeJump((void*)(OniExe + 0x0010f021), (void*)DDrCheater_LevelLoad);
677          }
678  
682        //DDrPatch_MakeJump((void*)(OniExe + 0x000378c0, (void*)DDrException);
679          DDrPatch_MakeJump((void*)(OniExe + 0x000245A0), (void*)DDrPrintWarning);
684        //init_daodan_gl();
680          
681          ONiMain(argc, argv);
682   }

Diff Legend

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