1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +00:00

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
This commit is contained in:
Random 2020-05-09 22:58:02 +02:00 committed by GitHub
parent 4c68c61df5
commit 40836f5d82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 978 additions and 1670 deletions

View file

@ -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);

View file

@ -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);
}

View file

@ -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);

View file

@ -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));