mirror of https://github.com/zeldaret/tp.git
fopScnRq_Request attempt + clang-format
This commit is contained in:
parent
bcced20f39
commit
9245f01cbb
12
asm/data.s
12
asm/data.s
|
|
@ -143,9 +143,15 @@ lbl_803A382C:
|
|||
.global phaseMethod
|
||||
phaseMethod:
|
||||
.incbin "baserom.dol", 0x3A0890, 0x38
|
||||
.global lbl_803A38C8
|
||||
lbl_803A38C8:
|
||||
.incbin "baserom.dol", 0x3A08C8, 0x50
|
||||
.global submethod
|
||||
submethod:
|
||||
.incbin "baserom.dol", 0x3A08C8, 0x10
|
||||
.global noFadeFase
|
||||
noFadeFase:
|
||||
.incbin "baserom.dol", 0x3A08D8, 0x20
|
||||
.global fadeFase
|
||||
fadeFase:
|
||||
.incbin "baserom.dol", 0x3A08F8, 0x20
|
||||
.global lbl_803A3918
|
||||
lbl_803A3918:
|
||||
.incbin "baserom.dol", 0x3A0918, 0x58
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ fopScnRq_Request__FiP11scene_classsPvsUs:
|
|||
/* 8001F054 0001BF94 7C C0 33 78 */ mr r0, r6
|
||||
/* 8001F058 0001BF98 7C FA 3B 78 */ mr r26, r7
|
||||
/* 8001F05C 0001BF9C 7D 1B 43 78 */ mr r27, r8
|
||||
/* 8001F060 0001BFA0 3C 60 80 3A */ lis r3, lbl_803A38C8@ha
|
||||
/* 8001F064 0001BFA4 3B E3 38 C8 */ addi r31, r3, lbl_803A38C8@l
|
||||
/* 8001F060 0001BFA0 3C 60 80 3A */ lis r3, submethod@ha
|
||||
/* 8001F064 0001BFA4 3B E3 38 C8 */ addi r31, r3, submethod@l
|
||||
/* 8001F068 0001BFA8 3B C0 00 00 */ li r30, 0
|
||||
/* 8001F06C 0001BFAC 3B BF 00 10 */ addi r29, r31, 0x10
|
||||
/* 8001F070 0001BFB0 38 60 00 74 */ li r3, 0x74
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ void func_8001EFB0(void);
|
|||
|
||||
// additional symbols needed for f_op_scene_req.cpp
|
||||
// autogenerated by split.py v0.4 at 2021-03-20 21:43:05.095976
|
||||
extern u8 lbl_803A38C8;
|
||||
extern u8 submethod;
|
||||
extern u8 l_fopScnRq_IsUsingOfOverlap;
|
||||
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef F_F_OP_SCENE_REQ_H_
|
||||
#define F_F_OP_SCENE_REQ_H_
|
||||
|
||||
#include "SComponent/c_phase.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f/f_op/f_op_scene_pause.h"
|
||||
#include "f/f_pc/f_pc_node_req.h"
|
||||
#include "SComponent/c_phase.h"
|
||||
|
||||
extern "C" {
|
||||
void fopScnRq_Handler__Fv(void);
|
||||
|
|
@ -12,7 +12,7 @@ void fopScnRq_ReRequest(void);
|
|||
}
|
||||
|
||||
class scene_request_class {
|
||||
public:
|
||||
public:
|
||||
node_create_request mCrtReq;
|
||||
u32 mFadeRequest;
|
||||
request_of_phase_process_class mReqPhsProcCls;
|
||||
|
|
@ -20,7 +20,7 @@ class scene_request_class {
|
|||
};
|
||||
|
||||
scene_request_class* fopScnRq_phase_ClearOverlap(scene_request_class* param_1);
|
||||
u32 fopScnRq_Request(int, scene_class*, s16, void*, s16, u16);
|
||||
u32 fopScnRq_ReRequest(unsigned int, s16, void*);
|
||||
s32 fopScnRq_Request(int, scene_class*, s16, void*, s16, u16);
|
||||
s32 fopScnRq_ReRequest(unsigned int, s16, void*);
|
||||
|
||||
#endif
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
/* 8001F054 0001BF94 7C C0 33 78 */ mr r0, r6
|
||||
/* 8001F058 0001BF98 7C FA 3B 78 */ mr r26, r7
|
||||
/* 8001F05C 0001BF9C 7D 1B 43 78 */ mr r27, r8
|
||||
/* 8001F060 0001BFA0 3C 60 80 3A */ lis r3, lbl_803A38C8@ha
|
||||
/* 8001F064 0001BFA4 3B E3 38 C8 */ addi r31, r3, lbl_803A38C8@l
|
||||
/* 8001F060 0001BFA0 3C 60 80 3A */ lis r3, submethod@ha
|
||||
/* 8001F064 0001BFA4 3B E3 38 C8 */ addi r31, r3, submethod@l
|
||||
/* 8001F068 0001BFA8 3B C0 00 00 */ li r30, 0
|
||||
/* 8001F06C 0001BFAC 3B BF 00 10 */ addi r29, r31, 0x10
|
||||
/* 8001F070 0001BFB0 38 60 00 74 */ li r3, 0x74
|
||||
|
|
|
|||
|
|
@ -8,41 +8,17 @@
|
|||
// additional symbols needed for f_op_scene_req.cpp
|
||||
// autogenerated by split.py v0.4 at 2021-03-20 21:43:05.095971
|
||||
extern "C" {
|
||||
void _restgpr_26(void);
|
||||
void _savegpr_26(void);
|
||||
void cPhs_Do__FP30request_of_phase_process_classPv(void);
|
||||
void cPhs_Set__FP30request_of_phase_process_classPPFPv_i(void);
|
||||
void fopOvlpM_Cancel__Fv(void);
|
||||
void fopOvlpM_ClearOfReq__Fv(void);
|
||||
void fopOvlpM_IsDoingReq__Fv(void);
|
||||
void fopOvlpM_IsDone__Fv(void);
|
||||
void fopOvlpM_Request__FsUs(void);
|
||||
void fopOvlpM_ToldAboutID__FUi(void);
|
||||
void fopScnPause_Disable__FP11scene_class(void);
|
||||
void fopScnPause_Enable__FP11scene_class(void);
|
||||
void fopScnRq_Execute__FP19scene_request_class(void);
|
||||
void fopScnRq_FadeRequest__FsUs(void);
|
||||
void fopScnRq_Handler__Fv(void);
|
||||
void fopScnRq_ReRequest__FUisPv(void);
|
||||
void fopScnRq_Request__FiP11scene_classsPvsUs(void);
|
||||
void fopScnRq_phase_ClearOverlap__FP19scene_request_class(void);
|
||||
void fpcEx_SearchByID__FUi(void);
|
||||
void fpcNdRq_Delete__FP19node_create_request(void);
|
||||
void fpcNdRq_Execute__FP19node_create_request(void);
|
||||
void fpcNdRq_Handler__Fv(void);
|
||||
void fpcNdRq_ReRequest__FUisPv(void);
|
||||
void fopScnRq_FadeRequest__FsUs(void);
|
||||
void fpcNdRq_Request__FUliP18process_node_classsPvP32node_create_request_method_class(void);
|
||||
void func_8001EE64(void);
|
||||
void func_8001EE84(void);
|
||||
void func_8001EEB4(void);
|
||||
void func_8001EEE4(void);
|
||||
void func_8001EF6C(void);
|
||||
void func_8001EFB0(void);
|
||||
}
|
||||
|
||||
// additional symbols needed for f_op_scene_req.cpp
|
||||
// autogenerated by split.py v0.4 at 2021-03-20 21:43:05.095976
|
||||
extern u8 lbl_803A38C8;
|
||||
extern node_create_request_method_class* submethod[4];
|
||||
extern request_of_phase_process_class* noFadeFase[8];
|
||||
extern request_of_phase_process_class* fadeFase[8];
|
||||
extern int l_fopScnRq_IsUsingOfOverlap;
|
||||
|
||||
scene_request_class* fopScnRq_phase_ClearOverlap(scene_request_class* pScnRq) {
|
||||
|
|
@ -91,11 +67,11 @@ int fopScnRq_phase_Done(scene_request_class* pScnRq) {
|
|||
}
|
||||
|
||||
void fopScnRq_Execute(scene_request_class* pScnRq) {
|
||||
int tmp = cPhs_Do(&pScnRq->mReqPhsProcCls,pScnRq);
|
||||
int tmp = cPhs_Do(&pScnRq->mReqPhsProcCls, pScnRq);
|
||||
switch (tmp) {
|
||||
case 2: {
|
||||
fopScnRq_Execute(pScnRq);
|
||||
}
|
||||
case 2: {
|
||||
fopScnRq_Execute(pScnRq);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -108,7 +84,6 @@ int fopScnRq_PostMethod(void* param_1, scene_request_class* pScnRq) {
|
|||
}
|
||||
|
||||
int fopScnRq_Cancel(scene_request_class* pScnRq) {
|
||||
|
||||
if (pScnRq->mFadeRequest && !fopOvlpM_Cancel()) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -116,23 +91,53 @@ int fopScnRq_Cancel(scene_request_class* pScnRq) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
request_base_class* fopScnRq_FadeRequest(s16 param_1, u16 param_2) {
|
||||
scene_request_class* fopScnRq_FadeRequest(s16 param_1, u16 param_2) {
|
||||
request_base_class* tmp = 0;
|
||||
|
||||
if (l_fopScnRq_IsUsingOfOverlap == 0 && (tmp = fopOvlpM_Request(param_1,param_2), tmp != 0)) {
|
||||
if (l_fopScnRq_IsUsingOfOverlap == 0 && (tmp = fopOvlpM_Request(param_1, param_2), tmp != 0)) {
|
||||
l_fopScnRq_IsUsingOfOverlap = 1;
|
||||
}
|
||||
|
||||
return tmp;
|
||||
return (scene_request_class*)tmp;
|
||||
}
|
||||
|
||||
asm u32 fopScnRq_Request(int, scene_class*, s16, void*, s16, u16) {
|
||||
#ifdef NON_MATCHING
|
||||
s32 fopScnRq_Request(int param_1, scene_class* param_2, s16 param_3, void* param_4, s16 param_5,
|
||||
u16 param_6) {
|
||||
s32 ret;
|
||||
request_of_phase_process_class** phase_handler_table;
|
||||
phase_handler_table = noFadeFase;
|
||||
int tmp = 0;
|
||||
scene_request_class* pScnReq = (scene_request_class*)fpcNdRq_Request(
|
||||
0x74, param_1, (process_node_class*)param_2, param_3, param_4, submethod[0]);
|
||||
|
||||
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((node_create_request*)pScnReq);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
pScnReq->mFadeRequest = tmp;
|
||||
cPhs_Set(&pScnReq->mReqPhsProcCls, (cPhs__Handler*)phase_handler_table);
|
||||
ret = pScnReq->mCrtReq.mRequestId;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
asm s32 fopScnRq_Request(int, scene_class*, s16, void*, s16, u16) {
|
||||
nofralloc
|
||||
#include "f/f_op/f_op_scene_req/asm/func_8001F034.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 fopScnRq_ReRequest(unsigned int param_1, s16 param_2, void* param_3) {
|
||||
fpcNdRq_ReRequest(param_1,param_2,param_3);
|
||||
s32 fopScnRq_ReRequest(unsigned int param_1, s16 param_2, void* param_3) {
|
||||
return fpcNdRq_ReRequest(param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
void fopScnRq_Handler(void) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue