summaryrefslogtreecommitdiff
path: root/src/00_Core/Actor
diff options
context:
space:
mode:
authorAetias <144526980+AetiasHax@users.noreply.github.com>2025-05-26 21:35:20 +0200
committerGitHub <noreply@github.com>2025-05-26 21:35:20 +0200
commit59a5cc5da29bd84680ceeaf2c2eeabe9effb6b6d (patch)
tree3b4316c804d44cd46bf12d27f3c76d89abe2c97d /src/00_Core/Actor
parent3f6a81d03dec2bd7c8394b508dbe4f017a5244b9 (diff)
parent8f6142e4fdd1195541e3f1ecc08ddf961f3b046c (diff)
Merge pull request #71 from AetiasHax/decomp-PlayerControl
Decomp `src/00_Core/Player/PlayerControl.cpp` (99%)
Diffstat (limited to 'src/00_Core/Actor')
-rw-r--r--src/00_Core/Actor/Actor.cpp17
-rw-r--r--src/00_Core/Actor/ActorManager.cpp5
2 files changed, 6 insertions, 16 deletions
diff --git a/src/00_Core/Actor/Actor.cpp b/src/00_Core/Actor/Actor.cpp
index 74f0da25..db721414 100644
--- a/src/00_Core/Actor/Actor.cpp
+++ b/src/00_Core/Actor/Actor.cpp
@@ -5,6 +5,8 @@ extern "C" {
#include "Actor/Actor.hpp"
#include "Actor/ActorManager.hpp"
#include "Actor/ActorPlayerDummy.hpp"
+#include "DTCM/UnkStruct_027e077c.hpp"
+#include "DTCM/UnkStruct_027e103c.hpp"
#include "Item/ItemManager.hpp"
#include "Map/MapManager.hpp"
#include "Player/EquipSword.hpp"
@@ -255,20 +257,9 @@ ARM bool Actor::func_ov00_020c195c() {
return true;
}
-struct UnkStruct2 {
- /* 0 */ u32 mUnk_0;
- /* 4 */ u32 mUnk_4;
- /* 8 */
-};
-extern UnkStruct2 data_027e077c;
-extern u8 data_02056be4[];
-extern "C" bool func_ov05_02103f4c(s32 param1);
-extern s32 data_027e103c;
ARM bool Actor::func_ov00_020c198c() {
- u32 unk1 = data_027e077c.mUnk_0;
- u32 unk2 = data_027e077c.mUnk_4;
- if (data_027e077c.mUnk_0 != data_027e077c.mUnk_4 || (data_02056be4[unk1] & 1) != 0 || (data_02056be4[unk2] & 4) != 0 ||
- func_ov05_02103f4c(data_027e103c) || gPlayer->mHealth <= 0)
+ if (data_027e077c.GetUnk0() != data_027e077c.GetUnk4() || (data_02056be4[data_027e077c.GetUnk0()] & 1) != 0 ||
+ (data_02056be4[data_027e077c.GetUnk4()] & 4) != 0 || data_027e103c->func_ov005_02103f4c() || gPlayer->mHealth <= 0)
{
return false;
}
diff --git a/src/00_Core/Actor/ActorManager.cpp b/src/00_Core/Actor/ActorManager.cpp
index 73ab6bbb..fed1075e 100644
--- a/src/00_Core/Actor/ActorManager.cpp
+++ b/src/00_Core/Actor/ActorManager.cpp
@@ -1,4 +1,5 @@
#include "Actor/ActorManager.hpp"
+#include "DTCM/UnkStruct_027e077c.hpp"
#include "DTCM/UnkStruct_027e103c.hpp"
#include "Map/MapManager.hpp"
@@ -8,8 +9,6 @@ extern "C" Cylinder *func_ov000_020c3ef0(void *, u32 index);
extern "C" bool func_ov000_020c3f08(void *, u32 index);
extern "C" void func_ov000_020c3f3c(void *, u32 index, Cylinder *cylinder);
extern "C" void func_ov000_020c3f54(void *, u32 param2);
-extern s32 data_027e077c;
-extern u8 data_02056be4[];
ARM void ActorManager::DeleteActor(u32 index, bool param2) {
if (!param2) {
@@ -52,7 +51,7 @@ ARM void ActorManager::func_ov00_020c3484(ActorRef *ref, ActorManager *actorMgr,
q20 minDistance = 0x7fffffff;
Actor **actorIter = actorMgr->mActorTable;
- u8 unkByte = data_02056be4[data_027e077c];
+ u8 unkByte = data_02056be4[data_027e077c.GetUnk0()];
bool unk1 = (unkByte & 1) != 0;
Actor **actorTableEnd = actorIter + actorMgr->mMaxActorIndex;