summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPistonight <pistonknight@outlook.com>2025-05-17 00:33:17 -0700
committerPistonight <pistonknight@outlook.com>2025-05-17 00:33:17 -0700
commit4e39bb884f4d2d3166388d037dfef9861d2b5ecd (patch)
tree53444149f9ba97397dd66679997d7f0469d90298
parent883e2da96aaceb1865e8fe7c4a8a2a5fd42df7a9 (diff)
add at param helpers
-rw-r--r--src/KingSystem/ActorSystem/actActorCreator.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actInstParamPack.h19
-rw-r--r--src/KingSystem/World/worldShootingStarMgr.cpp2
3 files changed, 21 insertions, 2 deletions
diff --git a/src/KingSystem/ActorSystem/actActorCreator.cpp b/src/KingSystem/ActorSystem/actActorCreator.cpp
index e3203b5e..5bb3303d 100644
--- a/src/KingSystem/ActorSystem/actActorCreator.cpp
+++ b/src/KingSystem/ActorSystem/actActorCreator.cpp
@@ -225,7 +225,7 @@ void ActorCreator::setCreatePriorityState1(InstParamPack& pack, BaseProc* proc)
void ActorCreator::setCreatePriorityState2(InstParamPack& pack, BaseProc* proc) {
pack.setProc(proc);
proc->setCreatePriorityState2();
- pack.getBuffer().add(true, "@W");
+ pack->addWait();
}
} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actInstParamPack.h b/src/KingSystem/ActorSystem/actInstParamPack.h
index b5a8c61d..0e68dfb6 100644
--- a/src/KingSystem/ActorSystem/actInstParamPack.h
+++ b/src/KingSystem/ActorSystem/actInstParamPack.h
@@ -99,6 +99,25 @@ public:
bool pop(s32* position, Entry* out_entry);
+ // helpers for @-params
+ void addPosition(const sead::Vector3f& arg) { add(arg, "@P"); }
+ void addRotation(const sead::Vector3f& arg) { add(arg, "@R"); }
+ void addMatrix(const sead::Matrix34f& arg) { add(arg, "@M"); }
+ void addScale(const sead::Vector3f& arg) { add(arg, "@S"); }
+ void addDelegate(ActorCallback* arg) { add(arg, "@D"); }
+ void addDeleteDistanceSq(float arg) { add(arg, "@DD"); }
+ void addTranslationVelocity(const sead::Vector3f& arg) { add(arg, "@TV"); }
+ void addRotationVelocity(const sead::Vector3f& arg) { add(arg, "@RV"); }
+ void addModelUser(const sead::SafeString& arg) { add(arg, "@MU"); }
+ void addResourceLane(int arg) { add(arg, "@RL"); }
+ // TODO below: name TBD
+ void addWait() { add(true, "@W"); }
+ void addPlayerControl() { add(true, "@PC"); }
+ void addNoDisplay() { add(true, "@ND"); }
+ void addDisableCapture() { add(true, "@DC"); }
+ void addSystemBits() { add(true, "@SB"); } // 0x7100dc9594 might have a clue
+ void addMA(int arg) { add(arg, "@MA"); } // 0x710090e78c
+
private:
void writeBytes(const void* value, s32 size) {
sead::MemUtil::copy(&mData[mPosition], value, size);
diff --git a/src/KingSystem/World/worldShootingStarMgr.cpp b/src/KingSystem/World/worldShootingStarMgr.cpp
index 03920fd3..62b740c6 100644
--- a/src/KingSystem/World/worldShootingStarMgr.cpp
+++ b/src/KingSystem/World/worldShootingStarMgr.cpp
@@ -121,7 +121,7 @@ void ShootingStarMgr::spawnStar() {
sead::Vector3f pos;
tryGetStarPosition(&pos);
- pack.getBuffer().add(pos, "@P");
+ pack->addPosition(pos);
act::ActorCreator::instance()->requestCreateActor("FldObj_ShootingStar",
act::BaseProcHeapMgr::instance()->getHeap(),
nullptr, &pack, nullptr, 1);