1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Add enum for setup dls and name z_rcp.c functions (#1196)

* Introduce `SetupDL` enum

* wip

* wip

* Remove comments on each setupdl index

* Name setup dl functions by setupdl index

* `Gfx_SetupDl` -> `Gfx_SetupDL`

* Run formatter

* globalctx -> play

* fix regressions

* `Gfx_SetupDL` -> `Gfx_SetupDL_` (add separating underscore)

* `CallSetupDL` -> `SetupDL`
This commit is contained in:
Dragorn421 2022-06-03 15:25:48 -07:00 committed by GitHub
parent 4775fd4a7e
commit 1a41694d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
376 changed files with 1047 additions and 971 deletions

View file

@ -28,7 +28,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist,
if (temp1 >= -50.0f && temp1 < 500.0f) {
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 1553);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, SETUPDL_44);
gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0,
COMBINED);
@ -134,7 +134,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 1741);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, SETUPDL_44);
// feetFloorFlag is temporarily a bitfield where the bits are set if the foot is on ground
// feetFloorFlag & 2 is left foot, feetFloorFlag & 1 is right foot
@ -353,7 +353,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
func_8002BE64(targetCtx, targetCtx->unk_4C, projTargetCenter.x, projTargetCenter.y, projTargetCenter.z);
if (!(player->stateFlags1 & PLAYER_STATE1_6) || (actor != player->unk_664)) {
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39);
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_57);
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
entry = &targetCtx->arr_50[spAC];
@ -395,7 +395,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) {
NaviColor* naviColor = &sNaviColorList[actor->category];
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_7);
Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f,
actor->focus.pos.z, MTXMODE_NEW);
@ -725,7 +725,7 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
height = (width * height > 0x1000) ? 0x1000 / width : height;
titleSecondY = titleY + (height * 4);
OVERLAY_DISP = func_80093808(OVERLAY_DISP);
OVERLAY_DISP = Gfx_SetupDL_52NoCD(OVERLAY_DISP);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
(u8)titleCtx->alpha);
@ -1909,7 +1909,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex) == play->roomCtx.curRoom.num)) {
f32 scale = 0.025f * ratio;
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_25);
Matrix_Translate(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x),
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset,
@ -3480,7 +3480,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
if (0) {} // Necessary to match
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, SETUPDL_44);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
@ -3854,7 +3854,7 @@ void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
Actor* actor, s16 alpha) {
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 8831);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha);
@ -3871,7 +3871,7 @@ void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
Actor* actor, s16 alpha) {
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 8876);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha);

View file

@ -3,7 +3,7 @@
void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
OPEN_DISPS(play->state.gfxCtx, "../z_cheap_proc.c", 214);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_cheap_proc.c", 216),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, dlist);
@ -14,7 +14,7 @@ void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist) {
OPEN_DISPS(play->state.gfxCtx, "../z_cheap_proc.c", 228);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_cheap_proc.c", 230),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, dlist);

View file

@ -69,7 +69,7 @@ void DebugDisplay_DrawObjects(PlayState* play) {
void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_debug_display.c", 169);
func_80094678(play->state.gfxCtx);
Gfx_SetupDL_47Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a);
@ -91,7 +91,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayStat
void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_debug_display.c", 211);
func_8009435C(play->state.gfxCtx);
Gfx_SetupDL_4Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a);

View file

