Move members in ksys::mes:: to ksys::

To match the name "ksys::MessageDispatcher"
This commit is contained in:
Léo Lam 2021-01-29 12:42:29 +01:00
parent df910092a4
commit b9ec01bcad
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
7 changed files with 29 additions and 33 deletions

View File

@ -1317,8 +1317,8 @@
0x000000710004c1b4,AI_AIOrActionBase::ret0_2,8,_ZN4ksys3act2ai10ActionBase23hasUpdateForPreDeleteCbEv
0x000000710004c1bc,AI_AIOrActionBase::m9_null,4,_ZN4ksys3act2ai10ActionBase2m9Ev
0x000000710004c1c0,AI_AIOrActionBase::ret1,8,_ZN4ksys3act2ai10ActionBase8oneShot_Ev
0x000000710004c1c8,AI_AIOrActionBase::ret0_3,8,_ZN4ksys3act2ai10ActionBase14handleMessage_EPNS_3mes7MessageE
0x000000710004c1d0,AI_AIOrActionBase::ret0_4,8,_ZN4ksys3act2ai10ActionBase15handleMessage2_EPNS_3mes7MessageE
0x000000710004c1c8,AI_AIOrActionBase::ret0_3,8,_ZN4ksys3act2ai10ActionBase14handleMessage_EPNS_7MessageE
0x000000710004c1d0,AI_AIOrActionBase::ret0_4,8,_ZN4ksys3act2ai10ActionBase15handleMessage2_EPNS_7MessageE
0x000000710004c1d8,AI_AIOrActionBase::ret1_0,8,_ZN4ksys3act2ai10ActionBase18updateForPreDeleteEv
0x000000710004c1e0,AI_AIOrActionBase::m19_null,4,_ZN4ksys3act2ai10ActionBase11onPreDeleteEv
0x000000710004c1e4,AI_AIOrActionBase::ret0_0,8,_ZN4ksys3act2ai10ActionBase16changeChildLaterERKN4sead14SafeStringBaseIcEE
@ -73017,8 +73017,8 @@
0x0000007100d16c50,AI_AIOrActionBase::sendMessageMaybe,12,
0x0000007100d16c5c,sub_7100D16C5C,12,
0x0000007100d16c68,ai::ActorAI::getCurrentAction,144,_ZN4ksys3act2ai10ActionBase16getCurrentActionEv
0x0000007100d16cf8,ai::ActorAI::x_1,92,_ZN4ksys3act2ai10ActionBase13handleMessageEPNS_3mes7MessageE
0x0000007100d16d54,ai::ActorAI::x_2,92,_ZN4ksys3act2ai10ActionBase14handleMessage2EPNS_3mes7MessageE
0x0000007100d16cf8,ai::ActorAI::x_1,92,_ZN4ksys3act2ai10ActionBase13handleMessageEPNS_7MessageE
0x0000007100d16d54,ai::ActorAI::x_2,92,_ZN4ksys3act2ai10ActionBase14handleMessage2EPNS_7MessageE
0x0000007100d16db0,AI_AIOrActionBase::setFinished,20,_ZN4ksys3act2ai10ActionBase11setFinishedEv
0x0000007100d16dc4,AI_AIOrActionBase::setFailed,20,_ZN4ksys3act2ai10ActionBase9setFailedEv
0x0000007100d16dd8,AI_AIOrActionBase::appendName,392,_ZNK4ksys3act2ai10ActionBase14getCurrentNameEPN4sead22BufferedSafeStringBaseIcEEPS2_
@ -73068,7 +73068,7 @@
0x0000007100d17cf4,ai::InlineParamPack::addFloatArray,144,_ZN4ksys3act2ai15InlineParamPack7addVec3ERKN4sead7Vector3IfEERKNS3_14SafeStringBaseIcEEi
0x0000007100d17d84,ai::InlineParamPack::addBool,116,_ZN4ksys3act2ai15InlineParamPack7addBoolEbRKN4sead14SafeStringBaseIcEEi
0x0000007100d17df8,ai::InlineParamPack::addActor,132,_ZN4ksys3act2ai15InlineParamPack8addActorERKNS0_12BaseProcLinkERKN4sead14SafeStringBaseIcEEi
0x0000007100d17e7c,ai::InlineParamPack::addMesTransceiverId,152,_ZN4ksys3act2ai15InlineParamPack19addMesTransceiverIdERKNS_3mes13TransceiverIdERKN4sead14SafeStringBaseIcEEi
0x0000007100d17e7c,ai::InlineParamPack::addMesTransceiverId,152,_ZN4ksys3act2ai15InlineParamPack19addMesTransceiverIdERKNS_16MesTransceiverIdERKN4sead14SafeStringBaseIcEEi
0x0000007100d17f14,sub_7100D17F14,112,_ZNK4ksys3act2ai9ParamPack8getPairsEPNS1_18ParamNameTypePairsEb
0x0000007100d17f84,sub_7100D17F84,432,_ZN4ksys3act2ai18ParamNameTypePairs7addPairENS_14AIDefParamTypeERKN4sead14SafeStringBaseIcEEb
0x0000007100d18134,ai::ParamPack::getString,160,_ZNK4ksys3act2ai9ParamPack9getStringEPN4sead14SafeStringBaseIcEERKS5_

