mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 12:24:39 +00:00
Decompile most effect files in "code" (#144)
- `z_effect`: Matched and essentially all documented. - `z_eff_spark.c`: Decompiled (1 non matching left) and mostly documented. - `z_eff_shield_particle.c`: Matched and mostly documented. - `z_eff_blure.c`: Decompiled (5 non matchings left) and partially documented. - `z_effect_soft_sprite.c`: Matched and mostly documented. - `z_eff_ss_dead.c`: Matched but not documented. - `z_effect_soft_sprite_dlftbls.c`: "Matched" (only data, contains the effect ss overlay table). - `z_effect_soft_sprite_old_init.c`: Not decompiled, but functions are categorized by effect ss overlay. And they should be decompiled at the same time as their corresponding effect ss in the future. Other changes: - Added a lot of types/enums to `z64effect.h`and moved+renamed some structs from `z64.h` to this header - Added effect ss overlay segments to `segment_symbols.h` and effect ss init vars to `initvars.h` - Added a macro called `VTX_T` to generate a `Vtx_t` in the same style as `VTX` - Fixed `flg_set.c` .bss to be in the right file - Removed `tools/overlayhelpers/batchdisasm` since it's no longer relevant - Removed unused leftover asm from recent PRs
This commit is contained in:
parent
785011c33c
commit
e29b77919b
227 changed files with 3739 additions and 8132 deletions
|
@ -1,14 +1,140 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_80026230.s")
|
||||
void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||
f32 cos;
|
||||
Gfx* displayListHead;
|
||||
f32 absCos;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_80026400.s")
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 113);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_80026608.s")
|
||||
displayListHead = gfxCtx->polyOpa.p;
|
||||
cos = Math_Coss((0x8000 / arg3) * arg2);
|
||||
absCos = ABS(cos);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_80026690.s")
|
||||
gDPPipeSync(displayListHead++);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_80026860.s")
|
||||
if (color == NULL) {
|
||||
gDPSetFogColor(displayListHead++, 0xFF, 0x00, 0x00, 0x00);
|
||||
} else {
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_80026A6C.s")
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
|
||||
|
||||
gfxCtx->polyOpa.p = displayListHead;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
Graph_CloseDisps(dispRefs, 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;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
if (arg3 != 0) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 141);
|
||||
|
||||
cos = Math_Coss((0x4000 / arg3) * arg2);
|
||||
displayListHead = gfxCtx->polyOpa.p;
|
||||
|
||||
gDPPipeSync(displayListHead++);
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700);
|
||||
|
||||
gfxCtx->polyOpa.p = displayListHead;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 153);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80026608(GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 159);
|
||||
|
||||
gDPPipeSync(gfxCtx->polyOpa.p++);
|
||||
gfxCtx->polyOpa.p = func_800BC8A0(globalCtx, gfxCtx->polyOpa.p);
|
||||
|
||||
Graph_CloseDisps(dispRefs, 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;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 178);
|
||||
|
||||
displayListHead = gfxCtx->polyXlu.p;
|
||||
cos = Math_Coss((0x8000 / arg3) * arg2);
|
||||
absCos = ABS(cos);
|
||||
|
||||
gDPPipeSync(displayListHead++);
|
||||
|
||||
if (color == NULL) {
|
||||
gDPSetFogColor(displayListHead++, 0xFF, 0x00, 0x00, 0x00);
|
||||
} else {
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
}
|
||||
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
|
||||
|
||||
gfxCtx->polyXlu.p = displayListHead;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
Graph_CloseDisps(dispRefs, 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;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 201);
|
||||
|
||||
displayListHead = gfxCtx->polyXlu.p;
|
||||
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);
|
||||
|
||||
gfxCtx->polyXlu.p = displayListHead;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 212);
|
||||
}
|
||||
|
||||
void func_80026A6C(GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 217);
|
||||
|
||||
gDPPipeSync(gfxCtx->polyXlu.p++);
|
||||
gfxCtx->polyXlu.p = func_800BC8A0(globalCtx, gfxCtx->polyXlu.p);
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 222);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue