Changeset 987 for Daodan


Ignore:
Timestamp:
Mar 19, 2014, 1:44:30 PM (11 years ago)
Author:
alloc
Message:

Daodan: Made symbols const

Location:
Daodan/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Oni_Symbols.h

    r986 r987  
    2121#define BFgDebugFileEnable      (*((bool*)0x0055c8d0))
    2222
    23 // Parameter 1 to COrTextArea_Print. Context pointer?
    24 #define COgConsoleLines         (*((uint32_t*)0x005cb468))
    25 
    2623// Command line instance
    2724#define COgCommandLine          (*((void**)0x00571b74))
     
    9996
    10097
    101 #define DefFunc( type, name, callingconvention, args, address) typedef type ( callingconvention * _##name ) args; static _##name name = (_##name)address
     98#define DefFunc( type, name, callingconvention, args, address) typedef type ( callingconvention * _##name ) args; static const _##name name = (_##name)address
    10299
    103100// Orig timing functions, replaced by DDrMachineTime_* if option "usegettickcount" is enabled
     
    147144
    148145DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370);
     146DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (const void* inInput), 0x004f6200);
     147DefFunc(uint8_t, ONrDebugKey_WentDown, ONICALL, (uint32_t inKey), 0x005050d0);
    149148
    150149// Get active (player?) character
     
    160159
    161160// Print message to console
    162 DefFunc(void, COrTextArea_Print, ONICALL, (uint32_t area, uint32_t priority, uint32_t textshade, uint32_t textshadowshade, const char* text, uint32_t unk_alwaws_0, uint32_t fadetime), 0x00431340);
     161DefFunc(void, COrTextArea_Print, ONICALL, (void* area, uint32_t priority, uint32_t textshade, uint32_t textshadowshade, const char* text, uint32_t unk_alwaws_0, uint32_t fadetime), 0x00431340);
    163162DefFunc(int16_t, COrTextArea_Resize, ONICALL, (void* inTextArea, UUtRect* inBounds, int16_t inNumTextEntries), 0x00431460);
    164163
     
    204203
    205204// Draw text on the screen
    206 DefFunc(int16_t, TSrContext_DrawText, ONICALL, (uint32_t TSrContext, char* Text, char alpha, uint32_t usuallyzero, void* pRect), 0x0042DF00);
     205DefFunc(int16_t, TSrContext_DrawText, ONICALL, (void* TSrContext, char* Text, char alpha, uint32_t usuallyzero, void* pRect), 0x0042DF00);
    207206DefFunc(int16_t, TSrContext_New, ONICALL, (void* FontInstance, int size, int hthsik1,int hthsik2,int hthsik3, void* TSrContext), 0x0042EA30);
    208207DefFunc(int16_t, TSrContext_SetFontSize, ONICALL, (void* ioTextContext, uint16_t inSize), 0x0042ED50);
  • Daodan/src/patches/Patches.c

    r986 r987  
    179179}
    180180
     181_ONrGameState_HandleUtilityInput Oni_ONrGameState_HandleUtilityInput = (_ONrGameState_HandleUtilityInput)0;
     182void ONICALL DD_ONrGameState_HandleUtilityInput(const void* inInput)
     183{
     184        Oni_ONrGameState_HandleUtilityInput(inInput);
     185       
     186        if (ONrDebugKey_WentDown(7)) {
     187                OBJgTriggerVolume_Visible = !OBJgTriggerVolume_Visible;
     188        }
     189}
    181190
    182191
     
    497506{
    498507        Oni_ONrMechanics_Register = DDrPatch_MakeDetour((void*)ONrMechanics_Register, (void*)DD_ONrMechanics_Register);
     508        Oni_ONrGameState_HandleUtilityInput = DDrPatch_MakeDetour((void*)ONrGameState_HandleUtilityInput, (void*)DD_ONrGameState_HandleUtilityInput);
    499509}
    500510
Note: See TracChangeset for help on using the changeset viewer.