1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 07:20:16 +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

@ -75,34 +75,33 @@ void DemoGeff_Init(Actor* thisx, GlobalContext* globalCtx) {
void func_80977EA8(GlobalContext* globalCtx, Gfx* dlist) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 181);
OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 181);
func_80093D18(gfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183),
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183),
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, dlist);
gSPPopMatrix(gfxCtx->polyOpa.p++, G_MTX_MODELVIEW);
gSPDisplayList(oGfxCtx->polyOpa.p++, dlist);
gSPPopMatrix(oGfxCtx->polyOpa.p++, G_MTX_MODELVIEW);
Graph_CloseDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 188);
CLOSE_DISPS(gfxCtx, "../z_demo_geff.c", 188);
}
void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) {
s32 pad[2];
s32 objBankIndex = this->objBankIndex;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 204);
OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 204);
gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment);
gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment);
// Necessary to match
if (!globalCtx) {}
Graph_CloseDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 212);
CLOSE_DISPS(gfxCtx, "../z_demo_geff.c", 212);
}
void func_80978030(DemoGeff* this, GlobalContext* globalCtx) {