mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +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:
parent
92bb1fb210
commit
3c5fe66dcd
195 changed files with 2236 additions and 2229 deletions
|
@ -98,33 +98,33 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
|||
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPPipeSync(oGfxCtx->polyXlu.p++);
|
||||
gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
|
||||
oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0);
|
||||
gDPPipeSync(oGfxCtx->polyXlu.p++);
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
||||
if (this->rDrawFlags & 1) {
|
||||
gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0,
|
||||
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0,
|
||||
0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2);
|
||||
gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
} else if (this->rDrawFlags & 2) {
|
||||
gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
} else {
|
||||
gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_LIGHTING);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_LIGHTING);
|
||||
}
|
||||
|
||||
gDPPipeSync(oGfxCtx->polyXlu.p++);
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255);
|
||||
gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
|
||||
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_ss_dust.c", 389);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue