Changeset 447
- Timestamp:
- Jul 21, 2009, 5:33:07 AM (15 years ago)
- Location:
- Daodan
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan.c
r445 r447 47 47 bool patch_windowhack = true; 48 48 bool patch_daodaninit = true; 49 bool patch_bsl = true; 49 50 50 51 bool opt_usedaodanbsl = true; … … 241 242 else if (!stricmp(name, "daodaninit")) 242 243 patch_daodaninit = !stricmp(value, "true"); 244 else if (!stricmp(name, "bsl")) 245 patch_bsl = !stricmp(value, "true"); 243 246 else 244 247 DDrStartupMessage("unrecognised patch \"%s\"", name); … … 427 430 DDrPatch_MakeCall(OniExe + 0x000d345a, DDrGame_Init); 428 431 432 // Patches for existing BSL functions 433 if (patch_bsl) 434 SLrDaodan_Patch(); 435 429 436 init_daodan_gl(); 430 437 -
Daodan/src/Daodan_BSL.c
r446 r447 5 5 #include "Daodan_BSL.h" 6 6 #include "Daodan_Utility.h" 7 #include "Daodan_Patch.h" 7 8 #include "Daodan_Console.h" 8 9 #include "BFW_ScriptLang.h" 9 10 #include "Oni.h" 10 11 #include "Oni_Character.h" 12 #include "oni_gl.h" 11 13 #include "dSFMT\dSFMT.h" 12 14 #include "Daodan_Character.h" … … 343 345 } 344 346 347 // Widescreen patch for talking heads. 348 uint16_t ONICALL cinematic_start_patch(sl_callinfo* callinfo, unsigned int numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) 349 { 350 args[1].value_int32 = (double)args[1].value_int32 / (double)(gl->DisplayMode.Width) * (4.0 / 3.0 * (double)(gl->DisplayMode.Height)); 351 return ((sl_func)(OniExe + 0x000f3830))(callinfo, numargs, args, dontuse1, dontuse2, ret); 352 } 353 345 354 void SLrDaodan_Initalize() 346 355 { … … 365 374 366 375 SLrScript_Command_Register_ReturnType("sprintf", "C-style sprintf.", "format:string arg1 arg2 ...", sl_str32, bsl_sprintf); 367 368 376 SLrScript_Command_Register_ReturnType("dprintcolor", "prints to console in color", "text:string [color: r b g] [color: r b g]", sl_void, bsl_dprintcolored); 369 377 } 378 379 void SLrDaodan_Patch() 380 { 381 DDrPatch_Int32(OniExe + 0x000f3755, (int)cinematic_start_patch); 382 } -
Daodan/src/Daodan_BSL.h
r439 r447 6 6 7 7 void SLrDaodan_Initalize(); 8 void SLrDaodan_Patch(); 8 9 9 10 #endif
Note:
See TracChangeset
for help on using the changeset viewer.