mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 23:10:22 +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
|
@ -40,8 +40,8 @@ static InitChainEntry initChain[] = {
|
|||
ICHAIN_VEC3S(shape.rot, 0, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Vec3f mtxSrc1 = { -960.0f, 0.0f, 0.0f };
|
||||
static Vec3f mtxSrc2 = { 960.0f, 0.0f, 0.0f };
|
||||
static Vec3f mult1 = { -960.0f, 0.0f, 0.0f };
|
||||
static Vec3f mult2 = { 960.0f, 0.0f, 0.0f };
|
||||
|
||||
extern D_0400C808;
|
||||
|
||||
|
@ -51,37 +51,37 @@ void EnBoom_SetupAction(EnBoom* this, EnBoomActionFunc actionFunc) {
|
|||
|
||||
void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBoom* this = THIS;
|
||||
TrailEffect trail;
|
||||
EffectBlureInit1 trail;
|
||||
|
||||
this->actor.room = -1;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, initChain);
|
||||
|
||||
trail.p1Start.r = 0xFF;
|
||||
trail.p1Start.g = 0xFF;
|
||||
trail.p1Start.b = 0x64;
|
||||
trail.p1Start.a = 0xFF;
|
||||
trail.p1StartColor.r = 0xFF;
|
||||
trail.p1StartColor.g = 0xFF;
|
||||
trail.p1StartColor.b = 0x64;
|
||||
trail.p1StartColor.a = 0xFF;
|
||||
|
||||
trail.p2Start.r = 0xFF;
|
||||
trail.p2Start.g = 0xFF;
|
||||
trail.p2Start.b = 0x64;
|
||||
trail.p2Start.a = 0x40;
|
||||
trail.p2StartColor.r = 0xFF;
|
||||
trail.p2StartColor.g = 0xFF;
|
||||
trail.p2StartColor.b = 0x64;
|
||||
trail.p2StartColor.a = 0x40;
|
||||
|
||||
trail.p1End.r = 0xFF;
|
||||
trail.p1End.g = 0xFF;
|
||||
trail.p1End.b = 0x64;
|
||||
trail.p1End.a = 0x00;
|
||||
trail.p1EndColor.r = 0xFF;
|
||||
trail.p1EndColor.g = 0xFF;
|
||||
trail.p1EndColor.b = 0x64;
|
||||
trail.p1EndColor.a = 0x00;
|
||||
|
||||
trail.p2End.r = 0xFF;
|
||||
trail.p2End.g = 0xFF;
|
||||
trail.p2End.b = 0x64;
|
||||
trail.p2End.a = 0x00;
|
||||
trail.p2EndColor.r = 0xFF;
|
||||
trail.p2EndColor.g = 0xFF;
|
||||
trail.p2EndColor.b = 0x64;
|
||||
trail.p2EndColor.a = 0x00;
|
||||
|
||||
trail.unk_194 = 0x00000008;
|
||||
trail.unk_198 = 0x00000000;
|
||||
trail.unk_19C = 0x00000000;
|
||||
trail.elemDuration = 8;
|
||||
trail.unkFlag = 0;
|
||||
trail.calcMode = 0;
|
||||
|
||||
Effect_Add(globalCtx, &this->effect, 1, 0, 0, &trail);
|
||||
Effect_Add(globalCtx, &this->effectIndex, EFFECT_BLURE1, 0, 0, &trail);
|
||||
|
||||
Collider_InitQuad(globalCtx, &this->collider);
|
||||
Collider_SetQuad(globalCtx, &this->collider, this, &col);
|
||||
|
@ -92,7 +92,7 @@ void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void EnBoom_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBoom* this = THIS;
|
||||
|
||||
func_8002709C(globalCtx, this->effect);
|
||||
Effect_Delete(globalCtx, this->effectIndex);
|
||||
Collider_DestroyQuad(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
@ -241,8 +241,8 @@ void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBoom* this = THIS;
|
||||
Vec3f mtxDest1;
|
||||
Vec3f mtxDest2;
|
||||
Vec3f vec1;
|
||||
Vec3f vec2;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
|
@ -251,11 +251,11 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_RotateY(this->actor.posRot.rot.y * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(0.7669904f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->actor.posRot.rot.x * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&mtxSrc1, &mtxDest1);
|
||||
Matrix_MultVec3f(&mtxSrc2, &mtxDest2);
|
||||
Matrix_MultVec3f(&mult1, &vec1);
|
||||
Matrix_MultVec3f(&mult2, &vec2);
|
||||
|
||||
if (func_80090480(globalCtx, &this->collider, &this->unk_1DC, &mtxDest1, &mtxDest2) != 0) {
|
||||
func_8001FDF0(func_80026B0C(this->effect), &mtxDest1, &mtxDest2);
|
||||
if (func_80090480(globalCtx, &this->collider, &this->unk_1DC, &vec1, &vec2) != 0) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->effectIndex), &vec1, &vec2);
|
||||
}
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
|
|
@ -15,7 +15,7 @@ typedef struct EnBoom {
|
|||
/* 0x01D0 */ Actor* grabbed; // actor grabbed by the boomerang
|
||||
/* 0x01D4 */ u8 returnTimer; // returns to Link when 0
|
||||
/* 0x01D5 */ u8 activeTimer; // increments once every update
|
||||
/* 0x01D8 */ u32 effect; // set by Effect_Add
|
||||
/* 0x01D8 */ u32 effectIndex; // set by Effect_Add
|
||||
/* 0x01DC */ u32 unk_1DC[0x7];
|
||||
/* 0x01F8 */ EnBoomActionFunc actionFunc;
|
||||
} EnBoom; // size = 0x01FC
|
||||
|
|
|
@ -110,8 +110,8 @@ void EnTuboTrap_SpawnFragments(EnTuboTrap* this, GlobalContext* globalCtx) {
|
|||
temp = 32;
|
||||
}
|
||||
|
||||
Effect_SpawnFragment(globalCtx, &spC8, &spBC, actorPos, -240, temp, 10, 10, 0,
|
||||
(Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 60, -1, 3, addr);
|
||||
func_80029E8C(globalCtx, &spC8, &spBC, actorPos, -240, temp, 10, 10, 0, (Math_Rand_ZeroOne() * 65.0f) + 15.0f,
|
||||
0, 32, 60, -1, 3, addr);
|
||||
}
|
||||
|
||||
func_80033480(globalCtx, actorPos, 30.0f, 4, 20, 50, 0);
|
||||
|
@ -164,8 +164,8 @@ void EnTuboTrap_SpawnWaterFragments(EnTuboTrap* this, GlobalContext* globalCtx)
|
|||
temp = 32;
|
||||
}
|
||||
|
||||
Effect_SpawnFragment(globalCtx, &spC8, &spBC, actorPos, -180, temp, 30, 30, 0,
|
||||
(Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 70, -1, 3, addr);
|
||||
func_80029E8C(globalCtx, &spC8, &spBC, actorPos, -180, temp, 30, 30, 0, (Math_Rand_ZeroOne() * 65.0f) + 15.0f,
|
||||
0, 32, 70, -1, 3, addr);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -103,8 +103,8 @@ void ObjBombiwa_Break(ObjBombiwa* this, GlobalContext* globalCtx) {
|
|||
temp_s3.z = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
|
||||
scale = effectScales[i];
|
||||
u0 = (scale >= 11) ? 37 : 33;
|
||||
Effect_SpawnFragment(globalCtx, &temp_s2, &temp_s3, &temp_s2, -400, u0, 10, 2, 0, scale, 1, 0, 80, -1,
|
||||
OBJECT_BOMBIWA, dlist);
|
||||
func_80029E8C(globalCtx, &temp_s2, &temp_s3, &temp_s2, -400, u0, 10, 2, 0, scale, 1, 0, 80, -1, OBJECT_BOMBIWA,
|
||||
dlist);
|
||||
}
|
||||
func_80033480(globalCtx, &this->actor.posRot.pos, 60.0f, 8, 100, 160, 1);
|
||||
}
|
||||
|
|
|
@ -103,8 +103,8 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
u0 = 32;
|
||||
}
|
||||
Effect_SpawnFragment(globalCtx, &posSum, &pos2, &posSum, gravityInfluence, u0, rotSpeed, 4, 0, scale, 0, 0, 80,
|
||||
-1, 2, dlist);
|
||||
func_80029E8C(globalCtx, &posSum, &pos2, &posSum, gravityInfluence, u0, rotSpeed, 4, 0, scale, 0, 0, 80, -1, 2,
|
||||
dlist);
|
||||
}
|
||||
|
||||
posSum.x = this->actor.posRot.pos.x;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue