1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

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 <Dragorn421@users.noreply.github.com>

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
louist103 2021-10-11 13:41:44 -04:00 committed by GitHub
parent f1d27bf653
commit a6554b4f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);