1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-02 15:55:59 +00:00
oot/src/code/z_eff_ss_dead.c
petrie911 e51f50f0ff
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>
2021-09-20 12:51:35 -04:00

121 lines
3.4 KiB
C

#include "global.h"
void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
f32 cos;
Gfx* displayListHead;
f32 absCos;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 113);
displayListHead = POLY_OPA_DISP;
cos = Math_CosS((0x8000 / arg3) * arg2);
absCos = ABS(cos);
gDPPipeSync(displayListHead++);
if (color == NULL) {
gDPSetFogColor(displayListHead++, 255, 0, 0, 0);
} else {
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
}
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
POLY_OPA_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 129);
}
void func_80026400(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
Gfx* displayListHead;
f32 cos;
if (arg3 != 0) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 141);
cos = Math_CosS((0x4000 / arg3) * arg2);
displayListHead = POLY_OPA_DISP;
gDPPipeSync(displayListHead++);
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700);
POLY_OPA_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 153);
}
}
void func_80026608(GlobalContext* globalCtx) {
s32 pad;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 159);
gDPPipeSync(POLY_OPA_DISP++);
POLY_OPA_DISP = Gameplay_SetFog(globalCtx, POLY_OPA_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 164);
}
void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
f32 cos;
Gfx* displayListHead;
f32 absCos;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 178);
displayListHead = POLY_XLU_DISP;
cos = Math_CosS((0x8000 / arg3) * arg2);
absCos = ABS(cos);
gDPPipeSync(displayListHead++);
if (color == NULL) {
gDPSetFogColor(displayListHead++, 255, 0, 0, 0);
} else {
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
}
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
POLY_XLU_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 194);
}
void func_80026860(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
f32 cos;
Gfx* displayListHead;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 201);
displayListHead = POLY_XLU_DISP;
cos = Math_CosS((0x4000 / arg3) * arg2);
gDPPipeSync(displayListHead++);
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700);
POLY_XLU_DISP = displayListHead;
if (1) {} // Necessary to match
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 212);
}
void func_80026A6C(GlobalContext* globalCtx) {
s32 pad;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 217);
gDPPipeSync(POLY_XLU_DISP++);
POLY_XLU_DISP = Gameplay_SetFog(globalCtx, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 222);
}