mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
Match a bunch of overlay draw functions (#2034)
* Match a bunch of actor draw functions * Change z_demo_gt.c draw functions to take Actor* thisx
This commit is contained in:
parent
e6bc4bd8cb
commit
755604d5ff
23 changed files with 131 additions and 149 deletions
|
@ -741,7 +741,7 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void ObjSwitch_DrawFloor(ObjSwitch* this, PlayState* play) {
|
||||
void ObjSwitch_DrawFloor(Actor* thisx, PlayState* play) {
|
||||
static Gfx* floorSwitchDLists[] = {
|
||||
gFloorSwitch1DL, // OBJSWITCH_SUBTYPE_ONCE
|
||||
gFloorSwitch3DL, // OBJSWITCH_SUBTYPE_TOGGLE
|
||||
|
@ -749,14 +749,14 @@ void ObjSwitch_DrawFloor(ObjSwitch* this, PlayState* play) {
|
|||
gFloorSwitch2DL, // OBJSWITCH_SUBTYPE_HOLD_INVERTED
|
||||
};
|
||||
|
||||
Gfx_DrawDListOpa(play, floorSwitchDLists[OBJSWITCH_SUBTYPE(&this->dyna.actor)]);
|
||||
Gfx_DrawDListOpa(play, floorSwitchDLists[OBJSWITCH_SUBTYPE(thisx)]);
|
||||
}
|
||||
|
||||
void ObjSwitch_DrawFloorRusty(ObjSwitch* this, PlayState* play) {
|
||||
void ObjSwitch_DrawFloorRusty(Actor* thisx, PlayState* play) {
|
||||
Gfx_DrawDListOpa(play, gRustyFloorSwitchDL);
|
||||
}
|
||||
|
||||
void ObjSwitch_DrawEye(ObjSwitch* this, PlayState* play) {
|
||||
void ObjSwitch_DrawEye(Actor* thisx, PlayState* play) {
|
||||
static void* eyeTextures[][4] = {
|
||||
// OBJSWITCH_SUBTYPE_ONCE
|
||||
{ gEyeSwitchGoldOpenTex, gEyeSwitchGoldOpeningTex, gEyeSwitchGoldClosingTex, gEyeSwitchGoldClosedTex },
|
||||
|
@ -767,7 +767,7 @@ void ObjSwitch_DrawEye(ObjSwitch* this, PlayState* play) {
|
|||
gEyeSwitch1DL, // OBJSWITCH_SUBTYPE_ONCE
|
||||
gEyeSwitch2DL, // OBJSWITCH_SUBTYPE_TOGGLE
|
||||
};
|
||||
s32 pad;
|
||||
ObjSwitch* this = (ObjSwitch*)thisx;
|
||||
s32 subType = OBJSWITCH_SUBTYPE(&this->dyna.actor);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_obj_switch.c", 1459);
|
||||
|
@ -781,7 +781,7 @@ void ObjSwitch_DrawEye(ObjSwitch* this, PlayState* play) {
|
|||
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_switch.c", 1471);
|
||||
}
|
||||
|
||||
void ObjSwitch_DrawCrystal(ObjSwitch* this, PlayState* play) {
|
||||
void ObjSwitch_DrawCrystal(Actor* thisx, PlayState* play) {
|
||||
static Gfx* xluDLists[] = {
|
||||
gCrystalSwitchCoreXluDL, // OBJSWITCH_SUBTYPE_ONCE
|
||||
gCrystalSwitchDiamondXluDL, // OBJSWITCH_SUBTYPE_TOGGLE
|
||||
|
@ -796,15 +796,13 @@ void ObjSwitch_DrawCrystal(ObjSwitch* this, PlayState* play) {
|
|||
NULL, // OBJSWITCH_SUBTYPE_HOLD_INVERTED
|
||||
gCrystalSwitchCoreOpaDL // OBJSWITCH_SUBTYPE_SYNC
|
||||
};
|
||||
s32 pad1;
|
||||
s32 pad2;
|
||||
ObjSwitch* this = (ObjSwitch*)thisx;
|
||||
s32 pad;
|
||||
s32 subType;
|
||||
|
||||
subType = OBJSWITCH_SUBTYPE(&this->dyna.actor);
|
||||
func_8002ED80(&this->dyna.actor, play, 0);
|
||||
|
||||
if (1) {}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_obj_switch.c", 1494);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
|
@ -833,7 +831,7 @@ void ObjSwitch_DrawCrystal(ObjSwitch* this, PlayState* play) {
|
|||
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_switch.c", 1533);
|
||||
}
|
||||
|
||||
static ObjSwitchActionFunc sDrawFuncs[] = {
|
||||
static ObjSwitchDrawFunc sDrawFuncs[] = {
|
||||
ObjSwitch_DrawFloor, // OBJSWITCH_TYPE_FLOOR
|
||||
ObjSwitch_DrawFloorRusty, // OBJSWITCH_TYPE_FLOOR_RUSTY
|
||||
ObjSwitch_DrawEye, // OBJSWITCH_TYPE_EYE
|
||||
|
@ -842,7 +840,5 @@ static ObjSwitchActionFunc sDrawFuncs[] = {
|
|||
};
|
||||
|
||||
void ObjSwitch_Draw(Actor* thisx, PlayState* play) {
|
||||
ObjSwitch* this = (ObjSwitch*)thisx;
|
||||
|
||||
sDrawFuncs[OBJSWITCH_TYPE(&this->dyna.actor)](this, play);
|
||||
sDrawFuncs[OBJSWITCH_TYPE(thisx)](thisx, play);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
struct ObjSwitch;
|
||||
|
||||
typedef void (*ObjSwitchActionFunc)(struct ObjSwitch*, PlayState*);
|
||||
typedef void (*ObjSwitchDrawFunc)(Actor*, PlayState*);
|
||||
|
||||
typedef enum ObjSwitchType {
|
||||
/* 0 */ OBJSWITCH_TYPE_FLOOR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue