2022-03-21 21:51:23 -04:00
|
|
|
#include "global.h"
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
void func_80026230(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
2022-03-21 21:51:23 -04:00
|
|
|
f32 cos;
|
|
|
|
Gfx* displayListHead;
|
|
|
|
f32 absCos;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
}
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
2022-03-21 21:51:23 -04:00
|
|
|
Gfx* displayListHead;
|
|
|
|
f32 cos;
|
|
|
|
|
|
|
|
if (arg3 != 0) {
|
2022-11-06 03:24:34 -05:00
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
void func_80026608(PlayState* play) {
|
2022-03-21 21:51:23 -04:00
|
|
|
s32 pad;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
2022-11-06 03:24:34 -05:00
|
|
|
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
}
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
void func_80026690(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
2022-03-21 21:51:23 -04:00
|
|
|
f32 cos;
|
|
|
|
Gfx* displayListHead;
|
|
|
|
f32 absCos;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
}
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
void func_80026860(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
2022-03-21 21:51:23 -04:00
|
|
|
f32 cos;
|
|
|
|
Gfx* displayListHead;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
}
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
void func_80026A6C(PlayState* play) {
|
2022-03-21 21:51:23 -04:00
|
|
|
s32 pad;
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
2022-11-06 03:24:34 -05:00
|
|
|
POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
}
|