Can't render this file because it is too large.

View File

@ -223,7 +223,7 @@ Action* ActionBase::getCurrentAction() {
}
}
bool ActionBase::handleMessage(mes::Message* message) {
bool ActionBase::handleMessage(Message* message) {
auto* action = this;
while (!action->handleMessage_(message)) {
action = action->getCurrentChild();
@ -233,7 +233,7 @@ bool ActionBase::handleMessage(mes::Message* message) {
return true;
}
bool ActionBase::handleMessage2(mes::Message* message) {
bool ActionBase::handleMessage2(Message* message) {
auto* action = this;
while (!action->handleMessage2_(message)) {
action = action->getCurrentChild();
@ -327,7 +327,7 @@ struct ComplexDefaults {
BaseProcHandle* base_proc_handle;
sead::Vector3f vec3{0, 0, 0};
sead::SafeString string;
mes::TransceiverId transceiver_id;
MesTransceiverId transceiver_id;
};
ComplexDefaults sDefaults;
@ -357,7 +357,7 @@ BaseProcLink* getDefaultBaseProcLink() {
return &sDefaultBaseProcLink;
}
mes::TransceiverId* getDefaultMesTransceiverId() {
MesTransceiverId* getDefaultMesTransceiverId() {
return &sDefaults.transceiver_id;
}

View File

@ -7,7 +7,7 @@
#include "KingSystem/ActorSystem/actAiParam.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::mes {
namespace ksys {
class Message;
}
@ -39,7 +39,7 @@ f32* getDefaultFloat();
sead::Vector3f* getDefaultVec3();
bool* getDefaultBool();
BaseProcLink* getDefaultBaseProcLink();
mes::TransceiverId* getDefaultMesTransceiverId();
MesTransceiverId* getDefaultMesTransceiverId();
BaseProcHandle** getDefaultBaseProcHandle();
Rail** getDefaultRail();
sead::FixedSafeString<32>* getDefaultString32();
@ -66,9 +66,9 @@ public:
bool oneShot(InlineParamPack* params);
Action* getCurrentAction();
bool handleMessage(mes::Message* message);
bool handleMessage(Message* message);
// TODO: rename
bool handleMessage2(mes::Message* message);
bool handleMessage2(Message* message);
Actor* getActor() const { return mActor; }
s32 getDefinitionIdx() const { return mDefinitionIdx; }
@ -91,9 +91,9 @@ protected:
virtual bool reenter_(ActionBase* other, bool x);
virtual void leave_() {}
virtual void loadParams_() {}
virtual bool handleMessage_(mes::Message* message) { return false; }
virtual bool handleMessage_(Message* message) { return false; }
// TODO: rename
virtual bool handleMessage2_(mes::Message* message) { return false; }
virtual bool handleMessage2_(Message* message) { return false; }
public:
virtual bool updateForPreDelete() { return true; }
@ -227,7 +227,7 @@ protected:
getDefaultBaseProcLink());
}
bool getDynamicParam(mes::TransceiverId** value, const sead::SafeString& key) const {
bool getDynamicParam(MesTransceiverId** value, const sead::SafeString& key) const {
return getDynamicParamPtrImpl<AIDefParamType::MesTransceiverId>(
value, key, getDefaultMesTransceiverId());
}

View File

@ -32,7 +32,7 @@ ParamPack::~ParamPack() {
delete static_cast<u32*>(param->data);
break;
case AIDefParamType::MesTransceiverId:
delete static_cast<mes::TransceiverId*>(param->data);
delete static_cast<MesTransceiverId*>(param->data);
break;
case AIDefParamType::BaseProcHandle:
delete static_cast<BaseProcHandle**>(param->data);
@ -115,8 +115,8 @@ void ParamPack::copy(InlineParamPack* dest, bool x) const {
break;
case AIDefParamType::MesTransceiverId:
if (!x) {
dest->addMesTransceiverId(*static_cast<mes::TransceiverId*>(param->data),
param->name, dest_idx);
dest->addMesTransceiverId(*static_cast<MesTransceiverId*>(param->data), param->name,
dest_idx);
break;
}
[[fallthrough]];
@ -188,7 +188,7 @@ void InlineParamPack::addActor(const BaseProcLink& value, const sead::SafeString
param.type = AIDefParamType::BaseProcLink;
}
void InlineParamPack::addMesTransceiverId(const mes::TransceiverId& value,
void InlineParamPack::addMesTransceiverId(const MesTransceiverId& value,
const sead::SafeString& key, s32 idx) {
auto& param = getParam(idx);
param.key = key.cstr();
@ -345,7 +345,7 @@ bool ParamPack::load(const Actor& actor, const AIDef& def, sead::Heap* heap,
break;
case AIDefParamType::MesTransceiverId:
if (kind == AIDefInstParamKind::Dynamic)
entry->data = new (heap) mes::TransceiverId();
entry->data = new (heap) MesTransceiverId();
break;
case AIDefParamType::BaseProcHandle:
if (kind == AIDefInstParamKind::Dynamic)

View File

@ -123,7 +123,7 @@ struct InlineParam {
};
BaseProcLink baseProcLink;
sead::Vector3f vec3;
mes::TransceiverId mesTransceiverId;
MesTransceiverId mesTransceiverId;
AIDefParamType type;
const char* key;
};
@ -161,7 +161,7 @@ struct InlineParamPack {
void addBool(bool value, const sead::SafeString& key, s32 idx);
void addUInt(u32 value, const sead::SafeString& key, s32 idx);
void addActor(const BaseProcLink& value, const sead::SafeString& key, s32 idx);
void addMesTransceiverId(const mes::TransceiverId& value, const sead::SafeString& key, s32 idx);
void addMesTransceiverId(const MesTransceiverId& value, const sead::SafeString& key, s32 idx);
void addPointer(void* value, const sead::SafeString& key, AIDefParamType type, s32 idx);
void acquireActor(BaseProc* proc, const sead::SafeString& key, s32 idx);
void copyToParamPack(ParamPack& pack) const;

View File

@ -33,7 +33,7 @@ public:
bool init_(sead::Heap* heap) override;
void enter_(InlineParamPack* params) override;
void leave_() override;
bool handleMessage_(mes::Message* message) override;
bool handleMessage_(Message* message) override;
void calc() override;
const ParamPack& getMapUnitParams() const { return mMapUnitParams; }

View File

@ -6,11 +6,9 @@
namespace ksys {
namespace mes {
struct TransceiverId {
TransceiverId() { reset(); }
~TransceiverId() { reset(); }
struct MesTransceiverId {
MesTransceiverId() { reset(); }
~MesTransceiverId() { reset(); }
void reset() {
_0 = -1;
@ -19,7 +17,7 @@ struct TransceiverId {
_10 = nullptr;
}
TransceiverId& operator=(const TransceiverId& other) {
MesTransceiverId& operator=(const MesTransceiverId& other) {
_0 = other._0;
_4 = other._4;
_8 = other._8;
@ -32,8 +30,6 @@ struct TransceiverId {
void* _8{};
void* _10{};
};
KSYS_CHECK_SIZE_NX150(TransceiverId, 0x18);
} // namespace mes
KSYS_CHECK_SIZE_NX150(MesTransceiverId, 0x18);
} // namespace ksys