@ -384,7 +384,7 @@ void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 556);
func_80093BA8(play->state.gfxCtx);
Gfx_SetupDL_26Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 560), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -396,7 +396,7 @@ void GetItem_DrawSoldOut(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 572);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_5);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 576), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -408,11 +408,11 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 588);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 592), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16,
32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 8), 16, 32));
@ -431,11 +431,11 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 628);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 632), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 641), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPSegment(POLY_XLU_DISP++, 0x08,
@ -456,11 +456,11 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 670);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 674), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 683), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPSegment(POLY_XLU_DISP++, 0x08,
@ -480,7 +480,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 712);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256,
1 * (play->state.frames * 2) % 256, 64, 64, 1, 0 * (play->state.frames * 0) % 128,
@ -488,7 +488,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 723), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 730), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -500,11 +500,11 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 742);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 746), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * -(play->state.frames * 5), 32,
32, 1, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32, 64));
@ -519,7 +519,7 @@ void GetItem_DrawEggOrMedallion(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 772);
func_80093BA8(play->state.gfxCtx);
Gfx_SetupDL_26Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 776), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -532,11 +532,11 @@ void GetItem_DrawCompass(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 811);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 815), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_5);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 822), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -548,7 +548,7 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 834);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32,
32, 1, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, 32));
@ -558,7 +558,7 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) {
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 855), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[5]);
@ -571,7 +571,7 @@ void GetItem_DrawGoronSword(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 868);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32,
32, 1, 0 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, 32));
@ -586,7 +586,7 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 890);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32,
32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32));
@ -601,7 +601,7 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 913);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 3), 32,
32, 1, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 2), 32, 32));
@ -616,7 +616,7 @@ void GetItem_DrawFish(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 936);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32,
32, 1, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, 32));
@ -631,7 +631,7 @@ void GetItem_DrawOpa0(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 959);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 963), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -643,11 +643,11 @@ void GetItem_DrawOpa0Xlu1(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 975);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 979), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 986), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -659,7 +659,7 @@ void GetItem_DrawXlu01(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 998);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1002), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -672,12 +672,12 @@ void GetItem_DrawOpa10Xlu2(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1015);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1019), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1027), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@ -689,11 +689,11 @@ void GetItem_DrawMagicArrow(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1039);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1043), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1050), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@ -706,7 +706,7 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1063);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), 1 * -(play->state.frames * 6), 32,
32, 1, 1 * (play->state.frames * 1), -1 * (play->state.frames * 2), 32, 32));
@ -723,7 +723,7 @@ void GetItem_DrawOpa1023(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1088);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1092), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -738,12 +738,12 @@ void GetItem_DrawOpa10Xlu32(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1108);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1112), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1120), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@ -758,12 +758,12 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 drawId) {
Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1140), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1148), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@ -776,7 +776,7 @@ void GetItem_DrawScale(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1162);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), -1 * (play->state.frames * 2), 64,
64, 1, 1 * (play->state.frames * 4), 1 * -(play->state.frames * 4), 32, 32));
@ -794,12 +794,12 @@ void GetItem_DrawBulletBag(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1188);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1192), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1200), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
@ -813,7 +813,7 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1214);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1218), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);

View file

@ -382,7 +382,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 809);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 813);
}
@ -714,7 +714,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1280);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1285);
}
@ -723,7 +723,7 @@ void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx*
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1294);
gDPPipeSync(POLY_XLU_DISP++);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE);
@ -952,7 +952,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
if (this->numElements != 0) {
if (this->flags == 0) {
func_800942F0(gfxCtx);
Gfx_SetupDL_38Xlu(gfxCtx);
gDPPipeSync(POLY_XLU_DISP++);
vtx = Graph_Alloc(gfxCtx, sizeof(Vtx[32]));

View file

@ -157,7 +157,7 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_eff_shield_particle.c", 272);
if (this != NULL) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
gDPPipeSync(POLY_XLU_DISP++);

View file

@ -157,7 +157,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
if (this != NULL) {
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
gDPPipeSync(POLY_XLU_DISP++);

View file

@ -66,7 +66,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(texture));
func_80094C50(gfxCtx);
Gfx_SetupDL_61Xlu(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB,
this->rgPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB, this->rgEnvColorA);

View file

@ -351,7 +351,7 @@ void EnAObj_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_a_keep.c", 701);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (type >= A_OBJ_MAX) {
type = A_OBJ_BOULDER_FRAGMENT;

View file

@ -820,7 +820,7 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_item00.c", 1546);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
func_8002EBCC(&this->actor, play, 0);
if (this->actor.params <= ITEM00_RUPEE_RED) {
@ -855,7 +855,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
texIndex -= 3;
}
POLY_OPA_DISP = func_800946E4(POLY_OPA_DISP);
POLY_OPA_DISP = Gfx_SetupDL_66(POLY_OPA_DISP);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sItemDropTex[texIndex]));
@ -874,13 +874,13 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_item00.c", 1623);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
func_8002EBCC(&this->actor, play, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_item00.c", 1634),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, gHeartPieceExteriorDL);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
func_8002ED80(&this->actor, play, 0);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_item00.c", 1644),
G_MTX_MODELVIEW | G_MTX_LOAD);
@ -897,7 +897,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_item00.c", 1658);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
func_8002ED80(&this->actor, play, 0);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_item00.c", 1670),
G_MTX_MODELVIEW | G_MTX_LOAD);

View file

