mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 17:00:19 +00:00
Fix various small gfx issues (#1313)
* Fix various small gfx issues * Use 0xFFFF instead of -1 for max prim depth * More fixed point numbers * scale -> texCoordScale, better cycle 2 render mode in z_title * GFXP_CHAR_* defines renamed to SPACING * Fix some gDPLoadMultiBlock uses
This commit is contained in:
parent
afbc312024
commit
455321d2e8
111 changed files with 695 additions and 604 deletions
|
@ -90,9 +90,9 @@ void EffectSsEnFire_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, redGreen * 12.7f, 0, 0, 0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x0, 0x80, redGreen * 12.7f, redGreen * 12.7f, 0, 255);
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->rScroll * -0x14) & 0x1FF, 0x20, 0x80));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0,
|
||||
(this->rScroll * -0x14) & 0x1FF, 0x20, 0x80));
|
||||
|
||||
if (((this->rFlags & 0x7FFF) != 0) || (this->life < 18)) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL);
|
||||
|
|
|
@ -123,7 +123,7 @@ void EffectSsEnIce_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
func_8002EB44(&this->pos, &play->view.eye, &hiliteLightDir, play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames & 0xFF, 0x20, 0x10, 1, 0,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames & 0xFF, 0x20, 0x10, 1, 0,
|
||||
(gameplayFrames * 2) & 0xFF, 0x40, 0x20));
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
|
||||
this->rPrimColorA);
|
||||
|
|
|
@ -62,7 +62,7 @@ void EffectSsFcircle_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 128, 0, 32, 64, 1, 0,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->gameplayFrames % 128, 0, 32, 64, 1, 0,
|
||||
((play->gameplayFrames) * -0xF) % 256, 32, 64));
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, (this->life * 12.75f));
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
|
|
|
@ -124,9 +124,9 @@ void EffectSsFireTail_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0);
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->state.frames * -0x14) & 0x1FF, 32, 128));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0,
|
||||
(play->state.frames * -0x14) & 0x1FF, 32, 128));
|
||||
|
||||
if (this->rType != 0) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL);
|
||||
|
|
|
@ -71,8 +71,8 @@ void EffectSsIcePiece_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, (s32)alpha & 0xFF);
|
||||
func_8003435C(&this->pos, play);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0, (2 * frames) % 256,
|
||||
0x40, 0x20));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0,
|
||||
(2 * frames) % 256, 0x40, 0x20));
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment1DL);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_ice_piece.c", 209);
|
||||
|
|
|
@ -72,7 +72,8 @@ void EffectSsIceSmoke_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 235, 235, this->rAlpha);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->life * 3, this->life * 15, 32, 64, 1, 0, 0, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->life * 3, this->life * 15, 32, 64, 1, 0,
|
||||
0, 32, 32));
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
scale = this->rScale * 0.0001f;
|
||||
|
|
|
@ -55,8 +55,8 @@ void EffectSsKFire_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
Matrix_Scale(xzScale, yScale, xzScale, MTXMODE_APPLY);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, play->state.frames * this->rScroll, 0x20,
|
||||
0x80));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0,
|
||||
play->state.frames * this->rScroll, 0x20, 0x80));
|
||||
|
||||
if (this->rType >= 100) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, this->rAlpha);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue