mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 07:24:34 +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
|
@ -154,37 +154,36 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||
EffectShieldParticleElement* elem;
|
||||
Color_RGBA8_n primColor;
|
||||
Color_RGBA8_n envColor;
|
||||
Gfx* dispRefs[5];
|
||||
Mtx* mtx;
|
||||
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_shield_particle.c", 272);
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_shield_particle.c", 272);
|
||||
|
||||
if (this != NULL) {
|
||||
gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x26);
|
||||
oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26);
|
||||
|
||||
gDPSetCycleType(gfxCtx->polyXlu.p++, G_CYC_2CYCLE);
|
||||
gDPPipeSync(gfxCtx->polyXlu.p++);
|
||||
gSPTexture(gfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE);
|
||||
gDPPipeSync(oGfxCtx->polyXlu.p++);
|
||||
gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
gDPLoadTextureBlock(gfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
|
||||
gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
gDPSetCombineLERP(gfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0,
|
||||
gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0,
|
||||
0, 0, COMBINED, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(gfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
gSPClearGeometryMode(gfxCtx->polyXlu.p++,
|
||||
gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
gSPClearGeometryMode(oGfxCtx->polyXlu.p++,
|
||||
G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
||||
gSPSetGeometryMode(gfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH);
|
||||
gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH);
|
||||
|
||||
EffectShieldParticle_GetColors(this, &primColor, &envColor);
|
||||
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, envColor.r, envColor.g, envColor.b, envColor.a);
|
||||
gDPPipeSync(gfxCtx->polyXlu.p++);
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a);
|
||||
gDPSetEnvColor(oGfxCtx->polyXlu.p++, envColor.r, envColor.g, envColor.b, envColor.a);
|
||||
gDPPipeSync(oGfxCtx->polyXlu.p++);
|
||||
|
||||
for (elem = &this->elements[0]; elem < &this->elements[this->numElements]; elem++) {
|
||||
Mtx* mtx;
|
||||
MtxF sp104;
|
||||
MtxF spC4;
|
||||
MtxF sp84;
|
||||
|
@ -215,11 +214,11 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(gfxCtx->polyXlu.p++, sVertices, 4, 0);
|
||||
gSP2Triangles(gfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 3, 1, 0);
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(oGfxCtx->polyXlu.p++, sVertices, 4, 0);
|
||||
gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 3, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_shield_particle.c", 359);
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_shield_particle.c", 359);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue