mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50:15 +00:00
Introduce OPEN_DISPS/CLOSE_DISPS macros (#360)
This commit is contained in:
parent
1f1b5e39f5
commit
2a2fdf7f3e
134 changed files with 3133 additions and 3775 deletions
|
@ -553,22 +553,18 @@ void EnWallmas_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
char pad[8];
|
||||
MtxF mf;
|
||||
GraphicsContext* gfxCtx;
|
||||
s32 pad;
|
||||
f32 xzScale;
|
||||
Gfx* dispRefs[3];
|
||||
MtxF mf;
|
||||
|
||||
if ((this->actor.floorPoly == NULL) || ((this->timer >= 0x51) && (this->actionFunc != EnWallmas_Stun))) {
|
||||
return;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1386);
|
||||
// clang-format on
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1386);
|
||||
|
||||
func_80094044(globalCtx->state.gfxCtx);
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255);
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255);
|
||||
|
||||
func_80038A28(this->actor.floorPoly, this->actor.posRot.pos.x, this->actor.groundY, this->actor.posRot.pos.z, &mf);
|
||||
Matrix_Mult(&mf, MTXMODE_NEW);
|
||||
|
@ -581,9 +577,10 @@ void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
Matrix_Scale(xzScale, 1.0f, xzScale, MTXMODE_APPLY);
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, &D_04049210);
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426);
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD);
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04049210);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426);
|
||||
}
|
||||
|
||||
s32 EnWallMas_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
|
@ -602,24 +599,21 @@ s32 EnWallMas_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL
|
|||
}
|
||||
|
||||
void EnWallMas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
if (limbIndex == 2) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1478);
|
||||
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1478);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(1600.0f, -700.0f, -1700.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(DEGREE_60_RAD, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(DEGREE_15_RAD, MTXMODE_APPLY);
|
||||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06008688);
|
||||
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD);
|
||||
gSPDisplayList(oGfxCtx->polyOpa.p++, D_06008688);
|
||||
|
||||
Matrix_Pull();
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue