mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-26 23:26:45 -04:00
137 lines
4.1 KiB
C++
137 lines
4.1 KiB
C++
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: f_op/f_op_msg
|
|
//
|
|
|
|
#include "f_op/f_op_msg.h"
|
|
#include "f_op/f_op_msg_mng.h"
|
|
#include "d/msg/d_msg_class.h"
|
|
#include "d/s/d_s_play.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/types.h"
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
extern "C" static void fopMsg_Draw__FPv();
|
|
extern "C" static void fopMsg_Execute__FPv();
|
|
extern "C" static void fopMsg_IsDelete__FPv();
|
|
extern "C" static void fopMsg_Delete__FPv();
|
|
extern "C" static void fopMsg_Create__FPv();
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
extern "C" void fopMsgM_GetAppend__FPv();
|
|
extern "C" void fopDwTg_ToDrawQ__FP16create_tag_classi();
|
|
extern "C" void fopDwTg_DrawQTo__FP16create_tag_class();
|
|
extern "C" void fopDwTg_Init__FP16create_tag_classPv();
|
|
extern "C" void fpcBs_MakeOfType__FPi();
|
|
extern "C" void fpcLf_GetPriority__FPC14leafdraw_class();
|
|
extern "C" void fpcLf_DrawMethod__FP21leafdraw_method_classPv();
|
|
extern "C" void fpcMtd_Execute__FP20process_method_classPv();
|
|
extern "C" void fpcMtd_IsDelete__FP20process_method_classPv();
|
|
extern "C" void fpcMtd_Delete__FP20process_method_classPv();
|
|
extern "C" void fpcMtd_Create__FP20process_method_classPv();
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* 8001F488-8001F4B0 019DC8 0028+00 1/0 0/0 0/0 .text fopMsg_Draw__FPv */
|
|
static int fopMsg_Draw(void* msg) {
|
|
msg_class* m = static_cast<msg_class*>(msg);
|
|
return fpcLf_DrawMethod(m->mSubMtd, msg);
|
|
}
|
|
|
|
/* 8001F4B0-8001F4E8 019DF0 0038+00 1/0 0/0 0/0 .text fopMsg_Execute__FPv */
|
|
static int fopMsg_Execute(void* msg) {
|
|
msg_class* m = static_cast<msg_class*>(msg);
|
|
|
|
int stat = 1;
|
|
if (dScnPly_c::isPause()) {
|
|
stat = fpcMtd_Execute(&m->mSubMtd->mBase, msg);
|
|
}
|
|
|
|
return stat;
|
|
}
|
|
|
|
/* 8001F4E8-8001F53C 019E28 0054+00 1/0 0/0 0/0 .text fopMsg_IsDelete__FPv */
|
|
static int fopMsg_IsDelete(void* msg) {
|
|
msg_class* m = static_cast<msg_class*>(msg);
|
|
|
|
int stat = fpcMtd_IsDelete(&m->mSubMtd->mBase, msg);
|
|
if (stat == 1) {
|
|
fopDwTg_DrawQTo(&m->mDwTg);
|
|
}
|
|
|
|
return stat;
|
|
}
|
|
|
|
/* 8001F53C-8001F588 019E7C 004C+00 1/0 0/0 0/0 .text fopMsg_Delete__FPv */
|
|
static int fopMsg_Delete(void* msg) {
|
|
msg_class* m = static_cast<msg_class*>(msg);
|
|
|
|
int stat = fpcMtd_Delete(&m->mSubMtd->mBase, msg);
|
|
fopDwTg_DrawQTo(&m->mDwTg);
|
|
|
|
return stat;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 80450CF0-80450CF8 0001F0 0004+04 1/1 0/0 0/0 .sbss fopMsg_MSG_TYPE */
|
|
static int fopMsg_MSG_TYPE;
|
|
|
|
/* 8001F588-8001F660 019EC8 00D8+00 1/0 0/0 0/0 .text fopMsg_Create__FPv */
|
|
#if defined NON_MATCHING
|
|
int fopMsg_Create(void* data) {
|
|
// r31 / r30 swap
|
|
msg_class *msg = (msg_class*)data;
|
|
|
|
if (fpcM_IsFirstCreating(msg)) {
|
|
// TODO: This should be msg_process_profile_definition
|
|
leaf_process_profile_definition* profile = (leaf_process_profile_definition*) fpcM_GetProfile(msg);
|
|
msg->mMsgType = fpcBs_MakeOfType(&fopMsg_MSG_TYPE);
|
|
msg->mSubMtd = profile->mMethods;
|
|
fopDwTg_Init(&msg->mDwTg, msg);
|
|
fopMsg_prm_class * prm = fopMsgM_GetAppend(msg);
|
|
if (prm != NULL) {
|
|
msg->mpActor = prm->mpActor;
|
|
msg->mPos = prm->mPos;
|
|
msg->mMsgID = prm->mMsgID;
|
|
msg->field_0xf0 = prm->field_0x14;
|
|
msg->field_0xf4 = prm->field_0x18;
|
|
}
|
|
}
|
|
|
|
int status = fpcMtd_Create(&msg->mSubMtd->mBase, msg);
|
|
if (status == cPhs_COMPLEATE_e) {
|
|
s32 priority = fpcLf_GetPriority(msg);
|
|
fopDwTg_ToDrawQ(&msg->mDwTg, priority);
|
|
}
|
|
|
|
return status;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm int fopMsg_Create(void* param_0) {
|
|
nofralloc
|
|
#include "asm/f_op/f_op_msg/fopMsg_Create__FPv.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* ############################################################################################## */
|
|
/* 803A3958-803A3970 -00001 0014+04 0/0 5/0 0/0 .data g_fopMsg_Method */
|
|
leafdraw_method_class g_fopMsg_Method = {
|
|
(process_method_func) fopMsg_Create,
|
|
(process_method_func) fopMsg_Delete,
|
|
(process_method_func) fopMsg_Execute,
|
|
(process_method_func) fopMsg_IsDelete,
|
|
(process_method_func) fopMsg_Draw,
|
|
};
|