mirror of https://github.com/zeldaret/tp.git
f_op debug 2
This commit is contained in:
parent
c277082c40
commit
579b2efddb
|
|
@ -637,7 +637,7 @@ config.libs = [
|
|||
Object(MatchingFor(ALL_GCN), "f_op/f_op_camera_mng.cpp"),
|
||||
Object(MatchingFor(ALL_GCN, "ShieldD"), "f_op/f_op_overlap.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "f_op/f_op_overlap_mng.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "f_op/f_op_overlap_req.cpp"),
|
||||
Object(MatchingFor(ALL_GCN, "ShieldD"), "f_op/f_op_overlap_req.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "f_op/f_op_scene.cpp"),
|
||||
Object(MatchingFor(ALL_GCN, "ShieldD"), "f_op/f_op_scene_iter.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "f_op/f_op_scene_mng.cpp"),
|
||||
|
|
|
|||
|
|
@ -68,7 +68,11 @@ public:
|
|||
bool resetGame();
|
||||
void offReset();
|
||||
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
static s8 isPause() { return pauseTimer | nextPauseTimer; }
|
||||
#else
|
||||
static s8 isPause() { return pauseTimer; }
|
||||
#endif
|
||||
static void setPauseTimer(s8 time) { nextPauseTimer = time; }
|
||||
|
||||
static s8 pauseTimer;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ void Z2StatusMgr::heartGaugeOn() {
|
|||
|
||||
void Z2StatusMgr::processHeartGaugeSound() {
|
||||
if (!dComIfGp_event_runCheck() && mHeartGaugeOn != 0) {
|
||||
if (dScnPly_c::isPause()) {
|
||||
if (!dScnPly_c::isPause()) {
|
||||
mHeartGaugeOn--;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ int fopCam_Delete(camera_class* i_this) {
|
|||
}
|
||||
|
||||
static int fopCam_Create(void* i_this) {
|
||||
int ret;
|
||||
camera_class* a_this = (camera_class*)i_this;
|
||||
int ret;
|
||||
|
||||
if (fpcM_IsFirstCreating(i_this)) {
|
||||
camera_process_profile_definition* profile = (camera_process_profile_definition*)fpcM_GetProfile(i_this);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ static int fopKy_Execute(void* i_this) {
|
|||
int ret;
|
||||
kankyo_class* a_this = (kankyo_class*)i_this;
|
||||
|
||||
if (dScnPly_c::isPause() && (!dComIfGp_isPauseFlag() || fpcM_GetName(i_this) == PROC_ENVSE)) {
|
||||
if (!dScnPly_c::isPause() && (!dComIfGp_isPauseFlag() || fpcM_GetName(i_this) == PROC_ENVSE)) {
|
||||
ret = fpcMtd_Execute(&a_this->sub_method->base, i_this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ u8 fopMsg::MemCheck;
|
|||
static int fopMsg_MSG_TYPE;
|
||||
|
||||
int fopMsg_Create(void* i_this) {
|
||||
int ret;
|
||||
msg_class* a_this = (msg_class*)i_this;
|
||||
int ret;
|
||||
|
||||
if (fpcM_IsFirstCreating(i_this)) {
|
||||
msg_process_profile_definition* profile =
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ static int fopOvlpReq_phase_IsCreated(overlap_request_class* i_overlapReq) {
|
|||
static int fopOvlpReq_phase_Create(overlap_request_class* i_overlapReq) {
|
||||
fpcLy_SetCurrentLayer(i_overlapReq->layer);
|
||||
i_overlapReq->request_id =
|
||||
fpcSCtRq_Request(fpcLy_CurrentLayer(), i_overlapReq->procname, NULL, NULL, NULL);
|
||||
fpcM_Create(i_overlapReq->procname, NULL, NULL);
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
|
|
@ -98,8 +98,7 @@ overlap_request_class* fopOvlpReq_Request(overlap_request_class* i_overlapReq, s
|
|||
};
|
||||
|
||||
if (i_overlapReq->field_0x4 == 1) {
|
||||
i_overlapReq = NULL;
|
||||
return i_overlapReq;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cReq_Command(&i_overlapReq->base, 1);
|
||||
|
|
@ -116,9 +115,7 @@ overlap_request_class* fopOvlpReq_Request(overlap_request_class* i_overlapReq, s
|
|||
}
|
||||
|
||||
int fopOvlpReq_Handler(overlap_request_class* i_overlapReq) {
|
||||
int phase_state = cPhs_Do(&i_overlapReq->phase_req, i_overlapReq);
|
||||
|
||||
switch (phase_state) {
|
||||
switch (cPhs_Do(&i_overlapReq->phase_req, i_overlapReq)) {
|
||||
case cPhs_NEXT_e:
|
||||
return fopOvlpReq_Handler(i_overlapReq);
|
||||
case cPhs_INIT_e:
|
||||
|
|
@ -136,11 +133,17 @@ int fopOvlpReq_Handler(overlap_request_class* i_overlapReq) {
|
|||
}
|
||||
|
||||
int fopOvlpReq_Cancel(overlap_request_class* i_overlapReq) {
|
||||
return fopOvlpReq_phase_Done(i_overlapReq) == cPhs_NEXT_e ? TRUE : FALSE;
|
||||
if (fopOvlpReq_phase_Done(i_overlapReq) == cPhs_NEXT_e) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int fopOvlpReq_Is_PeektimeLimit(overlap_request_class* i_overlapReq) {
|
||||
return i_overlapReq->peektime == 0 ? TRUE : FALSE;
|
||||
if (i_overlapReq->peektime == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void fopOvlpReq_SetPeektime(overlap_request_class* i_overlapReq, u16 i_peektime) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include "f_op/f_op_scene_mng.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "f_op/f_op_scene_iter.h"
|
||||
#include "f_op/f_op_scene_req.h"
|
||||
|
||||
|
|
@ -24,13 +25,11 @@ int fopScnM_ChangeReq(scene_class* i_scene, s16 i_procName, s16 param_3, u16 par
|
|||
}
|
||||
|
||||
fpc_ProcID fopScnM_DeleteReq(scene_class* i_scene) {
|
||||
fpc_ProcID request_id = fopScnRq_Request(1, i_scene, 0x7FFF, NULL, 0x7FFF, 0);
|
||||
return request_id != fpcM_ERROR_PROCESS_ID_e;
|
||||
return fopScnRq_Request(1, i_scene, 0x7FFF, NULL, 0x7FFF, 0) != fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, u32 i_data) {
|
||||
fpc_ProcID request_id = fopScnRq_Request(0, 0, i_procName, (void*)i_data, param_2, param_3);
|
||||
return request_id != fpcM_ERROR_PROCESS_ID_e;
|
||||
return fopScnRq_Request(0, 0, i_procName, (void*)i_data, param_2, param_3) != fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
u32 fopScnM_ReRequest(s16 i_procName, u32 i_data) {
|
||||
|
|
@ -43,6 +42,7 @@ u32 fopScnM_ReRequest(s16 i_procName, u32 i_data) {
|
|||
|
||||
void fopScnM_Management() {
|
||||
fopScnRq_Handler();
|
||||
JUT_ASSERT(326, 0);
|
||||
}
|
||||
|
||||
void fopScnM_Init() {}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,13 @@
|
|||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
static cPhs__Step fopScnRq_phase_ClearOverlap(scene_request_class* i_sceneReq) {
|
||||
cPhs__Step rv;
|
||||
if (fopOvlpM_ClearOfReq() == 1) {
|
||||
return cPhs_NEXT_e;
|
||||
rv = cPhs_NEXT_e;
|
||||
} else {
|
||||
return cPhs_INIT_e;
|
||||
rv = cPhs_INIT_e;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static cPhs__Step fopScnRq_phase_Execute(scene_request_class* i_sceneReq) {
|
||||
|
|
@ -23,26 +25,31 @@ static cPhs__Step fopScnRq_phase_Execute(scene_request_class* i_sceneReq) {
|
|||
}
|
||||
|
||||
static cPhs__Step fopScnRq_phase_IsDoingOverlap(scene_request_class* i_sceneReq) {
|
||||
cPhs__Step rv;
|
||||
if (fopOvlpM_IsDoingReq() == 1) {
|
||||
return cPhs_NEXT_e;
|
||||
rv = cPhs_NEXT_e;
|
||||
} else {
|
||||
return cPhs_INIT_e;
|
||||
rv = cPhs_INIT_e;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static cPhs__Step fopScnRq_phase_IsDoneOverlap(scene_request_class* i_sceneReq) {
|
||||
cPhs__Step rv;
|
||||
if (fopOvlpM_IsDone() == 1) {
|
||||
return cPhs_NEXT_e;
|
||||
rv = cPhs_NEXT_e;
|
||||
} else {
|
||||
return cPhs_INIT_e;
|
||||
rv = cPhs_INIT_e;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static BOOL l_fopScnRq_IsUsingOfOverlap;
|
||||
|
||||
static cPhs__Step fopScnRq_phase_Done(scene_request_class* i_sceneReq) {
|
||||
if (i_sceneReq->create_request.parameters != 1) {
|
||||
fopScnPause_Disable((scene_class*)fpcEx_SearchByID(i_sceneReq->create_request.creating_id));
|
||||
scene_class* scene = (scene_class*)fpcM_SearchByID(i_sceneReq->create_request.creating_id);
|
||||
fopScnPause_Disable(scene);
|
||||
}
|
||||
|
||||
l_fopScnRq_IsUsingOfOverlap = FALSE;
|
||||
|
|
@ -55,6 +62,9 @@ static void fopScnRq_Execute(scene_request_class* i_sceneReq) {
|
|||
switch (phase_state) {
|
||||
case cPhs_NEXT_e:
|
||||
fopScnRq_Execute(i_sceneReq);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -77,9 +87,11 @@ static int fopScnRq_Cancel(scene_request_class* i_sceneReq) {
|
|||
static scene_request_class* fopScnRq_FadeRequest(s16 i_procname, u16 i_peektime) {
|
||||
overlap_request_class* req = NULL;
|
||||
|
||||
if (!l_fopScnRq_IsUsingOfOverlap && (req = fopOvlpM_Request(i_procname, i_peektime), req != NULL))
|
||||
{
|
||||
l_fopScnRq_IsUsingOfOverlap = TRUE;
|
||||
if (!l_fopScnRq_IsUsingOfOverlap) {
|
||||
req = fopOvlpM_Request(i_procname, i_peektime);
|
||||
if (req != NULL) {
|
||||
l_fopScnRq_IsUsingOfOverlap = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return (scene_request_class*)req;
|
||||
|
|
|
|||
Loading…
Reference in New Issue