mirror of https://github.com/zeldaret/tp.git
178 lines
5.7 KiB
C++
178 lines
5.7 KiB
C++
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: f_op/f_op_scene_req
|
|
//
|
|
|
|
#include "f_op/f_op_scene_req.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/types.h"
|
|
#include "f_op/f_op_overlap_mng.h"
|
|
#include "f_pc/f_pc_executor.h"
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* 8001EE34-8001EE64 019774 0030+00 1/0 0/0 0/0 .text
|
|
* fopScnRq_phase_ClearOverlap__FP19scene_request_class */
|
|
static cPhs__Step fopScnRq_phase_ClearOverlap(scene_request_class* param_0) {
|
|
if (fopOvlpM_ClearOfReq() == 1) {
|
|
return cPhs_TWO_e;
|
|
} else {
|
|
return cPhs_ZERO_e;
|
|
}
|
|
}
|
|
|
|
/* 8001EE64-8001EE84 0197A4 0020+00 2/0 0/0 0/0 .text
|
|
* fopScnRq_phase_Execute__FP19scene_request_class */
|
|
static cPhs__Step fopScnRq_phase_Execute(scene_request_class* param_0) {
|
|
return (cPhs__Step)fpcNdRq_Execute(¶m_0->mCrtReq);
|
|
}
|
|
|
|
/* 8001EE84-8001EEB4 0197C4 0030+00 1/0 0/0 0/0 .text
|
|
* fopScnRq_phase_IsDoingOverlap__FP19scene_request_class */
|
|
static cPhs__Step fopScnRq_phase_IsDoingOverlap(scene_request_class* param_0) {
|
|
if (fopOvlpM_IsDoingReq() == 1) {
|
|
return cPhs_TWO_e;
|
|
} else {
|
|
return cPhs_ZERO_e;
|
|
}
|
|
}
|
|
|
|
/* 8001EEB4-8001EEE4 0197F4 0030+00 1/0 0/0 0/0 .text
|
|
* fopScnRq_phase_IsDoneOverlap__FP19scene_request_class */
|
|
static cPhs__Step fopScnRq_phase_IsDoneOverlap(scene_request_class* param_0) {
|
|
if (fopOvlpM_IsDone() == 1) {
|
|
return cPhs_TWO_e;
|
|
} else {
|
|
return cPhs_ZERO_e;
|
|
}
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 80450CE0-80450CE8 0001E0 0004+04 2/2 0/0 0/0 .sbss l_fopScnRq_IsUsingOfOverlap */
|
|
static s32 l_fopScnRq_IsUsingOfOverlap;
|
|
|
|
/* 8001EEE4-8001EF24 019824 0040+00 2/0 0/0 0/0 .text fopScnRq_phase_Done__FP19scene_request_class
|
|
*/
|
|
static cPhs__Step fopScnRq_phase_Done(scene_request_class* pScnRq) {
|
|
if (pScnRq->mCrtReq.mParameter != 1) {
|
|
fopScnPause_Disable((scene_class*)fpcEx_SearchByID(pScnRq->mCrtReq.mCreatingID));
|
|
}
|
|
l_fopScnRq_IsUsingOfOverlap = 0;
|
|
return cPhs_TWO_e;
|
|
}
|
|
|
|
/* 8001EF24-8001EF6C 019864 0048+00 1/0 0/0 0/0 .text fopScnRq_Execute__FP19scene_request_class */
|
|
static void fopScnRq_Execute(scene_request_class* pScnRq) {
|
|
int tmp = cPhs_Do(&pScnRq->mReqPhsProcCls, pScnRq);
|
|
switch (tmp) {
|
|
case 2: {
|
|
fopScnRq_Execute(pScnRq);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 8001EF6C-8001EFB0 0198AC 0044+00 1/0 0/0 0/0 .text
|
|
* fopScnRq_PostMethod__FPvP19scene_request_class */
|
|
static int fopScnRq_PostMethod(void* param_1, scene_request_class* pScnRq) {
|
|
if (pScnRq->mFadeRequest) {
|
|
fopScnPause_Enable((scene_class*)param_1);
|
|
fopOvlpM_ToldAboutID(((scene_class*)param_1)->mBase.mBase.mBsPcId);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
/* 8001EFB0-8001EFF0 0198F0 0040+00 1/0 0/0 0/0 .text fopScnRq_Cancel__FP19scene_request_class */
|
|
static int fopScnRq_Cancel(scene_request_class* pScnRq) {
|
|
if (pScnRq->mFadeRequest && !fopOvlpM_Cancel()) {
|
|
return 0;
|
|
} else {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
/* 8001EFF0-8001F034 019930 0044+00 1/1 0/0 0/0 .text fopScnRq_FadeRequest__FsUs */
|
|
static scene_request_class* fopScnRq_FadeRequest(s16 param_1, u16 param_2) {
|
|
request_base_class* tmp = NULL;
|
|
|
|
if (l_fopScnRq_IsUsingOfOverlap == 0 && (tmp = fopOvlpM_Request(param_1, param_2), tmp != 0)) {
|
|
l_fopScnRq_IsUsingOfOverlap = 1;
|
|
}
|
|
|
|
return (scene_request_class*)tmp;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 803A38C8-803A38D8 -00001 0010+00 1/1 0/0 0/0 .data submethod$2274 */
|
|
static node_create_request_method_class submethod = {
|
|
(process_method_func)fopScnRq_Execute,
|
|
(process_method_func)fopScnRq_Cancel,
|
|
NULL,
|
|
(process_method_func)fopScnRq_PostMethod,
|
|
};
|
|
|
|
/* 803A38D8-803A38F8 -00001 0020+00 0/1 0/0 0/0 .data noFadeFase$2275 */
|
|
static cPhs__Handler noFadeFase[8] = {
|
|
(cPhs__Handler)fopScnRq_phase_Execute,
|
|
(cPhs__Handler)fopScnRq_phase_Done,
|
|
NULL,
|
|
NULL,
|
|
NULL,
|
|
NULL,
|
|
NULL,
|
|
NULL,
|
|
};
|
|
|
|
/* 803A38F8-803A3918 -00001 0020+00 0/1 0/0 0/0 .data fadeFase$2276 */
|
|
static cPhs__Handler fadeFase[8] = {
|
|
(cPhs__Handler)fopScnRq_phase_IsDoingOverlap,
|
|
(cPhs__Handler)fopScnRq_phase_IsDoneOverlap,
|
|
(cPhs__Handler)fopScnRq_phase_Execute,
|
|
(cPhs__Handler)fopScnRq_phase_ClearOverlap,
|
|
(cPhs__Handler)fopScnRq_phase_IsDoneOverlap,
|
|
(cPhs__Handler)fopScnRq_phase_Done,
|
|
NULL,
|
|
NULL,
|
|
};
|
|
|
|
/* 8001F034-8001F0FC 019974 00C8+00 0/0 3/3 0/0 .text fopScnRq_Request__FiP11scene_classsPvsUs */
|
|
s32 fopScnRq_Request(int param_1, scene_class* param_2, s16 param_3, void* param_4, s16 param_5,
|
|
u16 param_6) {
|
|
s32 ret;
|
|
int tmp = 0;
|
|
cPhs__Handler* phase_handler_table;
|
|
phase_handler_table = noFadeFase;
|
|
scene_request_class* pScnReq = (scene_request_class*)fpcNdRq_Request(
|
|
sizeof(scene_request_class), param_1, (process_node_class*)param_2, param_3, param_4,
|
|
&submethod);
|
|
|
|
if (!pScnReq) {
|
|
ret = -1;
|
|
} else {
|
|
if (param_5 != 0x7fff) {
|
|
phase_handler_table = fadeFase;
|
|
tmp = (int)fopScnRq_FadeRequest(param_5, param_6);
|
|
if (!tmp) {
|
|
fpcNdRq_Delete(&pScnReq->mCrtReq);
|
|
return -1;
|
|
}
|
|
}
|
|
pScnReq->mFadeRequest = tmp;
|
|
cPhs_Set(&pScnReq->mReqPhsProcCls, phase_handler_table);
|
|
ret = pScnReq->mCrtReq.mRequestId;
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
|
|
/* 8001F0FC-8001F11C 019A3C 0020+00 0/0 1/1 0/0 .text fopScnRq_ReRequest__FUisPv */
|
|
s32 fopScnRq_ReRequest(unsigned int param_1, s16 param_2, void* param_3) {
|
|
return fpcNdRq_ReRequest(param_1, param_2, param_3);
|
|
}
|
|
|
|
/* 8001F11C-8001F13C 019A5C 0020+00 0/0 1/1 0/0 .text fopScnRq_Handler__Fv */
|
|
void fopScnRq_Handler(void) {
|
|
fpcNdRq_Handler();
|
|
}
|