jpn/pal fix

This commit is contained in:
Jasper St. Pierre
2023-10-13 19:40:46 -07:00
parent a5641b0ba9
commit fca11f6233
8 changed files with 76 additions and 28 deletions
+44 -6
View File
@@ -7,6 +7,7 @@
#include "f_op/f_op_draw_iter.h"
#include "f_op/f_op_actor_mng.h"
#include "f_op/f_op_overlap_mng.h"
#include "f_op/f_op_msg_mng.h"
#include "f_op/f_op_scene_mng.h"
#include "f_pc/f_pc_leaf.h"
#include "f_pc/f_pc_manager.h"
@@ -22,18 +23,30 @@ namespace JAInter {
};
};
struct title_of_scene_class : public scene_class {
public:
/* 0x1C4 */ u32 pad[0x97];
/* 0x420 */ u32 mMoviePId;
};
class daMP_c : public fopAc_ac_c {
public:
/* 0x290 */ u32 (*mpCallBack1)();
/* 0x294 */ u32 (*mpCallBack2)(f32);
};
#if VERSION == VERSION_PAL
#define title_of_scene_class dScnTitle_c
#endif
struct title_of_scene_class : public scene_class {
public:
/* 0x1C4 */ u32 pad[0x97];
/* 0x420 */ u32 mMoviePId;
#if VERSION == VERSION_PAL
static daMP_c* mMp;
#endif
};
#if VERSION == VERSION_PAL
daMP_c* dScnTitle_c::mMp;
#endif
/* 802372F4-80237344 .text dScnTitle_Draw__FP20title_of_scene_class */
BOOL dScnTitle_Draw(title_of_scene_class* i_this) {
for (create_tag_class* pTag = fopDwIt_Begin(); pTag != NULL; pTag = fopDwIt_Next(pTag))
@@ -44,12 +57,25 @@ BOOL dScnTitle_Draw(title_of_scene_class* i_this) {
/* 80237344-802374C8 .text dScnTitle_Execute__FP20title_of_scene_class */
BOOL dScnTitle_Execute(title_of_scene_class* i_this) {
if (!fopOvlpM_IsPeek() && !dComIfG_resetToOpening(i_this)) {
#if VERSION == VERSION_PAL
daMP_c *movie = dScnTitle_c::mMp;
if (movie == NULL) {
s32 rt = fopAcM_SearchByID(i_this->mMoviePId, (fopAc_ac_c**)&movie);
JUT_ASSERT(0x8a, rt);
if (movie == NULL)
return TRUE;
dScnTitle_c::mMp = movie;
}
#else
daMP_c *movie;
s32 rt = fopAcM_SearchByID(i_this->mMoviePId, (fopAc_ac_c**)&movie);
JUT_ASSERT(0x83, rt);
if (movie == NULL)
return TRUE;
#endif
if (movie->mpCallBack1 == NULL || movie->mpCallBack2 == NULL)
return TRUE;
@@ -80,6 +106,9 @@ BOOL dScnTitle_IsDelete(title_of_scene_class* i_this) {
/* 802374D0-802374D8 .text dScnTitle_Delete__FP20title_of_scene_class */
BOOL dScnTitle_Delete(title_of_scene_class* i_this) {
#if VERSION == VERSION_PAL
dComIfGp_event_remove();
#endif
return TRUE;
}
@@ -94,7 +123,16 @@ s32 dScnTitle_Create(scene_class* i_scn) {
fopAc_ac_c::stopStatus = 0;
dComIfGp_offEnableNextStage();
u32 parameter = fpcM_GetName(i_this) == PROC_TITLE_SCENE ? 0 : 1;
i_this->mMoviePId = fopAcM_create(PROC_MP, parameter, NULL, -1, NULL, NULL, 0xFF, NULL);
#if VERSION == VERSION_PAL
dScnTitle_c::mMp = NULL;
if (fpcM_GetName(i_this) == PROC_ENDING_SCENE) {
fopMsgM_Create(PROC_MESG, 0, 0);
}
#endif
return cPhs_COMPLEATE_e;
}