From 08687964b40969ee82c3e7171a25ba11a17c5c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 19 Aug 2020 18:06:17 +0200 Subject: [PATCH] ksys/act: Declare more BaseProc functions It's possible I've missed some BaseProc functions but now every single function that was identified as a BaseProc member function in my IDB has been added to the class Most of those are very easy to implement. --- src/KingSystem/ActorSystem/actBaseProc.h | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/KingSystem/ActorSystem/actBaseProc.h b/src/KingSystem/ActorSystem/actBaseProc.h index 12408819..4155c683 100644 --- a/src/KingSystem/ActorSystem/actBaseProc.h +++ b/src/KingSystem/ActorSystem/actBaseProc.h @@ -106,14 +106,37 @@ public: void wakeUp(SleepWakeReason reason); /// Delete this actor. The request is queued. bool deleteLater(DeleteReason reason); + void freeLinkData(); u8 getPriority() const { return mPriority; } void setPriority(u8 priority) { mPriority = priority; } + State getState() const { return mState; } bool isDeletedOrDeleting() const { return mState == State::Delete || mStateFlags.isOn(StateFlags::RequestDelete); } + /// For BaseProcLink or ActorLinkConstDataAccess. + bool acquire(ActorLinkConstDataAccess& accessor); + /// For BaseProcLink or ActorLinkConstDataAccess. + void release(); + + BaseProc* getConnectedCalcParent() const; + void setConnectedCalcParent(BaseProc* parent, bool delete_parent_on_delete); + void resetConnectedCalcParent(bool clear_existing_set_request); + + BaseProc* getConnectedCalcChild() const; + void setConnectedCalcChild(BaseProc* child, bool delete_child_on_delete); + void resetConnectedCalcChild(bool clear_existing_set_request); + + bool isSpecialJobType(JobType type); + bool shouldSkipJobPush(JobType type); + void setJobPriority(u8 actorparam_priority, JobType type); + void setJobPriority2(u8 actorparam_priority, JobType type); + + void setCreatePriorityState2(); + bool setStateFlag(u8 idx); + protected: friend class BaseProcLinkDataMgr; friend class BaseProcMgr; @@ -237,10 +260,15 @@ protected: void doPreDelete(bool* do_not_destruct_immediately); void startDelete_(); + /// Called from BaseProcMgr when a job for this process is invoked. + void jobInvoked(JobType type); + bool isSpecialJobTypeForThisActor_(JobType type) const { return mSpecialJobTypesMask.isOnBit(int(type)); } + bool x00000071011ba9fc(); + sead::FixedSafeString<64> mName; u32 mId = -1; State mState = State::Init;