summaryrefslogtreecommitdiff
path: root/src/KingSystem/Map/mapObjectLink.cpp
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2020-11-08 22:07:27 -0800
committertheo3 <arisstephenson2@gmail.com>2020-11-16 15:48:20 -0800
commit8205744abcae5784138629038976f2449269a81f (patch)
treed13995b705961bb5a920562bcf4aac7580afc8f5 /src/KingSystem/Map/mapObjectLink.cpp
parent2f80f2b58106b1641300b44660d3d6e94d6fc895 (diff)
implement map::Object getters
Diffstat (limited to 'src/KingSystem/Map/mapObjectLink.cpp')
-rw-r--r--src/KingSystem/Map/mapObjectLink.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/KingSystem/Map/mapObjectLink.cpp b/src/KingSystem/Map/mapObjectLink.cpp
new file mode 100644
index 00000000..b2ab0502
--- /dev/null
+++ b/src/KingSystem/Map/mapObjectLink.cpp
@@ -0,0 +1,21 @@
+#include "KingSystem/Map/mapObjectLink.h"
+
+namespace ksys::map {
+
+ObjectLinkData::ObjectLinkData() = default;
+
+act::BaseProc* ObjectLink::getObjectProc() const {
+ if (other_obj == nullptr)
+ return nullptr;
+
+ return other_obj->getActor_0(false);
+}
+
+bool ObjectLink::getObjectProcWithAccessor(act::ActorLinkConstDataAccess& accessor) const {
+ if (other_obj == nullptr)
+ return accessor.acquire(nullptr);
+ else
+ return other_obj->getActorWithAccessor(accessor);
+}
+
+} // namespace ksys::map