mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 14:20:11 +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
|
@ -216,18 +216,18 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
// Draw yellow effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p);
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF,
|
||||
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF,
|
||||
(s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE);
|
||||
gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE);
|
||||
gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw light on the arrow
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
||||
gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 0, 128);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
|
||||
Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -236,13 +236,13 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_light.c", 648),
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_light.c", 648),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL);
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++,
|
||||
gSPDisplayList(POLY_XLU_DISP++, sTextureDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1,
|
||||
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sVertexDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 664);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue