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 276 by rossy, Wed Mar 18 07:48:30 2009 UTC vs.
Revision 323 by rossy, Sun May 17 12:19:35 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"
8  
9 + #include "oni_gl.h"
10 + #include "daodan_gl.h"
11 +
12   HMODULE DDrDLLModule;
13   HMODULE DDrONiModule;
14  
# Line 41 | Line 45 | bool DDrPatch_Init()
45          // Sets the fadetime to 4800 by default
46          DDrPatch_Int16 (OniExe + 0x0011ab0e, 0x12c0);
47          
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 };
51   //      DDrPatch_Const (OniExe + 0x000dc420, kickgun_patch);
# Line 52 | 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 62 | Line 74 | void __cdecl DDrMain(int argc, char* arg
74          // Safe startup message printer
75          DDrPatch_MakeJump(UUrStartupMessage, DDrStartupMessage);
76          
77 <        // Test performance patch
77 >        // Daodan device mode enumeration function
78 >        DDrPatch_MakeJump(gl_enumerate_valid_display_modes, daodan_enumerate_valid_display_modes);
79 >        
80 >        // Performance patch
81          DDrPatch_MakeJump(UUrMachineTime_High, DDrMachineTime_High);
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 +        
88          ONiMain(argc, argv);
89   }
90  

Diff Legend

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