diff options
| author | rozlette <uberpanzermensch@gmail.com> | 2020-01-08 08:32:20 -0600 |
|---|---|---|
| committer | rozlette <uberpanzermensch@gmail.com> | 2020-01-08 08:32:20 -0600 |
| commit | 727a546fcf1894061f3ec4295fa7c80083768aba (patch) | |
| tree | 2f9a74eb06a754a8d0266900d8cb7f47867d16cc /src/code | |
| parent | 8d8df1848ea442c05d480e04f76e15bdb02ae23f (diff) | |
Update to latest ghidra project
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/code_0x800A5AC0.c | 6 | ||||
| -rw-r--r-- | src/code/code_0x800CAAD0.c | 10 | ||||
| -rw-r--r-- | src/code/code_0x800E8EA0.c | 18 | ||||
| -rw-r--r-- | src/code/z_actor.c | 40 | ||||
| -rw-r--r-- | src/code/z_lib.c | 2 | ||||
| -rw-r--r-- | src/code/z_room.c | 2 |
6 files changed, 39 insertions, 39 deletions
diff --git a/src/code/code_0x800A5AC0.c b/src/code/code_0x800A5AC0.c index 801763c66..d6f9a4d46 100644 --- a/src/code/code_0x800A5AC0.c +++ b/src/code/code_0x800A5AC0.c @@ -8,7 +8,7 @@ void EnAObj_Init(ActorEnAObj* this, GlobalContext* ctxt) { s0->base.textId = ((s0->base.variable >> 8) & 0xFF) | 0x300; s0->base.variable = (s0->base.variable & 0xFF) - 9; Lib_ApplyActorInitVars((Actor*)s0, (ActorInitVar*)&enAObjInitVar); - Actor_SetPostDrawParams(&s0->base.postDrawParams, 0, (actor_post_draw_func*)func_800B3FC0, 12); + Actor_SetDrawParams(&s0->base.drawParams, 0, (actor_post_draw_func*)func_800B3FC0, 12); Collision_InitCylinder(ctxt, &s0->collision, (Actor*)s0, &enAObjCylinderInit); Collision_CylinderMoveToActor((Actor*)s0, &s0->collision); s0->base.unkA0.unk16 = 255; @@ -26,7 +26,7 @@ void EnAObj_Update1(ActorEnAObj* this, GlobalContext* ctxt) { if (func_800B84D0((Actor*)this, ctxt) != 0) { this->update = (actor_func)EnAObj_Update2; } else { - v0 = this->base.unk92 - this->base.postDrawParams.rotation.y; + v0 = this->base.yawToLink - this->base.drawParams.rot.y; v1 = (v0 < 0)? -v0 : v0; if ((v1 < 10240) || ((this->base.variable == 1) && (v1 > 22528))) { func_800B863C((Actor*)this, ctxt); @@ -42,7 +42,7 @@ void EnAObj_Update2(ActorEnAObj* this, GlobalContext* ctxt) { void EnAObj_Main(ActorEnAObj* this, GlobalContext* ctxt) { (this->update)((Actor*)this, (GlobalContext*)ctxt); - func_800B675C((Actor*)this, 45.0f); + Actor_SetHeight((Actor*)this, 45.0f); Collision_AddOT(ctxt, &ctxt->collisionContext, (ColCommon*)&this->collision); } diff --git a/src/code/code_0x800CAAD0.c b/src/code/code_0x800CAAD0.c index 544792c37..65db86620 100644 --- a/src/code/code_0x800CAAD0.c +++ b/src/code/code_0x800CAAD0.c @@ -25,7 +25,7 @@ void BgCheck2_UpdateActorPosition(BgCheckContext* bgCtxt, s32 index, Actor* acto bgCtxt->dyna.actorMeshes[index].prevParams.pos.y, bgCtxt->dyna.actorMeshes[index].prevParams.pos.z); - if (invert_matrix(&prevMatrix, &prevMatrixInv) == 2) return; + if (Matrix_Invert(&prevMatrix, &prevMatrixInv) == 2) return; Matrix_MakeTranslationRotationYXZScale(&currMatrix, bgCtxt->dyna.actorMeshes[index].currParams.scale.x, @@ -38,10 +38,10 @@ void BgCheck2_UpdateActorPosition(BgCheckContext* bgCtxt, s32 index, Actor* acto bgCtxt->dyna.actorMeshes[index].currParams.pos.y, bgCtxt->dyna.actorMeshes[index].currParams.pos.z); - Matrix_MultiplyByVectorXYZ(&prevMatrixInv, &actor->unk24.pos, &posWithInv); + Matrix_MultiplyByVectorXYZ(&prevMatrixInv, &actor->currPosRot.pos, &posWithInv); Matrix_MultiplyByVectorXYZ(&currMatrix, &posWithInv, &newPos); - actor->unk24.pos = newPos; + actor->currPosRot.pos = newPos; } void BgCheck2_UpdateActorYRotation(BgCheckContext* bgCtxt, s32 index, Actor* actor) { @@ -55,8 +55,8 @@ void BgCheck2_UpdateActorYRotation(BgCheckContext* bgCtxt, s32 index, Actor* act ((ActorPlayer*)actor)->unkAD4 += angleChange; } - actor->postDrawParams.rotation.y += angleChange; - actor->unk24.rot.y += angleChange; + actor->drawParams.rot.y += angleChange; + actor->currPosRot.rot.y += angleChange; } void BgCheck2_AttachToMesh(BgCheckContext* bgCtxt, Actor* actor, s32 index) { diff --git a/src/code/code_0x800E8EA0.c b/src/code/code_0x800E8EA0.c index 74ebbcb70..5beb6f8dc 100644 --- a/src/code/code_0x800E8EA0.c +++ b/src/code/code_0x800E8EA0.c @@ -31,8 +31,8 @@ s32 func_800E8FA4(Actor* actor, Vector3f* param_2, Vector3s* param_3, Vector3s* s16 targetYaw; s16 yawDiffFromTarget; - targetPitch = Lib_PitchVec3f(&actor->unk3C.pos,param_2); - targetYaw = Lib_YawVec3f(&actor->unk3C.pos,param_2) - actor->unk24.rot.y; + targetPitch = Lib_PitchVec3f(&actor->topPosRot.pos,param_2); + targetYaw = Lib_YawVec3f(&actor->topPosRot.pos,param_2) - actor->currPosRot.rot.y; Lib_ScaleMaxMin_s(¶m_3->x, targetPitch, 6, 2000, 1); param_3->x = (param_3->x < -6000)? -6000 : ((6000 < param_3->x)? 6000 : param_3->x); @@ -58,11 +58,11 @@ s32 func_800E9138(GlobalContext* ctxt, Actor* actor, Vector3s* param_3, Vector3s Vector3f local_14; player = (ctxt->actorContext).actorTypeLists[2].head; - actor->unk3C.pos = actor->unk24.pos; - actor->unk3C.pos.y += param_5; + actor->topPosRot.pos = actor->currPosRot.pos; + actor->topPosRot.pos.y += param_5; if (((ctxt->cutsceneContext).state == 0) && (D_801D0D50 == 0)) { - sVar3 = actor->unk92 - actor->postDrawParams.rotation.y; + sVar3 = actor->yawToLink - actor->drawParams.rot.y; // TODO is this shifting because of a missing cast? if (0x42ff < (sVar3 < 0? ((-sVar3 << 0x10) >> 0x10) : ((sVar3 << 0x10) >> 0x10))) { func_800E8F08(param_3,param_4); @@ -73,7 +73,7 @@ s32 func_800E9138(GlobalContext* ctxt, Actor* actor, Vector3s* param_3, Vector3s if (((ctxt->cutsceneContext).state != 0) || (D_801D0D50 != 0)) { local_14 = ctxt->view.eye; } else { - local_14 = player->unk3C.pos; + local_14 = player->topPosRot.pos; } func_800E8FA4(actor,&local_14,param_3,param_4); @@ -86,10 +86,10 @@ s32 func_800E9250(GlobalContext* ctxt, Actor* actor, Vector3s* param_3, Vector3s Vector3f local_14; player = (ctxt->actorContext).actorTypeLists[2].head; - actor->unk3C.pos = param_5; + actor->topPosRot.pos = param_5; if (((ctxt->cutsceneContext).state == 0) && (D_801D0D50 == 0)) { - sVar3 = actor->unk92 - actor->postDrawParams.rotation.y; + sVar3 = actor->yawToLink - actor->drawParams.rot.y; // TODO is this shifting because of a missing cast? if (0x42ff < (sVar3 < 0? ((-sVar3 << 0x10) >> 0x10) : ((sVar3 << 0x10) >> 0x10))) { func_800E8F08(param_3,param_4); @@ -100,7 +100,7 @@ s32 func_800E9250(GlobalContext* ctxt, Actor* actor, Vector3s* param_3, Vector3s if (((ctxt->cutsceneContext).state != 0) || (D_801D0D50 != 0)) { local_14 = ctxt->view.eye; } else { - local_14 = player->unk3C.pos; + local_14 = player->topPosRot.pos; } func_800E8FA4(actor,&local_14,param_3,param_4); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index b83d3afa7..6a8bdfa10 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3,7 +3,7 @@ GLOBAL_ASM("asm/nonmatching/z_actor//Actor_PrintLists.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SetPostDrawParams.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SetDrawParams.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_PostDraw.asm") @@ -99,13 +99,13 @@ GLOBAL_ASM("asm/nonmatching/z_actor//func_800B6680.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_MarkForDeath.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B672C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_InitCurrPosition.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B675C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SetHeight.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B67A0.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SetRotationFromDrawRotation.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B67C0.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_InitDrawRotation.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SetScale.asm") @@ -137,13 +137,13 @@ GLOBAL_ASM("asm/nonmatching/z_actor//func_800B6C58.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_YawBetweenActors.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B6D00.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_YawBetweenActorsTop.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_YawToPoint.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_PitchBetweenActors.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B6D7C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_PitchBetweenActorsTop.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_PitchToPoint.asm") @@ -155,7 +155,7 @@ GLOBAL_ASM("asm/nonmatching/z_actor//Actor_XZDistanceBetweenActors.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_XZDistanceToPoint.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B6E6C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_CalcOffsetOrientedToDrawRotation.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_YDistance.asm") @@ -187,17 +187,17 @@ GLOBAL_ASM("asm/nonmatching/z_actor//func_800B72E0.asm") GLOBAL_ASM("asm/nonmatching/z_actor//func_800B72F8.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B7320.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_IsLinkFacingActor.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B7378.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_IsActorFacedByActor.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B73E0.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_IsActorFacingLink.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B742C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_IsActorFacingActor.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B748C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_IsActorFacingLinkAndWithinRange.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B750C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_IsActorFacingActorAndWithinRange.asm") GLOBAL_ASM("asm/nonmatching/z_actor//func_800B75A0.asm") @@ -327,9 +327,9 @@ GLOBAL_ASM("asm/nonmatching/z_actor//Actor_Init.asm") GLOBAL_ASM("asm/nonmatching/z_actor//func_800B9334.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B948C.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_UpdateActor.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//func_800B9780.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_UpdateAll.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_DrawActor.asm") @@ -337,7 +337,7 @@ GLOBAL_ASM("asm/nonmatching/z_actor//func_800B9D1C.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_DrawAllSetup.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//Actor_RecordDrawnActor.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_RecordUndrawnActor.asm") GLOBAL_ASM("asm/nonmatching/z_actor//func_800B9E84.asm") @@ -363,13 +363,13 @@ GLOBAL_ASM("asm/nonmatching/z_actor//Actor_RemoveFromTypeList.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_FreeOverlay.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SpawnNoParentDefaultUnk38Unk20.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_Spawn.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_LoadOverlay.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//Actor_Spawn.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SpawnWithParentAndCutscene.asm") -GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SpawnDefaultUnk38.asm") +GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SpawnWithParent.asm") GLOBAL_ASM("asm/nonmatching/z_actor//Actor_SpawnTransitionActors.asm") diff --git a/src/code/z_lib.c b/src/code/z_lib.c index 95902f6eb..5e64d2c8b 100644 --- a/src/code/z_lib.c +++ b/src/code/z_lib.c @@ -75,7 +75,7 @@ s32 Lib_StepTowardsCheckFramerateScaled_s(s16* start, s16 target, s16 step) { f32 f0; if (step != 0) { - f0 = D_801D1508; + f0 = gFramerateDivisorHalf; if ((s16)(*start - target) > 0) { step = -step; diff --git a/src/code/z_room.c b/src/code/z_room.c index 6eeb2cd49..b22c2af37 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -57,7 +57,7 @@ void Room_DrawType1Mesh(GlobalContext* ctxt, Room* room, u32 flags) { } else if (mesh->format == 2) { func_8012E32C(ctxt,room,flags); } else { - func_80086280(D_801DDFAC,0x3c5); + assert_fail(D_801DDFAC,0x3c5); } } |
