diff options
| author | Roman971 <32455037+Roman971@users.noreply.github.com> | 2020-05-18 20:24:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-18 14:24:00 -0400 |
| commit | e29b77919bd98375e31760ed082cf014c58dbef8 (patch) | |
| tree | e0e7c454be393eaba1b1bb52036191d41fa98af2 /src/code/z_actor.c | |
| parent | 785011c33c2a95222dd88a57f43808bcdc1cff91 (diff) | |
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
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 97cd22c7c..5ac02fefc 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1795,7 +1795,7 @@ void func_8002FA60(GlobalContext* globalCtx) { Lights_InitType0PositionalLight(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, -1); - D_8015BC10 = Lights_Insert(globalCtx, &globalCtx->lightCtx, (LightInfo*)&D_8015BC00); + D_8015BC10 = Lights_Insert(globalCtx, &globalCtx->lightCtx, &D_8015BC00); D_8015BC14 = 0; D_8015BC18 = 0.0f; } @@ -2038,7 +2038,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) { if (0) { // This assert is optimized out but it exists due to its presence in rodata - if (gMaxProfile != ACTOR_DLF_MAX) { + if (gMaxActorId != ACTOR_ID_MAX) { __assert("MaxProfile == ACTOR_DLF_MAX", "../z_actor.c", UNK_LINE); } } @@ -2459,11 +2459,11 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { } if ((HREG(64) != 1) || (HREG(73) != 0)) { - func_80026E74(globalCtx->state.gfxCtx); + Effect_DrawAll(globalCtx->state.gfxCtx); } if ((HREG(64) != 1) || (HREG(74) != 0)) { - func_80027BDC(globalCtx); + EffectSs_DrawAll(globalCtx); } if ((HREG(64) != 1) || (HREG(72) != 0)) { @@ -2683,7 +2683,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId overlayEntry = &gActorOverlayTable[actorId]; - if (actorId >= ACTOR_DLF_MAX) { + if (actorId >= ACTOR_ID_MAX) { __assert("profile < ACTOR_DLF_MAX", "../z_actor.c", 6883); } @@ -3134,7 +3134,7 @@ void func_80032E24(struct_80032E24* arg0, s32 arg1, GlobalContext* globalCtx) { } void func_80032F54(struct_80032E24* arg0, s32 arg1, s32 arg2, s32 arg3, u32 arg4, s32* arg5, s16 arg6) { - GlobalContext* globalCtx = func_80026B00(); + GlobalContext* globalCtx = Effect_GetGlobalCtx(); if ((globalCtx->actorCtx.unk_00 == 0) && (arg0->unk_10 > 0)) { if ((arg1 >= arg2) && (arg3 >= arg1) && (*arg5 != 0)) { |
