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 272 by rossy, Tue Mar 17 09:06:00 2009 UTC vs.
Revision 273 by rossy, Tue Mar 17 09:55:12 2009 UTC

# Line 2 | Line 2
2   #include "Daodan_Patch.h"
3   #include "Daodan_Utility.h"
4  
5 + #include "Oni.h"
6   #include "BFW_Utility.h"
7  
8   HMODULE DDrDLLModule;
# Line 54 | Line 55 | bool DDrPatch_Init()
55          return true;
56   }
57  
58 + void DDrMain(int argc, char* argv[])
59 + {
60 +        DDrPatch_Init();
61 +        
62 +        // Safe startup message printer
63 +        DDrPatch_MakeJump(UUrStartupMessage, DDrStartupMessage);
64 +        
65 +        ONiMain(argc, argv);
66 + }
67 +
68   BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
69   {
70          switch (fdwReason)
# Line 62 | Line 73 | BOOL WINAPI DllMain(HINSTANCE hinstDLL,
73                          DDrDLLModule = hinstDLL;
74                          DDrONiModule = GetModuleHandle(NULL);
75                          
76 <                        DDrPatch_MakeJump(UUrStartupMessage, DDrStartupMessage);
77 <                        DDrPatch_Init();
76 >                        DDrPatch_MakeCall((void*)0x00400000 + 0x0010fb49, DDrMain);
77 >                        
78                          break;
79          }
80          return TRUE;

Diff Legend

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