summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-11-17 00:54:46 +0100
committerGitHub <noreply@github.com>2020-11-17 00:54:46 +0100
commit4d4edbfe87e77c4e712e7fef7ed8087fff18220e (patch)
tree05b09142b74869f74779a00deff410019b8dcaac /src/KingSystem/ActorSystem
parentb0498a15bf6f1782f1429ffbd0b03c187f61d7c9 (diff)
parentd4f80d7cf97641742dd56cabc0b1d503cfdf7b0d (diff)
Merge pull request #15 from notyourav/placement
implement map::Object getters
Diffstat (limited to 'src/KingSystem/ActorSystem')
-rw-r--r--src/KingSystem/ActorSystem/CMakeLists.txt2
-rw-r--r--src/KingSystem/ActorSystem/actBaseProc.h2
-rw-r--r--src/KingSystem/ActorSystem/actBaseProcMgr.h2
-rw-r--r--src/KingSystem/ActorSystem/actDebug.cpp12
-rw-r--r--src/KingSystem/ActorSystem/actDebug.h24
5 files changed, 42 insertions, 0 deletions
diff --git a/src/KingSystem/ActorSystem/CMakeLists.txt b/src/KingSystem/ActorSystem/CMakeLists.txt
index e5c354bb..05aff8cd 100644
--- a/src/KingSystem/ActorSystem/CMakeLists.txt
+++ b/src/KingSystem/ActorSystem/CMakeLists.txt
@@ -40,6 +40,8 @@ target_sources(uking PRIVATE
actBaseProcMgr.h
actBaseProcUnit.cpp
actBaseProcUnit.h
+ actDebug.cpp
+ actDebug.h
actInfoData.cpp
actInfoData.h
actInstParamPack.cpp
diff --git a/src/KingSystem/ActorSystem/actBaseProc.h b/src/KingSystem/ActorSystem/actBaseProc.h
index c7636998..de5a1a86 100644
--- a/src/KingSystem/ActorSystem/actBaseProc.h
+++ b/src/KingSystem/ActorSystem/actBaseProc.h
@@ -87,6 +87,8 @@ public:
void setPriority(u8 priority) { mPriority = priority; }
State getState() const { return mState; }
+ bool isInit() const { return mState == State::Init; }
+ bool isCalc() const { return mState == State::Calc; }
bool isDeletedOrDeleting() const {
return mState == State::Delete || mStateFlags.isOn(StateFlags::RequestDelete);
}
diff --git a/src/KingSystem/ActorSystem/actBaseProcMgr.h b/src/KingSystem/ActorSystem/actBaseProcMgr.h
index a1ce35d8..f39b8197 100644
--- a/src/KingSystem/ActorSystem/actBaseProcMgr.h
+++ b/src/KingSystem/ActorSystem/actBaseProcMgr.h
@@ -163,6 +163,8 @@ public:
Status getStatus() const { return mStatus; }
u32 getNumJobTypes() const { return mNumJobTypes; }
+ bool checkGetActorOk(BaseProc* proc, void* a2);
+
private:
void doAddToUpdateStateList_(BaseProc& proc);
diff --git a/src/KingSystem/ActorSystem/actDebug.cpp b/src/KingSystem/ActorSystem/actDebug.cpp
new file mode 100644
index 00000000..e30ad960
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actDebug.cpp
@@ -0,0 +1,12 @@
+#include "KingSystem/ActorSystem/actDebug.h"
+#include <prim/seadSafeString.h>
+
+namespace ksys::act {
+
+SEAD_SINGLETON_DISPOSER_IMPL(ActorDebug)
+
+const char* ActorDebug::getNullStr(HashUnused*) {
+ return &sead::SafeString::cNullChar;
+}
+
+} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actDebug.h b/src/KingSystem/ActorSystem/actDebug.h
new file mode 100644
index 00000000..5342d341
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actDebug.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <heap/seadDisposer.h>
+#include "KingSystem/Utils/Types.h"
+
+namespace ksys::act {
+
+class ActorDebug {
+ SEAD_SINGLETON_DISPOSER(ActorDebug)
+public:
+ struct HashUnused {
+ u32 hash = 0;
+ u32 b;
+ };
+
+ const char* getNullStr(HashUnused* u);
+
+ u8 TEMP1[0x2F0];
+ f32 mDispDistanceMultiplier;
+ u8 TEMP2[0x114];
+};
+KSYS_CHECK_SIZE_NX150(ActorDebug, 0x428);
+
+} // namespace ksys::act