From a6554b4f846beed906641e2ee3eb82e20283b935 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:41:44 -0400 Subject: [PATCH] Use void* instead of u32 for segmented addresses in debug display (#995) * remove fake match * change u32 to void* * formatter * Update src/code/z_debug_display.c Co-authored-by: Dragorn421 Co-authored-by: Dragorn421 --- src/code/z_debug_display.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/code/z_debug_display.c b/src/code/z_debug_display.c index 2f560f2b56..5ca7ce1540 100644 --- a/src/code/z_debug_display.c +++ b/src/code/z_debug_display.c @@ -2,14 +2,14 @@ #include "objects/gameplay_keep/gameplay_keep.h" typedef struct { - /* 0x00 */ s16 drawType; // indicates which draw function to use when displaying the object - /* 0x04 */ u32 drawArg; // segment address (display list or texture) passed to the draw funciton when called -} DebugDispObjectInfo; // size = 0x8 + /* 0x00 */ s16 drawType; // indicates which draw function to use when displaying the object + /* 0x04 */ void* drawArg; // segment address (display list or texture) passed to the draw function when called +} DebugDispObjectInfo; // size = 0x8 -typedef void (*DebugDispObject_DrawFunc)(DebugDispObject*, u32, GlobalContext*); +typedef void (*DebugDispObject_DrawFunc)(DebugDispObject*, void*, GlobalContext*); -void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, GlobalContext* globalCtx); -void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, u32 dlist, GlobalContext* globalCtx); +void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, GlobalContext* globalCtx); +void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, GlobalContext* globalCtx); static DebugDispObject_DrawFunc sDebugObjectDrawFuncTable[] = { DebugDisplay_DrawSpriteI8, @@ -66,7 +66,7 @@ void DebugDisplay_DrawObjects(GlobalContext* globalCtx) { } } -void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, GlobalContext* globalCtx) { +void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 169); func_80094678(globalCtx->state.gfxCtx); @@ -88,7 +88,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, GlobalCont CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 192); } -void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, u32 dlist, GlobalContext* globalCtx) { +void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 211); func_8009435C(globalCtx->state.gfxCtx);