diff --git a/data/uking_functions.csv b/data/uking_functions.csv index 2fd4d83cd..2ac4abea4 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -73599,7 +73599,7 @@ Address,Quality,Size,Name 0x0000007100d375e4,U,000076,LazyTraverseList::dtor 0x0000007100d37630,U,000132,LazyTraverseList::updateFlags 0x0000007100d376b4,U,000216, -0x0000007100d3778c,U,000204,LinkTag::construct +0x0000007100d3778c,O,000204,_ZN4ksys3act7LinkTag9constructERKNS0_8BaseProc9CreateArgEPN4sead4HeapE 0x0000007100d37858,U,000280,LinkTag::calc 0x0000007100d37970,U,000064,LinkTag::dtor 0x0000007100d379b0,U,000072,LinkTag::dtorDelete diff --git a/src/KingSystem/ActorSystem/CMakeLists.txt b/src/KingSystem/ActorSystem/CMakeLists.txt index fe74e4217..8f5bd3770 100644 --- a/src/KingSystem/ActorSystem/CMakeLists.txt +++ b/src/KingSystem/ActorSystem/CMakeLists.txt @@ -99,6 +99,8 @@ target_sources(uking PRIVATE actInstParamPack.cpp actInstParamPack.h actLifeRecoveryInfo.h + actLinkTag.cpp + actLinkTag.h actPlayerInfo.cpp actPlayerInfo.h actTag.h diff --git a/src/KingSystem/ActorSystem/actLinkTag.cpp b/src/KingSystem/ActorSystem/actLinkTag.cpp new file mode 100644 index 000000000..e2b32a76c --- /dev/null +++ b/src/KingSystem/ActorSystem/actLinkTag.cpp @@ -0,0 +1,13 @@ +#include "KingSystem/ActorSystem/actLinkTag.h" + +namespace ksys::act { + +LinkTag* LinkTag::construct(const BaseProc::CreateArg& arg, sead::Heap* heap){ + return new (heap, std::nothrow) LinkTag(arg); +} + +LinkTag::LinkTag(const BaseProc::CreateArg& arg) : BaseProc(arg), mJob(this,&LinkTag::calc) { + mJobHandlers[3] = &mJob; +} + +} // namespace ksys::act diff --git a/src/KingSystem/ActorSystem/actLinkTag.h b/src/KingSystem/ActorSystem/actLinkTag.h new file mode 100644 index 000000000..9c5fdaed4 --- /dev/null +++ b/src/KingSystem/ActorSystem/actLinkTag.h @@ -0,0 +1,45 @@ +#pragma once + +#include +#include "KingSystem/ActorSystem/actBaseProc.h" +#include "KingSystem/ActorSystem/actBaseProcJobHandler.h" +#include "KingSystem/Map/mapMubinIter.h" +#include "KingSystem/Utils/Types.h" + +namespace ksys::map { +class Object; +} // namespace ksys::map + +namespace ksys::act { + +class LinkTag : public BaseProc { + SEAD_RTTI_OVERRIDE(LinkTag, BaseProc) + +public: + enum class Type : u8 { And, Or, NAnd, NOr, XOr, Count, Pulse, None }; + + static LinkTag* construct(const BaseProc::CreateArg& arg, sead::Heap* heap); + + explicit LinkTag(const BaseProc::CreateArg& arg); + void calc(); + + BaseProcJobHandlerT mJob; + sead::LongBitFlag<96> mTriggeredLinkFlags; + Type mLinkTagType = Type::And; + u8 _1dd = 0xFF; + u8 _1de = 0; + u8 _1df = 0xFF; + u16 mFlags = 0; + u8 mTagCount = 0; + u8 field_1E3 = 0; + u32 mCounter = 0; + int field_1E8 = 0; + u32 mCalcFrameFlags = 0; + u32 mHashId = 0; + int field_1F4 = 0; + map::MubinIter mMubinIter; + map::Object* mMapObj = nullptr; +}; +KSYS_CHECK_SIZE_NX150(LinkTag, 0x210); + +} // namespace ksys::act