diff --git a/data/uking_functions.csv b/data/uking_functions.csv index 219485fb..cac61200 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -80435,8 +80435,8 @@ Address,Quality,Size,Name 0x0000007100ee9c40,U,000080, 0x0000007100ee9c90,U,000088,wm::isExposureZero 0x0000007100ee9ce8,U,000120, -0x0000007100ee9d60,U,000144,PlacementObj::printDebugMsg -0x0000007100ee9df0,U,000144,actSomeDebugLogForMapObj +0x0000007100ee9d60,O,000144,_ZN4ksys3map13printDebugMsgEPNS0_6ObjectERKN4sead14SafeStringBaseIcEEPKc +0x0000007100ee9df0,O,000144,_ZN4ksys3map13printDebugMsgEPNS_3act5ActorERKN4sead14SafeStringBaseIcEEPKc 0x0000007100ee9e80,U,000012,getIsGetPrefix 0x0000007100ee9e8c,U,000112,checkIsGetSameGroupActorName 0x0000007100ee9efc,U,000636,checkIsGet diff --git a/src/KingSystem/Map/mapDebug.cpp b/src/KingSystem/Map/mapDebug.cpp index 0269169b..296a24e2 100644 --- a/src/KingSystem/Map/mapDebug.cpp +++ b/src/KingSystem/Map/mapDebug.cpp @@ -1,3 +1,23 @@ #include "KingSystem/Map/mapDebug.h" +#include "KingSystem/ActorSystem/actActor.h" -namespace ksys::map {} // namespace ksys::map +namespace ksys::map { + +bool printDebugMsg(Object* object, const sead::SafeString& msg, const char* config_name) { + if (object == nullptr) + return false; + + makeProjectMapMuuntPath(sead::FixedSafeString<0x200>(), object); + return true; +} + +bool printDebugMsg(ksys::act::Actor* actor, const sead::SafeString& msg, const char* config_name) { + Object* o = actor->getMapObject(); + if (o == nullptr) + return false; + + makeProjectMapMuuntPath(sead::FixedSafeString<0x200>(), o); + return true; +} + +} // namespace ksys::map diff --git a/src/KingSystem/Map/mapDebug.h b/src/KingSystem/Map/mapDebug.h index 28c8b2cc..02f552d9 100644 --- a/src/KingSystem/Map/mapDebug.h +++ b/src/KingSystem/Map/mapDebug.h @@ -2,10 +2,16 @@ #include +namespace ksys::act { +class Actor; +} // namespace ksys::act + namespace ksys::map { class Object; +void* makeProjectMapMuuntPath(const sead::SafeString& path, Object* object); bool printDebugMsg(Object* object, const sead::SafeString& msg, const char* config_name); +bool printDebugMsg(ksys::act::Actor* actor, const sead::SafeString& msg, const char* config_name); } // namespace ksys::map