summaryrefslogtreecommitdiff
path: root/src/f_op/f_op_msg.cpp
diff options
context:
space:
mode:
authorNiklas Bauer <nikbau2000@gmail.com>2025-12-26 22:17:51 +0100
committerGitHub <noreply@github.com>2025-12-26 13:17:51 -0800
commit67b576ad9aec15953fa0d52f33cc88e8a783b46b (patch)
tree2e9e78e8cca507807292d9288a54babfe187cca0 /src/f_op/f_op_msg.cpp
parent229527daf71c76965ef0735abca530cee68b7358 (diff)
f_op debug work (#2991)
* f_op debug 1 * f_op debug 2 * f_op debug 3 * f_op debug 4 * f_op debug 5 * f_op_debug fix build * f_op linking * remove goto in fopac_create * fix regressions * fix regressions * pr comments
Diffstat (limited to 'src/f_op/f_op_msg.cpp')
-rw-r--r--src/f_op/f_op_msg.cpp57
1 files changed, 39 insertions, 18 deletions
diff --git a/src/f_op/f_op_msg.cpp b/src/f_op/f_op_msg.cpp
index 4b9ad8afe6..f5cbf98b1c 100644
--- a/src/f_op/f_op_msg.cpp
+++ b/src/f_op/f_op_msg.cpp
@@ -5,32 +5,52 @@
#include "f_op/f_op_msg.h"
#include "d/d_s_play.h"
+#include "f_ap/f_ap_game.h"
#include "f_op/f_op_draw_tag.h"
#include "f_op/f_op_msg_mng.h"
#include "f_pc/f_pc_manager.h"
+#include "m_Do/m_Do_machine.h"
static int fopMsg_Draw(void* i_this) {
- msg_class* a_this = (msg_class*)i_this;
- return fpcLf_DrawMethod(a_this->sub_method, i_this);
+#if DEBUG
+ fapGm_HIO_c::startCpuTimer();
+#endif
+ s32 ret = fpcLf_DrawMethod(((msg_class*)i_this)->sub_method, i_this);
+#if DEBUG
+ fapGm_HIO_c::stopCpuTimer("2D関係(描画処理)"); // 2D graphics (rendering)
+#endif
+ return ret;
}
static int fopMsg_Execute(void* i_this) {
msg_class* a_this = (msg_class*)i_this;
-
int ret = 1;
- if (dScnPly_c::isPause()) {
- ret = fpcMtd_Execute(&a_this->sub_method->base, i_this);
+#if DEBUG
+ fapGm_HIO_c::startCpuTimer();
+#endif
+ if (!dScnPly_c::isPause()) {
+#if DEBUG
+ if (fopMsg::MemCheck) {
+ mDoMch_HeapCheckAll();
+ }
+#endif
+ ret = fpcMtd_Execute(&((msg_class*)i_this)->sub_method->base, i_this);
+#if DEBUG
+ if (fopMsg::MemCheck) {
+ mDoMch_HeapCheckAll();
+ }
+#endif
}
-
+#if DEBUG
+ fapGm_HIO_c::stopCpuTimer("2D関係(計算処理)"); // 2D graphics (computational processing)
+#endif
return ret;
}
static int fopMsg_IsDelete(void* i_this) {
- msg_class* a_this = (msg_class*)i_this;
-
- int ret = fpcMtd_IsDelete(&a_this->sub_method->base, i_this);
+ int ret = fpcMtd_IsDelete(&((msg_class*)i_this)->sub_method->base, i_this);
if (ret == 1) {
- fopDwTg_DrawQTo(&a_this->draw_tag);
+ fopDwTg_DrawQTo(&((msg_class*)i_this)->draw_tag);
}
return ret;
@@ -39,7 +59,7 @@ static int fopMsg_IsDelete(void* i_this) {
static int fopMsg_Delete(void* i_this) {
msg_class* a_this = (msg_class*)i_this;
- int ret = fpcMtd_Delete(&a_this->sub_method->base, i_this);
+ int ret = fpcMtd_Delete(&((msg_class*)i_this)->sub_method->base, i_this);
fopDwTg_DrawQTo(&a_this->draw_tag);
return ret;
@@ -53,12 +73,14 @@ static int fopMsg_MSG_TYPE;
int fopMsg_Create(void* i_this) {
msg_class* a_this = (msg_class*)i_this;
+ int ret;
- if (fpcM_IsFirstCreating(a_this)) {
- msg_process_profile_definition* profile = (msg_process_profile_definition*)fpcM_GetProfile(i_this);
- a_this->type = fpcBs_MakeOfType(&fopMsg_MSG_TYPE);
+ if (fpcM_IsFirstCreating(i_this)) {
+ msg_process_profile_definition* profile =
+ (msg_process_profile_definition*)fpcM_GetProfile(i_this);
+ a_this->type = fpcM_MakeOfType(&fopMsg_MSG_TYPE);
a_this->sub_method = profile->sub_method;
-
+
fopDwTg_Init(&a_this->draw_tag, a_this);
fopMsg_prm_class* append = fopMsgM_GetAppend(a_this);
@@ -71,10 +93,9 @@ int fopMsg_Create(void* i_this) {
}
}
- int ret = fpcMtd_Create(&a_this->sub_method->base, a_this);
+ ret = fpcMtd_Create(&a_this->sub_method->base, a_this);
if (ret == cPhs_COMPLEATE_e) {
- s32 priority = fpcM_DrawPriority(a_this);
- fopDwTg_ToDrawQ(&a_this->draw_tag, priority);
+ fopDwTg_ToDrawQ(&a_this->draw_tag, fpcM_DrawPriority(a_this));
}
return ret;