1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-16 21:05:12 +00:00

Use macros for oGfxCtx accesses (#465)

* fix colliderinit typo

* fix initchain

* reloc

* add defines

* add defines

* missed some on merge

* rename gfxCtx and add comment

* remove space
This commit is contained in:
fig02 2020-10-29 17:31:09 -04:00 committed by GitHub
parent 92bb1fb210
commit 3c5fe66dcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
195 changed files with 2236 additions and 2229 deletions

View file

@ -22,19 +22,19 @@ void func_8002B200(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gfx*
if (temp1 >= -50.0f && temp1 < 500.0f) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1553);
oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
gDPSetCombineLERP(oGfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0,
gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0,
0, 0, COMBINED);
temp1 = (temp1 < 0.0f) ? 0.0f : ((temp1 > 150.0f) ? 150.0f : temp1);
temp2 = 1.0f - (temp1 * (1.f / 350));
if (color != NULL) {
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, color->r, color->g, color->b,
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, color->r, color->g, color->b,
(u32)(actor->shape.unk_14 * temp2) & 0xFF);
} else {
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, (u32)(actor->shape.unk_14 * temp2) & 0xFF);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u32)(actor->shape.unk_14 * temp2) & 0xFF);
}
func_80038A28(actor->floorPoly, actor->posRot.pos.x, actor->groundY, actor->posRot.pos.z, &sp60);
@ -47,9 +47,9 @@ void func_8002B200(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gfx*
temp2 = (1.0f - (temp1 * (1.f / 350))) * actor->shape.unk_10;
Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyOpa.p++, dlist);
gSPDisplayList(POLY_OPA_DISP++, dlist);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1594);
}
@ -77,7 +77,7 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3,
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1661);
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0,
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0,
(u32)(((arg3 * 0.00005f) > 1.0f ? 1.0f : (arg3 * 0.00005f)) * arg4) & 0xFF);
sp58 = Math_atan2f(light->l.dir[0], light->l.dir[2]);
@ -87,9 +87,9 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3,
Matrix_RotateY(sp58, MTXMODE_APPLY);
Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04048180);
gSPDisplayList(POLY_OPA_DISP++, &D_04048180);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1693);
}
@ -137,7 +137,7 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext*
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1741);
oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
actor->shape.unk_15 = 0;
for (i = 0; i < 2; i++) {
@ -359,7 +359,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) {
oGfxCtx->overlay.p = Gfx_CallSetupDL(oGfxCtx->overlay.p, 0x39);
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39);
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
entry = &targetCtx->arr_50[spAC];
@ -374,7 +374,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
Matrix_Translate(entry->pos.x, entry->pos.y, 0.0f, MTXMODE_NEW);
Matrix_Scale(var2, 0.15f, 1.0f, MTXMODE_APPLY);
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, entry->color.r, entry->color.g, entry->color.b,
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, entry->color.r, entry->color.g, entry->color.b,
(u8)spCE);
Matrix_RotateZ((targetCtx->unk_4B & 0x7F) * (M_PI / 64), MTXMODE_APPLY);
@ -383,9 +383,9 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
Matrix_Push();
Matrix_Translate(entry->unk_0C, entry->unk_0C, 0.0f, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116),
gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->overlay.p++, D_0404D450);
gSPDisplayList(OVERLAY_DISP++, D_0404D450);
Matrix_Pull();
}
}
@ -402,17 +402,17 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
if ((actor != NULL) && !(actor->flags & 0x8000000)) {
NaviColor* naviColor = &sNaviColorList[actor->type];
oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x7);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7);
Matrix_Translate(actor->posRot2.pos.x, actor->posRot2.pos.y + (actor->unk_4C * actor->scale.y) + 17.0f,
actor->posRot2.pos.z, MTXMODE_NEW);
Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY);
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153),
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0400CB70);
gSPDisplayList(POLY_XLU_DISP++, &D_0400CB70);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2158);
@ -732,26 +732,26 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
if (1) {} // Necessary to match
oGfxCtx->overlay.p = func_80093808(oGfxCtx->overlay.p);
OVERLAY_DISP = func_80093808(OVERLAY_DISP);
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E,
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E,
(u8)titleCtx->unk_C);
gDPLoadTextureBlock(oGfxCtx->overlay.p++, titleCtx->texture + spB0, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 0,
gDPLoadTextureBlock(OVERLAY_DISP++, titleCtx->texture + spB0, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
gSPTextureRectangle(oGfxCtx->overlay.p++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (spC8 * 4) - 1,
gSPTextureRectangle(OVERLAY_DISP++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (spC8 * 4) - 1,
G_TX_RENDERTILE, 0, 0, 1024, 1024);
spC8 = titleCtx->unk_9 - spC8;
if (spC8 > 0) {
gDPLoadTextureBlock(oGfxCtx->overlay.p++, titleCtx->texture + spB0 + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, spCC,
gDPLoadTextureBlock(OVERLAY_DISP++, titleCtx->texture + spB0 + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, spCC,
spC8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(oGfxCtx->overlay.p++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1,
gSPTextureRectangle(OVERLAY_DISP++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1,
G_TX_RENDERTILE, 0, 0, 1024, 1024);
}
@ -1307,7 +1307,7 @@ Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContex
OPEN_DISPS(gfxCtx, "../z_actor.c", 4306);
oGfxCtx->polyOpa.p = func_8002E830(object, eye, lightDir, gfxCtx, oGfxCtx->polyOpa.p, &hilite);
POLY_OPA_DISP = func_8002E830(object, eye, lightDir, gfxCtx, POLY_OPA_DISP, &hilite);
CLOSE_DISPS(gfxCtx, "../z_actor.c", 4313);
@ -1319,7 +1319,7 @@ Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContex
OPEN_DISPS(gfxCtx, "../z_actor.c", 4332);
oGfxCtx->polyXlu.p = func_8002E830(object, eye, lightDir, gfxCtx, oGfxCtx->polyXlu.p, &hilite);
POLY_XLU_DISP = func_8002E830(object, eye, lightDir, gfxCtx, POLY_XLU_DISP, &hilite);
CLOSE_DISPS(gfxCtx, "../z_actor.c", 4339);
@ -1351,7 +1351,7 @@ void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag) {
gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10);
gSPEndDisplayList(displayListHead);
gSPSegment(oGfxCtx->polyOpa.p++, 0x07, displayList);
gSPSegment(POLY_OPA_DISP++, 0x07, displayList);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4394);
}
@ -1377,7 +1377,7 @@ void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag) {
gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10);
gSPEndDisplayList(displayListHead);
gSPSegment(oGfxCtx->polyXlu.p++, 0x07, displayList);
gSPSegment(POLY_XLU_DISP++, 0x07, displayList);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4439);
}
@ -1892,7 +1892,7 @@ void func_8002FBAC(GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state == 0) &&
(gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) &&
(globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) {
oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x19);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19);
Matrix_Translate(gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x,
gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + spD8,
@ -1901,24 +1901,24 @@ void func_8002FBAC(GlobalContext* globalCtx) {
Matrix_Mult(&globalCtx->mf_11D60, MTXMODE_APPLY);
Matrix_Push();
gDPPipeSync(oGfxCtx->polyXlu.p++);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, spD0);
gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 200, 0, 255);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 200, spD0);
gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 255);
phi_f10 = (globalCtx->gameplayFrames * 1500) & 0xFFFF;
Matrix_RotateZ((phi_f10 * M_PI) / 32768.0f, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458),
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04010130);
gSPDisplayList(POLY_XLU_DISP++, &D_04010130);
Matrix_Pull();
phi_f6 = ~((globalCtx->gameplayFrames * 1200) & 0xFFFF);
Matrix_RotateZ((phi_f6 * M_PI) / 32768.0f, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463),
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04010130);
gSPDisplayList(POLY_XLU_DISP++, &D_04010130);
}
lightPos.x = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x;
@ -2179,8 +2179,8 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) {
Matrix_Scale(actor->scale.x, actor->scale.y, actor->scale.z, MTXMODE_APPLY);
Actor_SetObjectDependency(globalCtx, actor);
gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment);
gSPSegment(oGfxCtx->polyXlu.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment);
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment);
gSPSegment(POLY_XLU_DISP++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment);
if (actor->dmgEffectTimer != 0) {
Color_RGBA8 sp2C = { 0, 0, 0, 255 };
@ -2236,12 +2236,12 @@ void func_80030ED8(Actor* actor) {
void func_80030FA8(GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_actor.c", 6161);
gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, &D_0401E370, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP,
gDPLoadTextureBlock(POLY_XLU_DISP++, &D_0401E370, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP,
G_TX_MIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
gDPSetTileSize(oGfxCtx->polyXlu.p++, G_TX_RENDERTILE, 384, 224, 892, 732);
gSPTextureRectangle(oGfxCtx->polyXlu.p++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597);
gDPPipeSync(oGfxCtx->polyXlu.p++);
gDPSetTileSize(POLY_XLU_DISP++, G_TX_RENDERTILE, 384, 224, 892, 732);
gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597);
gDPPipeSync(POLY_XLU_DISP++);
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183);
}
@ -2256,67 +2256,67 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi
OPEN_DISPS(gfxCtx, "../z_actor.c", 6197);
// Translates to: "MAGIC LENS START"
gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ START", 0);
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ START", 0);
gDPPipeSync(oGfxCtx->polyXlu.p++);
gDPPipeSync(POLY_XLU_DISP++);
if (globalCtx->roomCtx.curRoom.showInvisActors == 0) {
gDPSetOtherMode(oGfxCtx->polyXlu.p++,
gDPSetOtherMode(POLY_XLU_DISP++,
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | G_RM_CLD_SURF | G_RM_CLD_SURF2);
gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255);
gDPSetCombineMode(POLY_XLU_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 0, 0, 255);
} else {
gDPSetOtherMode(oGfxCtx->polyXlu.p++,
gDPSetOtherMode(POLY_XLU_DISP++,
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
GBL_c1(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA) |
GBL_c2(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA));
gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC,
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC,
0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0xFF, 74, 74, 74, 74);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0xFF, 74, 74, 74, 74);
}
gDPSetPrimDepth(oGfxCtx->polyXlu.p++, 0, 0);
gDPSetPrimDepth(POLY_XLU_DISP++, 0, 0);
func_80030FA8(gfxCtx);
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY START"
gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないc表示 START", nbInvisibleActors);
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 START", nbInvisibleActors);
invisibleActor = &invisibleActors[0];
for (i = 0; i < nbInvisibleActors; i++) {
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY"
gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないc表示", i);
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示", i);
Actor_Draw(globalCtx, *(invisibleActor++));
}
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY END"
gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないc表示 END", nbInvisibleActors);
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 END", nbInvisibleActors);
if (globalCtx->roomCtx.curRoom.showInvisActors != 0) {
// Translates to: "BLUE SPECTACLES (EXTERIOR)"
gDPNoOpString(oGfxCtx->polyOpa.p++, "青い眼鏡(外側)", 0);
gDPNoOpString(POLY_OPA_DISP++, "青い眼鏡(外側)", 0);
gDPPipeSync(oGfxCtx->polyXlu.p++);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetOtherMode(oGfxCtx->polyXlu.p++,
gDPSetOtherMode(POLY_XLU_DISP++,
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
G_AC_THRESHOLD | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2);
gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255);
gDPSetCombineMode(POLY_XLU_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 0, 0, 255);
func_80030FA8(gfxCtx);
// Translates to: "BLUE SPECTACLES (EXTERIOR)"
gDPNoOpString(oGfxCtx->polyOpa.p++, "青い眼鏡(外側)", 1);
gDPNoOpString(POLY_OPA_DISP++, "青い眼鏡(外側)", 1);
}
// Translates to: "MAGIC LENS END"
gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ END", 0);
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ END", 0);
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6284);
}
@ -2361,8 +2361,8 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
ActorOverlay* overlayEntry = actor->overlayEntry;
char* actorName = overlayEntry->name != NULL ? overlayEntry->name : "";
gDPNoOpString(oGfxCtx->polyOpa.p++, actorName, i);
gDPNoOpString(oGfxCtx->polyXlu.p++, actorName, i);
gDPNoOpString(POLY_OPA_DISP++, actorName, i);
gDPNoOpString(POLY_XLU_DISP++, actorName, i);
HREG(66) = i;
@ -3426,9 +3426,9 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
if (0) {} // Necessary to match
oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, alpha);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
sp50.x = arg0->x;
sp50.y = arg0->y + 1.0f;
@ -3445,9 +3445,9 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04049210);
gSPDisplayList(POLY_OPA_DISP++, &D_04049210);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8155);
}
@ -3529,9 +3529,9 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) {
Matrix_Scale(entry->unk_0C, entry->unk_0C, entry->unk_0C, MTXMODE_APPLY);
}
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyOpa.p++, entry->unk_14);
gSPDisplayList(POLY_OPA_DISP++, entry->unk_14);
if (i % 2) {
temp3 = entry->unk_00 + entry->unk_00;
@ -3545,9 +3545,9 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) {
Matrix_Put(&spB0);
Matrix_Scale(arg1 * 0.1f, arg1 * 0.1f, arg1 * 0.1f, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(oGfxCtx->polyOpa.p++, entry->unk_18);
gSPDisplayList(POLY_OPA_DISP++, entry->unk_18);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8319);
}
@ -3801,14 +3801,14 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbD
func_80093D18(globalCtx->state.gfxCtx);
gDPPipeSync(oGfxCtx->polyOpa.p++);
gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, alpha);
gDPPipeSync(oGfxCtx->polyOpa.p++);
gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx));
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha);
gDPPipeSync(POLY_OPA_DISP++);
gSPSegment(POLY_OPA_DISP++, 0x0C, func_80034B28(globalCtx->state.gfxCtx));
oGfxCtx->polyOpa.p =
POLY_OPA_DISP =
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
overrideLimbDraw, postLimbDraw, actor, oGfxCtx->polyOpa.p);
overrideLimbDraw, postLimbDraw, actor, POLY_OPA_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8860);
}
@ -3819,13 +3819,13 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbD
func_80093D84(globalCtx->state.gfxCtx);
gDPPipeSync(oGfxCtx->polyXlu.p++);
gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, alpha);
gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx));
gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, func_80034B54(globalCtx->state.gfxCtx));
oGfxCtx->polyXlu.p =
POLY_XLU_DISP =
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
overrideLimbDraw, postLimbDraw, actor, oGfxCtx->polyXlu.p);
overrideLimbDraw, postLimbDraw, actor, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8904);
}