@ -1417,7 +1417,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
scale = (color * 2.0f) + 10.0f;
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_kankyo.c", 2364), G_MTX_LOAD);
func_80093AD0(play->state.gfxCtx);
Gfx_SetupDL_54Opa(play->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, gSunDL);
Matrix_Translate(play->view.eye.x - play->envCtx.sunPos.x, play->view.eye.y - play->envCtx.sunPos.y,
@ -1436,7 +1436,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
if (alpha > 0.0f) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_kankyo.c", 2406), G_MTX_LOAD);
func_8009398C(play->state.gfxCtx);
Gfx_SetupDL_51Opa(play->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha);
@ -1631,7 +1631,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
if (glareStrength != 0) {
if (glareAlphaScale > 0.0f) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP);
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
alpha = colorIntensity / 10.0f;
alpha = CLAMP_MAX(alpha, 1.0f);
@ -1714,7 +1714,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
if (play->envCtx.precipitation[PRECIP_RAIN_CUR]) {
gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 255, 255, 30);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_20);
}
// draw rain drops
@ -1752,7 +1752,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
for (i = 0; i < play->envCtx.precipitation[PRECIP_RAIN_CUR]; i++) {
if (!materialFlag) {
func_80093D84(gfxCtx);
Gfx_SetupDL_25Xlu(gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 120);
materialFlag++;
@ -1809,7 +1809,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3032);
func_800938B4(play->state.gfxCtx);
Gfx_SetupDL_57Opa(play->state.gfxCtx);
alpha = (1000 - play->lightCtx.fogNear) * 0.02f;
@ -1831,7 +1831,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
if (play->envCtx.customSkyboxFilter) {
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3048);
func_800938B4(play->state.gfxCtx);
Gfx_SetupDL_57Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0], play->envCtx.skyboxFilterColor[1],
play->envCtx.skyboxFilterColor[2], play->envCtx.skyboxFilterColor[3]);
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
@ -1843,7 +1843,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, u8 alpha) {
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3069);
func_800938B4(play->state.gfxCtx);
Gfx_SetupDL_57Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha);
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
@ -2015,7 +2015,7 @@ void Environment_DrawLightning(PlayState* play, s32 unused) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_kankyo.c", 3333),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[sLightningBolts[i].textureIndex]));
func_80094C50(play->state.gfxCtx);
Gfx_SetupDL_61Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL);
}
@ -2306,7 +2306,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
OPEN_DISPS(gfxCtx, "../z_kankyo.c", 3835);
if (drawFlags & FILL_SCREEN_OPA) {
POLY_OPA_DISP = func_800937C0(POLY_OPA_DISP);
POLY_OPA_DISP = Gfx_SetupDL_57(POLY_OPA_DISP);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha);
gDPSetAlphaDither(POLY_OPA_DISP++, G_AD_DISABLE);
gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE);
@ -2314,7 +2314,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
}
if (drawFlags & FILL_SCREEN_XLU) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP);
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, red, green, blue, alpha);
if ((u32)alpha == 255) {
@ -2468,7 +2468,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 4044);
POLY_XLU_DISP = func_80093F34(POLY_XLU_DISP);
POLY_XLU_DISP = Gfx_SetupDL_64(POLY_XLU_DISP);
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE);
gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE);

View file

