- Timestamp:
- Jul 26, 2013, 12:42:31 PM (11 years ago)
- Location:
- Daodan/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan.c
r839 r893 2 2 #include <string.h> 3 3 #include <stdio.h> 4 #include <time.h> 4 5 5 6 #include "Daodan.h" … … 11 12 #include "Daodan_Config.h" 12 13 #include "patches/Patches.h" 14 #include "_Version.h" 13 15 14 16 #include "Oni.h" … … 22 24 void __cdecl DDrMain(int argc, char* argv[]) 23 25 { 24 DDrStartupMessage("Daodan: Daodan attached!"); 26 time_t rawtime; 27 struct tm* timeinfo; 28 char buffer[80]; 29 time(&rawtime); 30 timeinfo = localtime(&rawtime); 31 strftime(buffer, 80, "Daodan: %Y-%m-%d %H:%M:%S", timeinfo); 32 33 DDrStartupMessage("Daodan: Daodan v."DAODAN_VERSION_STRING" attached!"); 34 DDrStartupMessage(buffer); 25 35 26 36 DDrConfig(argc, argv); -
Daodan/src/Daodan_Config.c
r877 r893 37 37 bool patch_projaware = true; 38 38 bool patch_safeprintf = true; 39 bool patch_showalllasersights = false; 39 40 bool patch_throwtest = false; 40 41 bool patch_usedaodangl = true; … … 152 153 else if (!_stricmp(name, "safeprintf")) 153 154 patch_safeprintf = !_stricmp(inifile_cleanstr(value), "true"); 155 else if (!_stricmp(name, "showalllasersights")) 156 patch_showalllasersights = !_stricmp(inifile_cleanstr(value), "true"); 154 157 else if (!_stricmp(name, "throwtest")) 155 158 patch_throwtest = !_stricmp(inifile_cleanstr(value), "true"); -
Daodan/src/Daodan_Config.h
r877 r893 32 32 extern bool patch_projaware; 33 33 extern bool patch_safeprintf; 34 extern bool patch_showalllasersights; 34 35 extern bool patch_throwtest; 35 36 extern bool patch_usedaodangl; -
Daodan/src/Daodan_GL.c
r838 r893 85 85 if (dm.dmBitsPerPel < DD_MIN_DEPTH || dm.dmPelsWidth < 640 || dm.dmPelsHeight < 480) 86 86 continue; 87 if (dm.dmPelsWidth < dm.dmPelsHeight) 88 continue; 87 89 88 90 // Already exists? Search backwards as modes are sorted most of the times -
Daodan/src/Oni_Symbols.h
r882 r893 82 82 #define OBJgTriggerVolume_Visible (*((bool*)0x005ec6c4)) 83 83 84 //#define OBJgFlag_DrawFlags (*((void*)0x005ec624)) 85 //#define OBJgFlag_ViewPrefix (*((void*)0x005ec650)) 86 //#define OBJgFlag_DrawNameDistance (*((void*)0x005ec634)) 84 87 85 88 // Method signature for script (BSL) functions … … 206 209 207 210 DefFunc(int, OBJrObjectType_EnumerateObjects, ONICALL, (int inObjectType, OBJtEnumCallback_Object inEnumCallback, int inUserData), 0x004D0080); 211 //DefFunc(void, OBJrTriggerVolume_IntersectsCharacter, ONICALL, (), 0x004cc680); 208 212 209 213 DefFunc(void, OBJrDoor_Open, ONICALL, (DoorObject *inObject, Character *inCharacter), 0x004C26C0); … … 215 219 DefFunc(void, ONiDrawWeaponSight, ONICALL, (Character* Char), 0x004E1900); 216 220 DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0); 217 DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x041EB00); 221 DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x0041EB00); 222 /* 223 DefFunc(void, M3rGeom_Line_Light, ONICALL, (), 0x0041f440); 224 DefFunc(void, M3rMatrixStack_Push, ONICALL, (), 0x0041baa0); 225 DefFunc(void, M3rMatrixStack_Get, ONICALL, (), 0x0041bb20); 226 DefFunc(void, M3rMatrixStack_Pop, ONICALL, (), 0x0041bb30); 227 DefFunc(void, M3rMatrixStack_Identity, ONICALL, (), 0x0041bba0); 228 DefFunc(void, M3rMatrixStack_Rotate, ONICALL, (), 0x0041bbe0); 229 DefFunc(void, M3rMatrixStack_UniformScale, ONICALL, (), 0x0041bc20); 230 DefFunc(void, M3rMatrixStack_Translate, ONICALL, (), 0x0041bc40); 231 DefFunc(void, M3rMatrixStack_Multiply, ONICALL, (), 0x0041bc70); 232 DefFunc(void, M3rGeom_State_Commit, ONICALL, (), 0x0041e870); 233 234 DefFunc(void, MUrPoint_Distance, ONICALL, (), 0x00433270); 235 */ 218 236 219 237 // Make a dialog element (in)visible and change its position -
Daodan/src/_Version.h
r837 r893 6 6 7 7 #define DAODAN_VERSION_MAJOR 3 8 #define DAODAN_VERSION_MINOR 38 #define DAODAN_VERSION_MINOR 4 9 9 #define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR) 10 10 -
Daodan/src/patches/Patches.c
r878 r893 13 13 #include "../flatline/Flatline_Hooks.h" 14 14 #include "../Oni.h" 15 //#include "Objt.h" 15 16 16 17 typedef int (__cdecl *CHINESEPROC)(DWORD ThreadId); … … 247 248 void DD_Patch_Flatline() 248 249 { 249 DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 );250 250 DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers ); 251 251 … … 379 379 } 380 380 381 // Show all (also enemies') lasersights 382 void DD_Patch_ShowAllLasersights() 383 { 384 DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 ); 385 } 386 381 387 // Experiment with allowing enemies to be thrown over railings 382 388 void DD_Patch_Throwtest() … … 479 485 } 480 486 487 /* 488 void DD_Patch_ShowTriggerVolumes() 489 { 490 DDrPatch_Int32((int*)(OniExe + 0x000cc9bb+4), (uint32_t)DD_OBJiTriggerVolume_Draw); 491 } 492 493 void DD_Patch_ShowFlags() 494 { 495 DDrPatch_Int32((int*)(OniExe + 0x000c4ed4+4), (uint32_t)DD_OBJiFlag_Draw); 496 } 497 */ 498 481 499 bool DD_Patch_Init() 482 500 { … … 560 578 if (patch_safeprintf) 561 579 DD_Patch_SafePrintf(); 580 581 if (patch_showalllasersights) 582 DD_Patch_ShowAllLasersights(); 562 583 563 584 if (patch_throwtest) … … 582 603 583 604 DD_Patch_ShowNames(); 584 605 /* 606 DD_Patch_ShowTriggerVolumes(); 607 DD_Patch_ShowFlags(); 608 */ 585 609 if (patch_flatline) 586 610 DD_Patch_Flatline();
Note:
See TracChangeset
for help on using the changeset viewer.