mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-18 22:26:42 -04:00
d_a_dmidna OK / f_op + misc cleanup (#276)
* some f_op / d_insect cleanup * rename some vars according to tww * d_a_dmidna OK * remove asm
This commit is contained in:
+39
-84
@@ -1,81 +1,49 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: f_op/f_op_msg
|
||||
//
|
||||
/**
|
||||
* f_op_msg.cpp
|
||||
* Message Process Framework
|
||||
*/
|
||||
|
||||
#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:
|
||||
//
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
|
||||
/* 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);
|
||||
static int fopMsg_Draw(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
return fpcLf_DrawMethod(_this->mSubMtd, i_this);
|
||||
}
|
||||
|
||||
/* 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);
|
||||
static int fopMsg_Execute(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
|
||||
int stat = 1;
|
||||
if (dScnPly_c::isPause()) {
|
||||
stat = fpcMtd_Execute(&m->mSubMtd->mBase, msg);
|
||||
stat = fpcMtd_Execute(&_this->mSubMtd->mBase, i_this);
|
||||
}
|
||||
|
||||
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);
|
||||
static int fopMsg_IsDelete(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
|
||||
int stat = fpcMtd_IsDelete(&m->mSubMtd->mBase, msg);
|
||||
int stat = fpcMtd_IsDelete(&_this->mSubMtd->mBase, i_this);
|
||||
if (stat == 1) {
|
||||
fopDwTg_DrawQTo(&m->mDwTg);
|
||||
fopDwTg_DrawQTo(&_this->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);
|
||||
static int fopMsg_Delete(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
|
||||
int stat = fpcMtd_Delete(&m->mSubMtd->mBase, msg);
|
||||
fopDwTg_DrawQTo(&m->mDwTg);
|
||||
int stat = fpcMtd_Delete(&_this->mSubMtd->mBase, i_this);
|
||||
fopDwTg_DrawQTo(&_this->mDwTg);
|
||||
|
||||
return stat;
|
||||
}
|
||||
@@ -85,51 +53,38 @@ static int fopMsg_Delete(void* msg) {
|
||||
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;
|
||||
int fopMsg_Create(void* i_this) {
|
||||
msg_class* _this = (msg_class*)i_this;
|
||||
|
||||
if (fpcM_IsFirstCreating(msg)) {
|
||||
msg_process_profile_definition* profile = (msg_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 (fpcM_IsFirstCreating(_this)) {
|
||||
msg_process_profile_definition* profile =
|
||||
(msg_process_profile_definition*)fpcM_GetProfile(i_this);
|
||||
_this->mMsgType = fpcBs_MakeOfType(&fopMsg_MSG_TYPE);
|
||||
_this->mSubMtd = profile->mSubMtd;
|
||||
fopDwTg_Init(&_this->mDwTg, _this);
|
||||
fopMsg_prm_class* prm = fopMsgM_GetAppend(_this);
|
||||
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;
|
||||
_this->mpActor = prm->mpActor;
|
||||
_this->mPos = prm->mPos;
|
||||
_this->mMsgID = prm->mMsgID;
|
||||
_this->field_0xf0 = prm->field_0x14;
|
||||
_this->field_0xf4 = prm->field_0x18;
|
||||
}
|
||||
}
|
||||
|
||||
int status = fpcMtd_Create(&msg->mSubMtd->mBase, msg);
|
||||
int status = fpcMtd_Create(&_this->mSubMtd->mBase, _this);
|
||||
if (status == cPhs_COMPLEATE_e) {
|
||||
s32 priority = fpcLf_GetPriority(msg);
|
||||
fopDwTg_ToDrawQ(&msg->mDwTg, priority);
|
||||
s32 priority = fpcLf_GetPriority(_this);
|
||||
fopDwTg_ToDrawQ(&_this->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,
|
||||
(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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user