diff options
| author | petrie911 <69443847+petrie911@users.noreply.github.com> | 2021-09-20 11:51:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-20 12:51:35 -0400 |
| commit | e51f50f0ff9d79cd4c19fb6519183fd00445719c (patch) | |
| tree | 2151497dd9464253f6f12f069256790e7eb5c37a /src/code/z_rcp.c | |
| parent | 50095d427c21465b7560d7178906a3dee3eea090 (diff) | |
Decompile z_kankyo (#956)
* working
* start color switch
* progress
* progress
* progress on bgm func
* progress
* game over matched (except the rodata meme)
* start update
* progress
* lightning docs done
* progress
* progress
* progress
* progress
* progress
* can compile at least
* suns state, progress on kankyo_update
* some new names
* progress
* progress
* progress
* new functions
* cleanup
* more matches
* another match
* now functional
* format
* better match
* hugely improved update
* cleanup/review
* remove old changes
* review2
* review3
* missed one
* review4
* change asm filenames
* update doorwarp1
* review5
* Kankyo_ -> Environment_
* format
* merge master and format functions.h
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Diffstat (limited to 'src/code/z_rcp.c')
| -rw-r--r-- | src/code/z_rcp.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index d0709b44f..c2410f563 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -847,51 +847,52 @@ Gfx gEmptyDL[] = { gsSPEndDisplayList(), }; -Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) { - if (f == n) { - f++; +Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far) { + if (far == near) { + far++; } - ASSERT(n != f, "n != f", "../z_rcp.c", 1155); + + ASSERT(near != far, "n != f", "../z_rcp.c", 1155); gDPSetFogColor(gfx++, r, g, b, a); - if (n >= 1000) { + if (near >= 1000) { gSPFogFactor(gfx++, 0, 0); - } else if (n >= 997) { + } else if (near >= 997) { gSPFogFactor(gfx++, 0x7FFF, 0x8100); - } else if (n < 0) { + } else if (near < 0) { gSPFogFactor(gfx++, 0, 255); } else { - gSPFogPosition(gfx++, n, f); + gSPFogPosition(gfx++, near, far); } return gfx; } -Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) { - if (f == n) { - f++; +Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far) { + if (far == near) { + far++; } - ASSERT(n != f, "n != f", "../z_rcp.c", 1187); + ASSERT(near != far, "n != f", "../z_rcp.c", 1187); gDPPipeSync(gfx++); gDPSetFogColor(gfx++, r, g, b, a); - if (n >= 1000) { + if (near >= 1000) { gSPFogFactor(gfx++, 0, 0); - } else if (n >= 997) { + } else if (near >= 997) { gSPFogFactor(gfx++, 0x7FFF, 0x8100); - } else if (n < 0) { + } else if (near < 0) { gSPFogFactor(gfx++, 0, 255); } else { - gSPFogPosition(gfx++, n, f); + gSPFogPosition(gfx++, near, far); } return gfx; } -Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) { - return Gfx_SetFog(gfx, r, g, b, a, n, f); +Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far) { + return Gfx_SetFog(gfx, r, g, b, a, near, far); } Gfx* Gfx_CallSetupDLImpl(Gfx* gfx, u32 i) { |
