--- Daodan/src/Daodan.c 2009/06/03 12:12:21 329 +++ Daodan/src/Daodan.c 2009/06/06 01:30:13 339 @@ -2,8 +2,12 @@ #include "Daodan_Patch.h" #include "Daodan_Utility.h" #include "Daodan_Win32.h" +#include "Daodan_Cheater.h" +#include "Daodan_Persistence.h" #include "Oni.h" +#include "Oni_Persistence.h" + #include "BFW_Utility.h" #include "oni_gl.h" @@ -82,6 +86,10 @@ bool DDrPatch_Init() DDrPatch_Byte (OniExe + 0x0002e98e, 0xeb); DDrPatch_Byte (OniExe + 0x0002e9dc, 0xeb); + // Cheat table patch + DDrPatch_Int32 (OniExe + 0x000f616b, (int)&DDr_CheatTable[0].name); + DDrPatch_Int32 (OniExe + 0x000f617a, (int)&DDr_CheatTable[0].message_on); + return true; } @@ -100,6 +108,9 @@ void __cdecl DDrMain(int argc, char* arg DDrPatch_MakeJump(UUrMachineTime_High_Frequency, DDrMachineTime_High_Frequency); DDrPatch_MakeJump(UUrMachineTime_Sixtieths, DDrMachineTime_Sixtieths); + // Cheats always enabled + DDrPatch_MakeJump(ONrPersist_GetWonGame, DDrPersist_GetWonGame); + // Windowed mode // DDrPatch_MakeJump(ONrPlatform_Initialize, DDrPlatform_Initialize); // DDrPatch_MakeJump(gl_platform_initialize, daodangl_platform_initialize);