Skip to content

Commit

Permalink
Add some eqgraphics offsets for render debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
brainiac committed Oct 19, 2024
1 parent 2b700a3 commit b1908f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,9 @@ INITIALIZE_EQGRAPHICS_OFFSET(CRender__RenderBlind);
INITIALIZE_EQGRAPHICS_OFFSET(CRender__UpdateDisplay);
INITIALIZE_EQGRAPHICS_OFFSET(CRender__ResetDevice);
INITIALIZE_EQGRAPHICS_OFFSET(C2DPrimitiveManager__AddCachedText);
INITIALIZE_EQGRAPHICS_OFFSET(C2DPrimitiveManager__Render);
INITIALIZE_EQGRAPHICS_OFFSET(ObjectPreviewView__Render);
INITIALIZE_EQGRAPHICS_OFFSET(EQGraphics_DebugAPI_Ptr);

INITIALIZE_EQGRAPHICS_OFFSET(__bRenderSceneCalled);
BOOL* g_bRenderSceneCalled = (BOOL*)__bRenderSceneCalled;
Expand All @@ -1478,6 +1481,9 @@ void InitializeEQGraphicsOffsets()
CRender__ResetDevice = FixEQGraphicsOffset(CRender__ResetDevice_x);
g_bRenderSceneCalled = (BOOL*)FixEQGraphicsOffset(__bRenderSceneCalled_x);
C2DPrimitiveManager__AddCachedText = FixEQGraphicsOffset(C2DPrimitiveManager__AddCachedText_x);
C2DPrimitiveManager__Render = FixEQGraphicsOffset(C2DPrimitiveManager__Render_x);
ObjectPreviewView__Render = FixEQGraphicsOffset(ObjectPreviewView__Render_x);
EQGraphics_DebugAPI_Ptr = FixEQGraphicsOffset(EQGraphics_DebugAPI_Ptr_x);
}
}

Expand Down
3 changes: 3 additions & 0 deletions Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,9 @@ EQLIB_VAR uintptr_t CRender__UpdateDisplay;
EQLIB_VAR uintptr_t CRender__ResetDevice;
EQLIB_VAR BOOL* g_bRenderSceneCalled;
EQLIB_VAR uintptr_t C2DPrimitiveManager__AddCachedText;
EQLIB_VAR uintptr_t C2DPrimitiveManager__Render;
EQLIB_VAR uintptr_t ObjectPreviewView__Render;
EQLIB_VAR uintptr_t EQGraphics_DebugAPI_Ptr;

//============================================================================
// eqmain.dll Offsets
Expand Down
5 changes: 5 additions & 0 deletions eqgraphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
#define __bRenderSceneCalled_x 0x18033C010

#define C2DPrimitiveManager__AddCachedText_x 0x1800DEDF0
#define C2DPrimitiveManager__Render_x 0x1800DFF90

#define ObjectPreviewView__Render_x 0x180026840

#define EQGraphics_DebugAPI_Ptr_x 0x18039DA98

#if __has_include("../private/eqgraphics-private.h")
#include "../private/eqgraphics-private.h"
Expand Down

0 comments on commit b1908f3

Please sign in to comment.