diff options
| author | Random <28494085+Random06457@users.noreply.github.com> | 2020-05-09 22:58:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-09 16:58:02 -0400 |
| commit | 40836f5d82b8ee65c30ce93f8ea8eb7eba3d4904 (patch) | |
| tree | 113cced716e786ac88279c2684ed5e44a49226a2 /src/code | |
| parent | 4c68c61df5064950c33e3d490c43e913bd37df8f (diff) | |
Decompile z_oceff_wipe (#122)
* Decompile z_oceff_wipe
- z_oceff_wipe: OK
- z_oceff_wipe2: OK
- z_oceff_wipe3: OK
- z_oceff_wipe4: OK
- Add patched libmalloc to ido 7 to prevent segfaults
- Add CUR_CAM macro
* Rename CUR_CAM to ACTIVE_CAM
* Fixes in PR #122
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_demo.c | 2 | ||||
| -rw-r--r-- | src/code/z_play.c | 10 | ||||
| -rw-r--r-- | src/code/z_room.c | 6 | ||||
| -rw-r--r-- | src/code/z_scene_table.c | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 4a5c48306..d95b56c2f 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -265,7 +265,7 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* break; case 16: if (sp3F != 0) { - D_8015FCCA = Quake_Add(globalCtx->cameraPtrs[globalCtx->activeCamera], 6); + D_8015FCCA = Quake_Add(ACTIVE_CAM, 6); Quake_SetSpeed(D_8015FCCA, 0x7FFF); Quake_SetQuakeValues(D_8015FCCA, 4, 0, 1000, 0); Quake_SetCountdown(D_8015FCCA, 800); diff --git a/src/code/z_play.c b/src/code/z_play.c index 1e20e00cb..21fd82f92 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -15,7 +15,7 @@ s16 D_801614C8; u64 D_801614D0[0xA00]; void func_800BC450(GlobalContext* globalCtx) { - func_8005A7A8(globalCtx->cameraPtrs[globalCtx->activeCamera], globalCtx->unk_1242B - 1); + func_8005A7A8(ACTIVE_CAM, globalCtx->unk_1242B - 1); } void func_800BC490(GlobalContext* globalCtx, s16 point) { @@ -1238,9 +1238,9 @@ void Gameplay_Draw(GlobalContext* globalCtx) { if ((HREG(80) != 10) || (HREG(83) != 0)) { if (globalCtx->skyboxCtx.unk_140 != 0) { - if (globalCtx->cameraPtrs[globalCtx->activeCamera]->unk_142 != 0x19) { + if (ACTIVE_CAM->unk_142 != 0x19) { Vec3f sp74; - func_8005AFB4(&sp74, globalCtx->cameraPtrs[globalCtx->activeCamera]); + func_8005AFB4(&sp74, ACTIVE_CAM); func_800B10C4(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y, globalCtx->view.eye.z + sp74.z); @@ -1322,7 +1322,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { if (globalCtx->view.unk_124 != 0) { Vec3s sp50; - func_800591EC(&sp50, globalCtx->cameraPtrs[globalCtx->activeCamera]); + func_800591EC(&sp50, ACTIVE_CAM); func_800AB944(&globalCtx->view); globalCtx->view.unk_124 = 0; if ((globalCtx->skyboxId != 0) && (globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) { @@ -1330,7 +1330,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } } - func_80059EC8(globalCtx->cameraPtrs[globalCtx->activeCamera]); + func_80059EC8(ACTIVE_CAM); Graph_CloseDisps(dispRefs, gfxCtx, "../z_play.c", 4508); } diff --git a/src/code/z_room.c b/src/code/z_room.c index 9fcd433f8..439775e30 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -343,7 +343,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) { gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 628); - camera = globalCtx->cameraPtrs[globalCtx->activeCamera]; + camera = ACTIVE_CAM; polygon1 = &room->mesh->polygon1; sp9C = (camera->unk_142 ^ 25) == 0; polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist); @@ -405,7 +405,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) { BgImage* bgImage; s32 i; - camera = globalCtx->cameraPtrs[globalCtx->activeCamera]; + camera = ACTIVE_CAM; camId = camera->unk_148; camId2 = func_80041C10(&globalCtx->colCtx, camId, 50)->unk_0E; if (camId2 >= 0) { @@ -449,7 +449,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) { gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 752); - camera = globalCtx->cameraPtrs[globalCtx->activeCamera]; + camera = ACTIVE_CAM; sp98 = (camera->unk_142 ^ 25) == 0; polygon1 = &room->mesh->polygon1; polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist); diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index d0e1d8875..f97e900e7 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -1499,14 +1499,14 @@ void func_8009BEEC(GlobalContext* globalCtx) { s32 var; if (globalCtx->gameplayFrames % 128 == 13) { - var = Quake_Add(globalCtx->cameraPtrs[globalCtx->activeCamera], 2); + var = Quake_Add(ACTIVE_CAM, 2); Quake_SetSpeed(var, 10000); Quake_SetQuakeValues(var, 4, 0, 0, 0); Quake_SetCountdown(var, 127); } if ((globalCtx->gameplayFrames % 64 == 0) && (Math_Rand_ZeroOne() > 0.6f)) { - var = Quake_Add(globalCtx->cameraPtrs[globalCtx->activeCamera], 3); + var = Quake_Add(ACTIVE_CAM, 3); Quake_SetSpeed(var, 32000.0f + (Math_Rand_ZeroOne() * 3000.0f)); Quake_SetQuakeValues(var, 10.0f - (Math_Rand_ZeroOne() * 9.0f), 0, 0, 0); Quake_SetCountdown(var, 48.0f - (Math_Rand_ZeroOne() * 15.0f)); |
