Changeset 877 for Daodan/src/patches


Ignore:
Timestamp:
Jun 2, 2013, 1:25:34 PM (11 years ago)
Author:
alloc
Message:

Daodan: Moved flatline to subfolder, flatline enabled through patch "flatline"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/patches/Patches.c

    r876 r877  
    1010#include "../Daodan_Utility.h"
    1111#include "../Daodan_Win32.h"
    12 #ifdef FLATLINE
    13 #include "../Flatline_BSL.h"
    14 #include "../Flatline_Hooks.h"
    15 #endif
     12#include "../flatline/Flatline_BSL.h"
     13#include "../flatline/Flatline_Hooks.h"
    1614#include "../Oni.h"
    1715
     
    4442        if (opt_usedaodanbsl)
    4543                SLrDaodan_Initialize();
     44        if (patch_flatline)
     45                SLrFlatline_Initialize();
    4646}
    4747
     
    8181
    8282
    83 int FLrHook_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output)
     83int DD_Patch_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output)
    8484{
    8585        //flags = (1 << 10);
     
    9090}
    9191
    92 short FLrHook_DebugNameShadeHack( Character* Char )
     92short DD_Patch_DebugNameShadeHack( Character* Char )
    9393{
    9494        return TSrContext_SetShade(*(void**)(OniExe + 0x001EB844), ONrCharacter_GetHealthShade( Char->Health, Char->MaxHealth ));
     
    244244}
    245245
     246// Enable flatline multiplayer code
     247void DD_Patch_Flatline()
     248{
     249        DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 );
     250        DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers );
     251
     252       
     253        //Flatline related stuff
     254        DDrPatch_MakeCall((void*)(OniExe + 0x000FBCEA), DDrText_Hook);
     255       
     256        DDrPatch_Int32((int*)(OniExe + 0x000B24D2), FLrSpawnHack);
     257
     258        DDrPatch_NOOP((char*)(OniExe + 0x000C26CB), 6);
     259
     260        DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen);
     261        DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate);
     262}
     263
    246264// Font texture cache doubled
    247265void DD_Patch_FontTextureCache()
     
    455473        DDrPatch_Byte((char*)(OniExe + 0x0008C899), 0xCE );
    456474
    457         DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), FLrHook_DebugNameShadeHack);
     475        DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), DD_Patch_DebugNameShadeHack);
    458476       
    459477        //Make the background black for additive blending
    460         DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), FLrHook_DebugNameTextureInit );
     478        DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), DD_Patch_DebugNameTextureInit );
    461479*/
    462480}
     
    499517                DD_Patch_DaodanDisplayEnum();
    500518       
    501         if (patch_daodaninit)
    502                 DD_Patch_DaodanInit();
    503        
    504519        if (patch_directinput)
    505520                DD_Patch_DirectInput();
     
    560575
    561576
     577        DD_Patch_DaodanInit();
     578       
    562579        DD_Patch_GammaSlider();
    563580
     
    567584        DD_Patch_ShowNames();
    568585
    569 #ifdef FLATLINE
    570         DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 );
    571         DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers );
    572        
    573 
    574 
    575         //Flatline related stuff
    576         DDrPatch_MakeCall((void*)(OniExe + 0x000FBCEA), DDrText_Hook);
    577        
    578         DDrPatch_Int32((int*)(OniExe + 0x000B24D2), FLrSpawnHack);
    579 
    580         DDrPatch_NOOP((char*)(OniExe + 0x000C26CB), 6);
    581 
    582         DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen);
    583         DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate);
    584 #endif
     586        if (patch_flatline)
     587                DD_Patch_Flatline();
    585588
    586589        return true;
Note: See TracChangeset for help on using the changeset viewer.