@ -432,14 +432,14 @@ void Health_DrawMeter(PlayState* play) {
if ((ddHeartCountMinusOne < 0) || (heartIndex > ddHeartCountMinusOne)) {
if (curCombineModeSet != 1) {
curCombineModeSet = 1;
func_80094520(gfxCtx);
Gfx_SetupDL_39Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
}
} else {
if (curCombineModeSet != 3) {
curCombineModeSet = 3;
func_80094520(gfxCtx);
Gfx_SetupDL_39Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
}
@ -461,14 +461,14 @@ void Health_DrawMeter(PlayState* play) {
if ((ddHeartCountMinusOne < 0) || (heartIndex > ddHeartCountMinusOne)) {
if (curCombineModeSet != 2) {
curCombineModeSet = 2;
func_80094A14(gfxCtx);
Gfx_SetupDL_42Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
}
} else {
if (curCombineModeSet != 4) {
curCombineModeSet = 4;
func_80094A14(gfxCtx);
Gfx_SetupDL_42Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
}

View file

@ -316,7 +316,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_map_exp.c", 565);
if (play->interfaceCtx.minimapAlpha >= 0xAA) {
func_80094A14(play->state.gfxCtx);
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
@ -377,7 +377,7 @@ void Minimap_Draw(PlayState* play) {
case SCENE_HAKADANCH:
case SCENE_ICE_DOUKUTO:
if (!R_MINIMAP_DISABLED) {
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0,
TEXEL0, 0, PRIMITIVE, 0);
@ -395,7 +395,7 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, mapIndex)) {
Minimap_DrawCompassIcons(play); // Draw icons for the player spawn and current position
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
MapMark_Draw(play);
}
}
@ -437,7 +437,7 @@ void Minimap_Draw(PlayState* play) {
case SCENE_SPOT20:
case SCENE_GANON_TOU:
if (!R_MINIMAP_DISABLED) {
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_MINIMAP_COLOR(0), R_MINIMAP_COLOR(1), R_MINIMAP_COLOR(2),

View file

@ -2023,11 +2023,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode >= MSGMODE_TEXT_BOX_GROWING && msgCtx->msgMode < MSGMODE_TEXT_CLOSING &&
msgCtx->textBoxType < TEXTBOX_TYPE_NONE_BOTTOM) {
Message_SetView(&msgCtx->view);
func_8009457C(&gfx);
Gfx_SetupDL_39Ptr(&gfx);
Message_DrawTextBox(play, &gfx);
}
func_8009457C(&gfx);
Gfx_SetupDL_39Ptr(&gfx);
gDPSetAlphaCompare(gfx++, G_AC_NONE);
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
@ -2882,7 +2882,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->msgMode >= MSGMODE_OCARINA_PLAYING && msgCtx->msgMode < MSGMODE_TEXT_AWAIT_NEXT &&
msgCtx->ocarinaAction != OCARINA_ACTION_FREE_PLAY && msgCtx->ocarinaAction != OCARINA_ACTION_CHECK_NOWARP) {
func_8009457C(&gfx);
Gfx_SetupDL_39Ptr(&gfx);
gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);

View file

@ -2609,7 +2609,7 @@ void Magic_DrawMeter(PlayState* play) {
magicMeterY = R_MAGIC_METER_Y_HIGHER; // one row of hearts
}
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, sMagicBorderR, sMagicBorderG, sMagicBorderB, interfaceCtx->magicAlpha);
gDPSetEnvColor(OVERLAY_DISP++, 100, 50, 50, 255);
@ -3097,7 +3097,7 @@ void Interface_Draw(PlayState* play) {
func_8008A994(interfaceCtx);
Health_DrawMeter(play);
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
// Rupee Icon
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha);
@ -3206,7 +3206,7 @@ void Interface_Draw(PlayState* play) {
func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target
}
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
Interface_DrawItemButtons(play);
@ -3286,7 +3286,7 @@ void Interface_Draw(PlayState* play) {
}
// A Button
func_80094A14(play->state.gfxCtx);
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
func_8008A8B8(play, R_A_BTN_Y, R_A_BTN_Y + 45, R_A_BTN_X, R_A_BTN_X + 45);
gSPClearGeometryMode(OVERLAY_DISP++, G_CULL_BOTH);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
@ -3320,7 +3320,7 @@ void Interface_Draw(PlayState* play) {
if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 3)) {
// Inventory Equip Effects
gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment);
func_80094A14(play->state.gfxCtx);
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
@ -3366,7 +3366,7 @@ void Interface_Draw(PlayState* play) {
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);
}
func_80094520(play->state.gfxCtx);
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
if (gSaveContext.minigameState != 1) {

View file

@ -1356,7 +1356,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 arg2) {
if (BgCheck_AnyLineTest3(&play->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) {
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2572);
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x07);
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_7);
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sp74, &sp68, &sp64);

View file

@ -34,7 +34,7 @@ void PreNMI_Draw(PreNMIContext* this) {
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
func_800940B0(gfxCtx);
Gfx_SetupDL_36Opa(gfxCtx);
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1));
gDPFillRectangle(POLY_OPA_DISP++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100);

File diff suppressed because it is too large Load diff

View file

@ -49,7 +49,7 @@ void func_80095AB4(PlayState* play, Room* room, u32 flags) {
if (flags & 2) {
func_8003435C(&D_801270A0, play);
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
}
@ -110,7 +110,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
if (flags & 2) {
func_8003435C(&D_801270A0, play);
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
}
@ -330,7 +330,7 @@ void func_80096680(PlayState* play, Room* room, u32 flags) {
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
if (drawOpa) {
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa);
}
@ -355,7 +355,7 @@ void func_80096680(PlayState* play, Room* room, u32 flags) {
if (drawXlu) {
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu);
}
@ -423,7 +423,7 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) {
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
if (drawOpa) {
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa);
}
@ -449,7 +449,7 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) {
if (drawXlu) {
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu);
}

View file

@ -29,7 +29,7 @@ void Sample_Draw(SampleContext* this) {
}
POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 255, 255, 0, 0, 0);
func_80093D18(gfxCtx);
Gfx_SetupDL_25Opa(gfxCtx);
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);

View file

@ -14,7 +14,7 @@ Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) {
void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y, f32 z) {
OPEN_DISPS(gfxCtx, "../z_vr_box_draw.c", 52);
func_800945A0(gfxCtx);
Gfx_SetupDL_40Opa(gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x7, skyboxCtx->staticSegments[0]);
gSPSegment(POLY_OPA_DISP++, 0x8, skyboxCtx->staticSegments[1]);