mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +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
|
@ -524,12 +524,10 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGs* this = THIS;
|
||||
s32 tmp;
|
||||
u32 frames;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
if (!(this->unk_19E & 8)) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_gs.c", 1046);
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_gs.c", 1046);
|
||||
|
||||
frames = globalCtx->gameplayFrames;
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
Matrix_Push();
|
||||
|
@ -543,19 +541,19 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_RotateZ(this->unk_1A0[1].z * 0.0000958738f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064),
|
||||
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06000950);
|
||||
gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000950);
|
||||
|
||||
if (this->unk_19E & 4) {
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b,
|
||||
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b,
|
||||
this->flashColor.a);
|
||||
} else {
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255);
|
||||
}
|
||||
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_060009D0);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06000A60);
|
||||
gSPDisplayList(oGfxCtx->polyOpa.p++, D_060009D0);
|
||||
gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000A60);
|
||||
|
||||
Matrix_Pull();
|
||||
if (this->unk_19E & 2) {
|
||||
|
@ -563,15 +561,16 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_800D1FD4(&globalCtx->mf_11DA0);
|
||||
Matrix_Scale(0.05f, -0.05f, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087),
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(
|
||||
gfxCtx->polyXlu.p++, 0x08,
|
||||
oGfxCtx->polyXlu.p++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, 0x20, 0x80));
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 128, 128, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 0);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0404D4E0);
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 128, 128, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0);
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0);
|
||||
}
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_gs.c", 1101);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_gs.c", 1101);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue