mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-25 15:25:04 -04:00
ab8d34b8dc
* Bring over progress from another branch
Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
* cleanup, fake match Play_Init
* small fixes
* Some small cleanup
* Match func_80165460 (from debug)
* Match func_80165658
* Match func_80165DB8, func_80165DCC, func_80165DF0, func_80165E04
* Match func_80167DE4 (from debug)
* Match func_80167F0C
* Match func_80168DAC
* Matched func_80169100
* Matched func_801691F0
* import D_801DFA18
* match Play_Main thanks to debug
* cleanup
* synray does it again
* add docs from debug
* fix func_801656A4
* more docs and cleanup
* Match func_80166B30 and diff fake match in Init
* import transition docs from OoT
* Play Update, sort of
* cleanup Play_Update
* more cleanup
* slightly more docs
* small docs
* Play_Draw WIP Thanks @petrie911
* progress?
* two more matches
* format
* misc play docs
* transitions cleanup
* Motion Blur
* Transitions
* Fog
* Bombers notebook + small cleanup
* bss
* Camera Functions
* Picto functions
* Init
* MotionBlur Clean up
* Floor Surface
* Pictographs some more
* regs
* fix circular dependency problem
* Cleanup PR commits outside play
* namefixer
* PR picto
* PR audio
* PR small clean ups
* debug strings
* Picto defines
* bss
* enums
* remove void
* typedefs
* Hireso -> BombersNotebook
* bss comments
* bss and I8/I5 functions
* Smaller PR comments
* Transitions
* Combine enums
* Revert "Combine enums"
This reverts commit 0da1ebcaed.
* Fix Transition defines
* RGBA16 macros
* Unname
* worldCoverAlpha
* Rename Update and Draw
* PR review, plus annotate bug
* Clean up nonmatchings with a closer DrawGame
* Format
* New macros
* UpdateMain and DrawMain
* Fix merge
* Small cleanups from PR
* zFar
* Intensity macros
* Format
* Remove bss comments
* Compression/decompression
* Small cleanup
* Format
* More PR cleanup
* Cleanup picto stuff
* format
* Fix compression comments
* Play processes state enums DONE -> READY
* cutscene comment
* fix bss
Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: angie <angheloalf95@gmail.com>
112 lines
2.7 KiB
C
112 lines
2.7 KiB
C
#include "global.h"
|
|
|
|
void func_800AE2A0(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|
f32 cos;
|
|
Gfx* displayListHead;
|
|
f32 absCos;
|
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
|
|
|
displayListHead = POLY_OPA_DISP;
|
|
cos = Math_CosS((0x8000 / arg3) * arg2);
|
|
absCos = fabsf(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;
|
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
|
}
|
|
|
|
void func_800AE434(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|
Gfx* displayListHead;
|
|
f32 cos;
|
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
|
|
|
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 * fabsf(cos)) + 1700);
|
|
|
|
POLY_OPA_DISP = displayListHead;
|
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
|
}
|
|
|
|
void func_800AE5A0(PlayState* play) {
|
|
s32 pad;
|
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
|
}
|
|
|
|
void func_800AE5E4(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|
f32 cos;
|
|
Gfx* displayListHead;
|
|
f32 absCos;
|
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
|
|
|
displayListHead = POLY_XLU_DISP;
|
|
cos = Math_CosS((0x8000 / arg3) * arg2);
|
|
absCos = fabsf(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;
|
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
|
}
|
|
|
|
void func_800AE778(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|
f32 cos;
|
|
Gfx* displayListHead;
|
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
|
|
|
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 * fabsf(cos)) + 1700);
|
|
|
|
POLY_XLU_DISP = displayListHead;
|
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
|
}
|
|
|
|
void func_800AE8EC(PlayState* play) {
|
|
s32 pad;
|
|
|
|
OPEN_DISPS(play->state.gfxCtx);
|
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP);
|
|
|
|
CLOSE_DISPS(play->state.gfxCtx);
|
|
}
|