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 297 by rossy, Fri Apr 17 13:31:04 2009 UTC vs.
Revision 326 by rossy, Thu May 28 10:33:59 2009 UTC

# Line 1 | Line 1
1   #include "Daodan.h"
2   #include "Daodan_Patch.h"
3   #include "Daodan_Utility.h"
4 + #include "Daodan_Win32.h"
5  
6   #include "Oni.h"
7   #include "BFW_Utility.h"
# Line 44 | Line 45 | bool DDrPatch_Init()
45          // Sets the fadetime to 4800 by default
46          DDrPatch_Int16 (OniExe + 0x0011ab0e, 0x12c0);
47          
47        // Patch for alt-tab and the start menu
48        DDrPatch_Byte  (OniExe + 0x00026010, 0xC3);
48          
49          // Hackish fix for Konoko not kicking guns
50   //      const char kickgun_patch[] = { 0x00, 0x05, 0x00, 0x00, 0x00, 0xC7, 0x05, 0x1C, 0xC9, 0x5E, 0x00, 0x70, 0xB8, 0x43, 0x00, 0xC7, 0x05, 0x20, 0xC9, 0x5E, 0x00, 0x20, 0xBE, 0x43 };
# Line 58 | Line 57 | bool DDrPatch_Init()
57   //      const char throwtest_patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
58   //      DDrPatch_Const(OniExe + 0x000dc190, throwtest_patch);
59          
60 +        // 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.
61 +        DDrPatch_Byte  ((void*)UUrPlatform_Initialize, 0xC3);
62 +        DDrPatch_Byte  ((void*)UUrPlatform_Terminate, 0xC3);
63 +        
64 +        // Unlocks particle action disabling/enabling bits for all events. (Will be controlled by a command line switch when I figure out how to do that without Win32 hacks.)
65 +        //DDrPatch_Int16 (OniExe + 0x001b184, 0x9090);
66 +        
67          return true;
68   }
69  
# Line 76 | Line 82 | void __cdecl DDrMain(int argc, char* arg
82          DDrPatch_MakeJump(UUrMachineTime_High_Frequency, DDrMachineTime_High_Frequency);
83          DDrPatch_MakeJump(UUrMachineTime_Sixtieths, DDrMachineTime_Sixtieths);
84          
85 +        // Windowed mode
86 +        DDrPatch_MakeJump(ONrPlatform_Initialize, DDrPlatform_Initialize);
87 +        DDrPatch_MakeJump(gl_platform_initialize, daodangl_platform_initialize);
88 +        
89 +        init_daodan_gl();
90 +        
91          ONiMain(argc, argv);
92   }
93  

Diff Legend

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