1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 08:50:23 +00:00

Introduce OPEN_DISPS/CLOSE_DISPS macros (#360)

This commit is contained in:
Roman971 2020-08-30 01:00:17 +02:00 committed by GitHub
parent 1f1b5e39f5
commit 2a2fdf7f3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
134 changed files with 3133 additions and 3775 deletions

View file

@ -59,18 +59,14 @@ void OceffWipe2_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
u32 scroll;
OceffWipe2* this;
u32 scroll = globalCtx->state.frames & 0xFF;
OceffWipe2* this = THIS;
f32 z;
GraphicsContext* gfxCtx;
u8 alpha;
u32 pad1;
s32 pad[2];
Vec3f eye;
Vtx* vtxPtr;
Vec3f vec;
Gfx* dispRefs[5];
this = THIS;
scroll = globalCtx->state.frames & 0xFF;
eye = ACTIVE_CAM->eye;
func_8005AFB4(&vec, ACTIVE_CAM);
@ -91,8 +87,7 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
vtxPtr[11].v.cn[3] = vtxPtr[13].v.cn[3] = vtxPtr[15].v.cn[3] = vtxPtr[16].v.cn[3] = vtxPtr[18].v.cn[3] =
vtxPtr[20].v.cn[3] = alpha;
gfxCtx = globalCtx->state.gfxCtx;
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 390);
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 390);
func_80093D84(globalCtx->state.gfxCtx);
@ -101,15 +96,15 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800D1FD4(&globalCtx->mf_11DA0);
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400),
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255);
gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 100, 0, 128);
gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL);
gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64,
1, scroll * (-6), 0, 64, 64));
gSPDisplayList(gfxCtx->polyXlu.p++, sFrustrumDl);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255);
gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 100, 0, 128);
gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL);
gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64,
1, scroll * (-6), 0, 64, 64));
gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl);
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 417);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 417);
}