diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2023-10-13 19:40:46 -0700 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2023-10-13 19:40:46 -0700 |
| commit | fca11f6233672010ee6e5f617c34aa1ca62631f2 (patch) | |
| tree | da017f62396fcf99109960f9c1396da2d5e504a5 /src/d/d_s_title.cpp | |
| parent | a5641b0ba9e6222749fbc78307943b83db618c93 (diff) | |
jpn/pal fix
Diffstat (limited to 'src/d/d_s_title.cpp')
| -rw-r--r-- | src/d/d_s_title.cpp | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/src/d/d_s_title.cpp b/src/d/d_s_title.cpp index a14c41d2..76c26a7a 100644 --- a/src/d/d_s_title.cpp +++ b/src/d/d_s_title.cpp @@ -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 { }; }; +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; -}; -class daMP_c : public fopAc_ac_c { -public: - /* 0x290 */ u32 (*mpCallBack1)(); - /* 0x294 */ u32 (*mpCallBack2)(f32); +#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; } |
