2022-10-14 07:45:18 +00:00
|
|
|
#include "MetroidPrime/Decode.hpp"
|
|
|
|
#include "Kyoto/Alloc/CMemory.hpp"
|
|
|
|
|
|
|
|
const CArchMsgParmNull& MakeMsg::GetParmDeleteIOWin(const CArchitectureMessage& msg) {
|
|
|
|
return *static_cast< const CArchMsgParmNull* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
2022-10-17 00:46:11 +00:00
|
|
|
CArchitectureMessage MakeMsg::CreateCreateIOWin(EArchMsgTarget target, const int& pmin,
|
|
|
|
const int& pmax, CIOWin* const& iowin) {
|
2022-10-14 07:45:18 +00:00
|
|
|
return CArchitectureMessage(
|
|
|
|
target, kAM_CreateIOWin,
|
2023-10-12 12:14:12 +00:00
|
|
|
rs_new CArchMsgParmInt32Int32VoidPtr(pmin, pmax, reinterpret_cast< const void* >(iowin)));
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const CArchMsgParmInt32Int32VoidPtr& MakeMsg::GetParmCreateIOWin(const CArchitectureMessage& msg) {
|
|
|
|
return *static_cast< const CArchMsgParmInt32Int32VoidPtr* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
2022-10-17 00:46:11 +00:00
|
|
|
const CArchMsgParmInt32Int32VoidPtr&
|
|
|
|
MakeMsg::GetParmChangeIOWinPriority(const CArchitectureMessage& msg) {
|
2022-10-14 07:45:18 +00:00
|
|
|
return *static_cast< const CArchMsgParmInt32Int32VoidPtr* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
|
|
|
CArchitectureMessage MakeMsg::CreateTimerTick(EArchMsgTarget target, const float& val) {
|
2023-10-12 12:14:12 +00:00
|
|
|
return CArchitectureMessage(target, kAM_TimerTick, rs_new CArchMsgParmReal32(val));
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|
2022-10-17 00:46:11 +00:00
|
|
|
|
2022-10-14 07:45:18 +00:00
|
|
|
const CArchMsgParmReal32& MakeMsg::GetParmTimerTick(const CArchitectureMessage& msg) {
|
|
|
|
return *static_cast< const CArchMsgParmReal32* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
|
|
|
CArchitectureMessage MakeMsg::CreateUserInput(EArchMsgTarget target, const CFinalInput& input) {
|
2023-10-12 12:14:12 +00:00
|
|
|
return CArchitectureMessage(target, kAM_UserInput, rs_new CArchMsgParmUserInput(input));
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|
2022-10-17 00:46:11 +00:00
|
|
|
|
2022-10-14 07:45:18 +00:00
|
|
|
const CArchMsgParmUserInput& MakeMsg::GetParmUserInput(const CArchitectureMessage& msg) {
|
|
|
|
return *static_cast< const CArchMsgParmUserInput* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
|
|
|
const CArchMsgParmInt32& MakeMsg::GetParmNewGameflowState(const CArchitectureMessage& msg) {
|
|
|
|
return *static_cast< const CArchMsgParmInt32* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
|
|
|
CArchitectureMessage MakeMsg::CreateControllerStatus(EArchMsgTarget target, const short& chan,
|
2022-10-17 00:46:11 +00:00
|
|
|
const bool& connected) {
|
|
|
|
return CArchitectureMessage(target, kAM_ControllerStatus,
|
2023-10-12 12:14:12 +00:00
|
|
|
rs_new CArchMsgParmControllerStatus(chan, connected));
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CArchitectureMessage MakeMsg::CreateQuitGameplay(EArchMsgTarget target) {
|
2023-10-12 12:14:12 +00:00
|
|
|
return CArchitectureMessage(target, kAM_QuitGameplay, new("??(??)", nullptr) CArchMsgParmNull());
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CArchitectureMessage MakeMsg::CreateFrameBegin(EArchMsgTarget target, const int& a) {
|
2023-10-12 12:14:12 +00:00
|
|
|
return CArchitectureMessage(target, kAM_FrameBegin, new("??(??)", nullptr) CArchMsgParmInt32(a));
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|
2022-10-17 00:46:11 +00:00
|
|
|
|
|
|
|
const CArchMsgParmInt32& MakeMsg::GetParmFrameBegin(const CArchitectureMessage& msg) {
|
|
|
|
return *static_cast< const CArchMsgParmInt32* >(msg.GetParm());
|
|
|
|
}
|
|
|
|
|
2022-10-14 07:45:18 +00:00
|
|
|
CArchitectureMessage MakeMsg::CreateFrameEnd(EArchMsgTarget target, const int& a) {
|
2023-10-12 12:14:12 +00:00
|
|
|
return CArchitectureMessage(target, kAM_FrameEnd, new("??(??)", nullptr) CArchMsgParmInt32(a));
|
2022-10-14 07:45:18 +00:00
|
|
|
}
|