From 1d779a0b78020ef0a91d6ebefdac131b4b48a6f7 Mon Sep 17 00:00:00 2001 From: Pheenoh Date: Sat, 20 Mar 2021 19:01:48 -0400 Subject: [PATCH] fopOvlp_Create attempt, fopScnRq_phase_ClearOverlap OK --- f_op_scene_req.cpp | 129 ++++++++++++++++++ include/SComponent/c_request.h | 26 ++-- include/f/f_op/f_op_scene_req.h | 6 + .../f/f_op/f_op_scene_req/asm/func_8001EE34.s | 13 ++ .../f/f_op/f_op_scene_req/asm/func_8001EE64.s | 8 ++ .../f/f_op/f_op_scene_req/asm/func_8001EE84.s | 13 ++ .../f/f_op/f_op_scene_req/asm/func_8001EEB4.s | 13 ++ .../f/f_op/f_op_scene_req/asm/func_8001EEE4.s | 17 +++ .../f/f_op/f_op_scene_req/asm/func_8001EF24.s | 20 +++ .../f/f_op/f_op_scene_req/asm/func_8001EF6C.s | 18 +++ .../f/f_op/f_op_scene_req/asm/func_8001EFB0.s | 18 +++ .../f/f_op/f_op_scene_req/asm/func_8001EFF0.s | 18 +++ .../f/f_op/f_op_scene_req/asm/func_8001F034.s | 53 +++++++ .../f/f_op/f_op_scene_req/asm/func_8001F0FC.s | 8 ++ .../f/f_op/f_op_scene_req/asm/func_8001F11C.s | 8 ++ ldscript.lcf | 17 +++ obj_files.mk | 2 +- src/f/f_op/f_op_overlap.cpp | 15 ++ src/f/f_op/f_op_scene_req.cpp | 85 +++++------- 19 files changed, 424 insertions(+), 63 deletions(-) create mode 100644 f_op_scene_req.cpp create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EE34.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EE64.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EE84.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EEB4.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EEE4.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EF24.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EF6C.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EFB0.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001EFF0.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001F034.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001F0FC.s create mode 100644 include/f/f_op/f_op_scene_req/asm/func_8001F11C.s diff --git a/f_op_scene_req.cpp b/f_op_scene_req.cpp new file mode 100644 index 00000000000..e7ce7d4d6d5 --- /dev/null +++ b/f_op_scene_req.cpp @@ -0,0 +1,129 @@ +/* f_op_scene_req.cpp autogenerated by split.py v0.4 at 2021-03-20 21:43:05.095943 */ + +#include "global.h" + +// 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 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 u8 lbl_80450CE0; + +extern "C" { +// fopScnRq_phase_ClearOverlap__FP19scene_request_class +// fopScnRq_phase_ClearOverlap(scene_request_class*) +asm void fopScnRq_phase_ClearOverlap__FP19scene_request_class(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EE34.s" +} + +// fopScnRq_phase_Execute__FP19scene_request_class +// fopScnRq_phase_Execute(scene_request_class*) +asm void func_8001EE64(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EE64.s" +} + +// fopScnRq_phase_IsDoingOverlap__FP19scene_request_class +// fopScnRq_phase_IsDoingOverlap(scene_request_class*) +asm void func_8001EE84(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EE84.s" +} + +// fopScnRq_phase_IsDoneOverlap__FP19scene_request_class +// fopScnRq_phase_IsDoneOverlap(scene_request_class*) +asm void func_8001EEB4(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EEB4.s" +} + +// fopScnRq_phase_Done__FP19scene_request_class +// fopScnRq_phase_Done(scene_request_class*) +asm void func_8001EEE4(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EEE4.s" +} + +// fopScnRq_Execute__FP19scene_request_class +// fopScnRq_Execute(scene_request_class*) +asm void fopScnRq_Execute__FP19scene_request_class(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EF24.s" +} + +// fopScnRq_PostMethod__FPvP19scene_request_class +// fopScnRq_PostMethod(void*, scene_request_class*) +asm void func_8001EF6C(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EF6C.s" +} + +// fopScnRq_Cancel__FP19scene_request_class +// fopScnRq_Cancel(scene_request_class*) +asm void func_8001EFB0(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EFB0.s" +} + +// fopScnRq_FadeRequest__FsUs +// fopScnRq_FadeRequest(s16, u16) +asm void fopScnRq_FadeRequest__FsUs(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001EFF0.s" +} + +// fopScnRq_Request__FiP11scene_classsPvsUs +// fopScnRq_Request(int, scene_class*, s16, void*, s16, u16) +asm void fopScnRq_Request__FiP11scene_classsPvsUs(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001F034.s" +} + +// fopScnRq_ReRequest__FUisPv +// fopScnRq_ReRequest(unsigned int, s16, void*) +asm void fopScnRq_ReRequest__FUisPv(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001F0FC.s" +} + +// fopScnRq_Handler__Fv +// fopScnRq_Handler(void) +asm void fopScnRq_Handler__Fv(void) { + nofralloc +#include "f/f_op/f_op_scene_req/asm/func_8001F11C.s" +} +}; diff --git a/include/SComponent/c_request.h b/include/SComponent/c_request.h index e5fba9ce726..0d19a6848ef 100644 --- a/include/SComponent/c_request.h +++ b/include/SComponent/c_request.h @@ -13,14 +13,14 @@ struct request_base_class { u8 field_0x6; u8 field_0x7; u32 field_0x8; - u8 field_0xc; + s8 field_0xc; u8 field_0xd; u8 field_0xe; u8 field_0xf; - u8 field_0x10; - u8 field_0x11; - u8 field_0x12; - u8 field_0x13; + int* field_0x10; + // u8 field_0x11; + // u8 field_0x12; + // u8 field_0x13; u8 field_0x14; u8 field_0x15; u8 field_0x16; @@ -190,14 +190,14 @@ struct request_base_class { u8 field_0xbd; u8 field_0xbe; u8 field_0xbf; - u8 field_0xc0; - u8 field_0xc1; - u8 field_0xc2; - u8 field_0xc3; - u8 field_0xc4; - u8 field_0xc5; - u8 field_0xc6; - u8 field_0xc7; + u32 field_0xc0; + // u8 field_0xc1; + // u8 field_0xc2; + // u8 field_0xc3; + request_base_class* field_0xc4; + // u8 field_0xc5; + // u8 field_0xc6; + // u8 field_0xc7; u32* field_0xc8; }; diff --git a/include/f/f_op/f_op_scene_req.h b/include/f/f_op/f_op_scene_req.h index 6b87327e26e..576f5de645c 100644 --- a/include/f/f_op/f_op_scene_req.h +++ b/include/f/f_op/f_op_scene_req.h @@ -1,11 +1,17 @@ #ifndef F_F_OP_SCENE_REQ_H_ #define F_F_OP_SCENE_REQ_H_ +#include "dolphin/types.h" +#include "f/f_op/f_op_scene_pause.h" + extern "C" { void fopScnRq_Handler__Fv(void); void fopScnRq_ReRequest(void); } +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*); diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EE34.s b/include/f/f_op/f_op_scene_req/asm/func_8001EE34.s new file mode 100644 index 00000000000..6614fadcbbf --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EE34.s @@ -0,0 +1,13 @@ +/* 8001EE34 0001BD74 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EE38 0001BD78 7C 08 02 A6 */ mflr r0 +/* 8001EE3C 0001BD7C 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EE40 0001BD80 4B FF F7 91 */ bl fopOvlpM_ClearOfReq__Fv +/* 8001EE44 0001BD84 2C 03 00 01 */ cmpwi r3, 1 +/* 8001EE48 0001BD88 38 60 00 00 */ li r3, 0 +/* 8001EE4C 0001BD8C 40 82 00 08 */ bne lbl_8001EE54 +/* 8001EE50 0001BD90 38 60 00 02 */ li r3, 2 +lbl_8001EE54: +/* 8001EE54 0001BD94 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EE58 0001BD98 7C 08 03 A6 */ mtlr r0 +/* 8001EE5C 0001BD9C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EE60 0001BDA0 4E 80 00 20 */ blr \ No newline at end of file diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EE64.s b/include/f/f_op/f_op_scene_req/asm/func_8001EE64.s new file mode 100644 index 00000000000..90c6cb05ab4 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EE64.s @@ -0,0 +1,8 @@ +/* 8001EE64 0001BDA4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EE68 0001BDA8 7C 08 02 A6 */ mflr r0 +/* 8001EE6C 0001BDAC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EE70 0001BDB0 48 00 3B 69 */ bl fpcNdRq_Execute__FP19node_create_request +/* 8001EE74 0001BDB4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EE78 0001BDB8 7C 08 03 A6 */ mtlr r0 +/* 8001EE7C 0001BDBC 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EE80 0001BDC0 4E 80 00 20 */ blr \ No newline at end of file diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EE84.s b/include/f/f_op/f_op_scene_req/asm/func_8001EE84.s new file mode 100644 index 00000000000..efe254d31c7 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EE84.s @@ -0,0 +1,13 @@ +/* 8001EE84 0001BDC4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EE88 0001BDC8 7C 08 02 A6 */ mflr r0 +/* 8001EE8C 0001BDCC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EE90 0001BDD0 4B FF F7 19 */ bl fopOvlpM_IsDoingReq__Fv +/* 8001EE94 0001BDD4 2C 03 00 01 */ cmpwi r3, 1 +/* 8001EE98 0001BDD8 38 60 00 00 */ li r3, 0 +/* 8001EE9C 0001BDDC 40 82 00 08 */ bne lbl_8001EEA4 +/* 8001EEA0 0001BDE0 38 60 00 02 */ li r3, 2 +lbl_8001EEA4: +/* 8001EEA4 0001BDE4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EEA8 0001BDE8 7C 08 03 A6 */ mtlr r0 +/* 8001EEAC 0001BDEC 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EEB0 0001BDF0 4E 80 00 20 */ blr \ No newline at end of file diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EEB4.s b/include/f/f_op/f_op_scene_req/asm/func_8001EEB4.s new file mode 100644 index 00000000000..7691c2e2ab5 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EEB4.s @@ -0,0 +1,13 @@ +/* 8001EEB4 0001BDF4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EEB8 0001BDF8 7C 08 02 A6 */ mflr r0 +/* 8001EEBC 0001BDFC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EEC0 0001BE00 4B FF F6 B5 */ bl fopOvlpM_IsDone__Fv +/* 8001EEC4 0001BE04 2C 03 00 01 */ cmpwi r3, 1 +/* 8001EEC8 0001BE08 38 60 00 00 */ li r3, 0 +/* 8001EECC 0001BE0C 40 82 00 08 */ bne lbl_8001EED4 +/* 8001EED0 0001BE10 38 60 00 02 */ li r3, 2 +lbl_8001EED4: +/* 8001EED4 0001BE14 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EED8 0001BE18 7C 08 03 A6 */ mtlr r0 +/* 8001EEDC 0001BE1C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EEE0 0001BE20 4E 80 00 20 */ blr \ No newline at end of file diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EEE4.s b/include/f/f_op/f_op_scene_req/asm/func_8001EEE4.s new file mode 100644 index 00000000000..0c184a5af59 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EEE4.s @@ -0,0 +1,17 @@ +/* 8001EEE4 0001BE24 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EEE8 0001BE28 7C 08 02 A6 */ mflr r0 +/* 8001EEEC 0001BE2C 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EEF0 0001BE30 80 03 00 40 */ lwz r0, 0x40(r3) +/* 8001EEF4 0001BE34 2C 00 00 01 */ cmpwi r0, 1 +/* 8001EEF8 0001BE38 41 82 00 10 */ beq lbl_8001EF08 +/* 8001EEFC 0001BE3C 80 63 00 54 */ lwz r3, 0x54(r3) +/* 8001EF00 0001BE40 48 00 24 59 */ bl fpcEx_SearchByID__FUi +/* 8001EF04 0001BE44 48 00 16 91 */ bl fopScnPause_Disable__FP11scene_class +lbl_8001EF08: +/* 8001EF08 0001BE48 38 00 00 00 */ li r0, 0 +/* 8001EF0C 0001BE4C 90 0D 87 60 */ stw r0, lbl_80450CE0-_SDA_BASE_(r13) +/* 8001EF10 0001BE50 38 60 00 02 */ li r3, 2 +/* 8001EF14 0001BE54 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EF18 0001BE58 7C 08 03 A6 */ mtlr r0 +/* 8001EF1C 0001BE5C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EF20 0001BE60 4E 80 00 20 */ blr diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EF24.s b/include/f/f_op/f_op_scene_req/asm/func_8001EF24.s new file mode 100644 index 00000000000..713b30ab261 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EF24.s @@ -0,0 +1,20 @@ +/* 8001EF24 0001BE64 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EF28 0001BE68 7C 08 02 A6 */ mflr r0 +/* 8001EF2C 0001BE6C 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EF30 0001BE70 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8001EF34 0001BE74 7C 7F 1B 78 */ mr r31, r3 +/* 8001EF38 0001BE78 38 7F 00 68 */ addi r3, r31, 0x68 +/* 8001EF3C 0001BE7C 7F E4 FB 78 */ mr r4, r31 +/* 8001EF40 0001BE80 48 24 77 99 */ bl cPhs_Do__FP30request_of_phase_process_classPv +/* 8001EF44 0001BE84 2C 03 00 02 */ cmpwi r3, 2 +/* 8001EF48 0001BE88 41 82 00 08 */ beq lbl_8001EF50 +/* 8001EF4C 0001BE8C 48 00 00 0C */ b lbl_8001EF58 +lbl_8001EF50: +/* 8001EF50 0001BE90 7F E3 FB 78 */ mr r3, r31 +/* 8001EF54 0001BE94 4B FF FF D1 */ bl fopScnRq_Execute__FP19scene_request_class +lbl_8001EF58: +/* 8001EF58 0001BE98 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8001EF5C 0001BE9C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EF60 0001BEA0 7C 08 03 A6 */ mtlr r0 +/* 8001EF64 0001BEA4 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EF68 0001BEA8 4E 80 00 20 */ blr \ No newline at end of file diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EF6C.s b/include/f/f_op/f_op_scene_req/asm/func_8001EF6C.s new file mode 100644 index 00000000000..ad0f6aad919 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EF6C.s @@ -0,0 +1,18 @@ +/* 8001EF6C 0001BEAC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EF70 0001BEB0 7C 08 02 A6 */ mflr r0 +/* 8001EF74 0001BEB4 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EF78 0001BEB8 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8001EF7C 0001BEBC 7C 7F 1B 78 */ mr r31, r3 +/* 8001EF80 0001BEC0 80 04 00 64 */ lwz r0, 0x64(r4) +/* 8001EF84 0001BEC4 28 00 00 00 */ cmplwi r0, 0 +/* 8001EF88 0001BEC8 41 82 00 10 */ beq lbl_8001EF98 +/* 8001EF8C 0001BECC 48 00 15 BD */ bl fopScnPause_Enable__FP11scene_class +/* 8001EF90 0001BED0 80 7F 00 04 */ lwz r3, 4(r31) +/* 8001EF94 0001BED4 4B FF F5 AD */ bl fopOvlpM_ToldAboutID__FUi +lbl_8001EF98: +/* 8001EF98 0001BED8 38 60 00 01 */ li r3, 1 +/* 8001EF9C 0001BEDC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8001EFA0 0001BEE0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EFA4 0001BEE4 7C 08 03 A6 */ mtlr r0 +/* 8001EFA8 0001BEE8 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EFAC 0001BEEC 4E 80 00 20 */ blr \ No newline at end of file diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EFB0.s b/include/f/f_op/f_op_scene_req/asm/func_8001EFB0.s new file mode 100644 index 00000000000..12a72c82cc4 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EFB0.s @@ -0,0 +1,18 @@ +/* 8001EFB0 0001BEF0 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EFB4 0001BEF4 7C 08 02 A6 */ mflr r0 +/* 8001EFB8 0001BEF8 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EFBC 0001BEFC 80 03 00 64 */ lwz r0, 0x64(r3) +/* 8001EFC0 0001BF00 28 00 00 00 */ cmplwi r0, 0 +/* 8001EFC4 0001BF04 41 82 00 18 */ beq lbl_8001EFDC +/* 8001EFC8 0001BF08 4B FF F6 D1 */ bl fopOvlpM_Cancel__Fv +/* 8001EFCC 0001BF0C 2C 03 00 00 */ cmpwi r3, 0 +/* 8001EFD0 0001BF10 40 82 00 0C */ bne lbl_8001EFDC +/* 8001EFD4 0001BF14 38 60 00 00 */ li r3, 0 +/* 8001EFD8 0001BF18 48 00 00 08 */ b lbl_8001EFE0 +lbl_8001EFDC: +/* 8001EFDC 0001BF1C 38 60 00 01 */ li r3, 1 +lbl_8001EFE0: +/* 8001EFE0 0001BF20 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001EFE4 0001BF24 7C 08 03 A6 */ mtlr r0 +/* 8001EFE8 0001BF28 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001EFEC 0001BF2C 4E 80 00 20 */ blr diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001EFF0.s b/include/f/f_op/f_op_scene_req/asm/func_8001EFF0.s new file mode 100644 index 00000000000..d24d01bd06b --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001EFF0.s @@ -0,0 +1,18 @@ +/* 8001EFF0 0001BF30 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001EFF4 0001BF34 7C 08 02 A6 */ mflr r0 +/* 8001EFF8 0001BF38 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001EFFC 0001BF3C 38 A0 00 00 */ li r5, 0 +/* 8001F000 0001BF40 80 0D 87 60 */ lwz r0, lbl_80450CE0-_SDA_BASE_(r13) +/* 8001F004 0001BF44 2C 00 00 00 */ cmpwi r0, 0 +/* 8001F008 0001BF48 40 82 00 18 */ bne lbl_8001F020 +/* 8001F00C 0001BF4C 4B FF F5 F9 */ bl fopOvlpM_Request__FsUs +/* 8001F010 0001BF50 7C 65 1B 79 */ or. r5, r3, r3 +/* 8001F014 0001BF54 41 82 00 0C */ beq lbl_8001F020 +/* 8001F018 0001BF58 38 00 00 01 */ li r0, 1 +/* 8001F01C 0001BF5C 90 0D 87 60 */ stw r0, lbl_80450CE0-_SDA_BASE_(r13) +lbl_8001F020: +/* 8001F020 0001BF60 7C A3 2B 78 */ mr r3, r5 +/* 8001F024 0001BF64 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001F028 0001BF68 7C 08 03 A6 */ mtlr r0 +/* 8001F02C 0001BF6C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001F030 0001BF70 4E 80 00 20 */ blr diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001F034.s b/include/f/f_op/f_op_scene_req/asm/func_8001F034.s new file mode 100644 index 00000000000..58eb0d30483 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001F034.s @@ -0,0 +1,53 @@ +/* 8001F034 0001BF74 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8001F038 0001BF78 7C 08 02 A6 */ mflr r0 +/* 8001F03C 0001BF7C 90 01 00 24 */ stw r0, 0x24(r1) +/* 8001F040 0001BF80 39 61 00 20 */ addi r11, r1, 0x20 +/* 8001F044 0001BF84 48 34 31 8D */ bl _savegpr_26 +/* 8001F048 0001BF88 7C 6B 1B 78 */ mr r11, r3 +/* 8001F04C 0001BF8C 7C 8A 23 78 */ mr r10, r4 +/* 8001F050 0001BF90 7C A9 2B 78 */ mr r9, r5 +/* 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 +/* 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 +/* 8001F074 0001BFB4 7D 64 5B 78 */ mr r4, r11 +/* 8001F078 0001BFB8 7D 45 53 78 */ mr r5, r10 +/* 8001F07C 0001BFBC 7D 26 4B 78 */ mr r6, r9 +/* 8001F080 0001BFC0 7C 07 03 78 */ mr r7, r0 +/* 8001F084 0001BFC4 39 1F 00 00 */ addi r8, r31, 0 +/* 8001F088 0001BFC8 48 00 3F 61 */ bl fpcNdRq_Request__FUliP18process_node_classsPvP32node_create_request_method_class +/* 8001F08C 0001BFCC 7C 7C 1B 79 */ or. r28, r3, r3 +/* 8001F090 0001BFD0 40 82 00 0C */ bne lbl_8001F09C +/* 8001F094 0001BFD4 38 60 FF FF */ li r3, -1 +/* 8001F098 0001BFD8 48 00 00 4C */ b lbl_8001F0E4 +lbl_8001F09C: +/* 8001F09C 0001BFDC 7F 40 07 34 */ extsh r0, r26 +/* 8001F0A0 0001BFE0 2C 00 7F FF */ cmpwi r0, 0x7fff +/* 8001F0A4 0001BFE4 41 82 00 2C */ beq lbl_8001F0D0 +/* 8001F0A8 0001BFE8 3B BF 00 30 */ addi r29, r31, 0x30 +/* 8001F0AC 0001BFEC 7F 43 D3 78 */ mr r3, r26 +/* 8001F0B0 0001BFF0 7F 64 DB 78 */ mr r4, r27 +/* 8001F0B4 0001BFF4 4B FF FF 3D */ bl fopScnRq_FadeRequest__FsUs +/* 8001F0B8 0001BFF8 7C 7E 1B 79 */ or. r30, r3, r3 +/* 8001F0BC 0001BFFC 40 82 00 14 */ bne lbl_8001F0D0 +/* 8001F0C0 0001C000 7F 83 E3 78 */ mr r3, r28 +/* 8001F0C4 0001C004 48 00 39 79 */ bl fpcNdRq_Delete__FP19node_create_request +/* 8001F0C8 0001C008 38 60 FF FF */ li r3, -1 +/* 8001F0CC 0001C00C 48 00 00 18 */ b lbl_8001F0E4 +lbl_8001F0D0: +/* 8001F0D0 0001C010 93 DC 00 64 */ stw r30, 0x64(r28) +/* 8001F0D4 0001C014 38 7C 00 68 */ addi r3, r28, 0x68 +/* 8001F0D8 0001C018 7F A4 EB 78 */ mr r4, r29 +/* 8001F0DC 0001C01C 48 24 75 55 */ bl cPhs_Set__FP30request_of_phase_process_classPPFPv_i +/* 8001F0E0 0001C020 80 7C 00 44 */ lwz r3, 0x44(r28) +lbl_8001F0E4: +/* 8001F0E4 0001C024 39 61 00 20 */ addi r11, r1, 0x20 +/* 8001F0E8 0001C028 48 34 31 35 */ bl _restgpr_26 +/* 8001F0EC 0001C02C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8001F0F0 0001C030 7C 08 03 A6 */ mtlr r0 +/* 8001F0F4 0001C034 38 21 00 20 */ addi r1, r1, 0x20 +/* 8001F0F8 0001C038 4E 80 00 20 */ blr diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001F0FC.s b/include/f/f_op/f_op_scene_req/asm/func_8001F0FC.s new file mode 100644 index 00000000000..ce3cc59bc43 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001F0FC.s @@ -0,0 +1,8 @@ +/* 8001F0FC 0001C03C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001F100 0001C040 7C 08 02 A6 */ mflr r0 +/* 8001F104 0001C044 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001F108 0001C048 48 00 40 09 */ bl fpcNdRq_ReRequest__FUisPv +/* 8001F10C 0001C04C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001F110 0001C050 7C 08 03 A6 */ mtlr r0 +/* 8001F114 0001C054 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001F118 0001C058 4E 80 00 20 */ blr diff --git a/include/f/f_op/f_op_scene_req/asm/func_8001F11C.s b/include/f/f_op/f_op_scene_req/asm/func_8001F11C.s new file mode 100644 index 00000000000..be0b9ae4dd6 --- /dev/null +++ b/include/f/f_op/f_op_scene_req/asm/func_8001F11C.s @@ -0,0 +1,8 @@ +/* 8001F11C 0001C05C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8001F120 0001C060 7C 08 02 A6 */ mflr r0 +/* 8001F124 0001C064 90 01 00 14 */ stw r0, 0x14(r1) +/* 8001F128 0001C068 48 00 39 D5 */ bl fpcNdRq_Handler__Fv +/* 8001F12C 0001C06C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8001F130 0001C070 7C 08 03 A6 */ mtlr r0 +/* 8001F134 0001C074 38 21 00 10 */ addi r1, r1, 0x10 +/* 8001F138 0001C078 4E 80 00 20 */ blr diff --git a/ldscript.lcf b/ldscript.lcf index 22e174ef58e..433ac871146 100644 --- a/ldscript.lcf +++ b/ldscript.lcf @@ -3272,6 +3272,23 @@ fopKyM_create__FsiP4cXyzP4cXyzPFPv_i fopKyM_fastCreate__FsiP4cXyzP4cXyzPFPv_i fopKyM_createWpillar__FPC4cXyzfi fopKyM_createMpillar__FPC4cXyzf +fopScnRq_phase_Execute__FP19scene_request_class +fopScnRq_phase_IsDoingOverlap__FP19scene_request_class +fopScnRq_phase_IsDoneOverlap__FP19scene_request_class +fopScnRq_phase_Done__FP19scene_request_class +fopScnRq_Execute__FP19scene_request_class +fopScnRq_PostMethod__FPvP19scene_request_class +fopScnRq_Cancel__FP19scene_request_class +fopScnRq_FadeRequest__FsUs +fopScnRq_Request__FiP11scene_classsPvsUs +fopScnRq_ReRequest__FUisPv +fopScnRq_Handler__Fv +func_8001EFB0 +func_8001EF6C +func_8001EEE4 +func_8001EEB4 +func_8001EE84 +func_8001EE64 } /* .init 80003100 - 80005600 diff --git a/obj_files.mk b/obj_files.mk index d4235a89c3f..fdb0201e7c9 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -63,7 +63,7 @@ TEXT_O_FILES := \ $(BUILD_DIR)/src/f/f_op/f_op_scene.o \ $(BUILD_DIR)/src/f/f_op/f_op_scene_iter.o \ $(BUILD_DIR)/src/f/f_op/f_op_scene_mng.o \ - $(BUILD_DIR)/asm/f/op/scene/f_op_scene_req.o \ + $(BUILD_DIR)/src/f/f_op/f_op_scene_req.o \ $(BUILD_DIR)/src/f/f_op/f_op_scene_tag.o \ $(BUILD_DIR)/src/f/f_op/f_op_view.o \ $(BUILD_DIR)/src/f/f_op/f_op_kankyo.o \ diff --git a/src/f/f_op/f_op_overlap.cpp b/src/f/f_op/f_op_overlap.cpp index 41300d04e7b..4a020be505f 100644 --- a/src/f/f_op/f_op_overlap.cpp +++ b/src/f/f_op/f_op_overlap.cpp @@ -32,7 +32,22 @@ void fopOvlp_Delete(void* param_1) { fpcMtd_Delete((process_method_class*)((int*)param_1)[0x30], param_1); } +// register scheduling +#ifdef NON_MATCHING +void fopOvlp_Create(void* param_1) { + request_base_class* pReqBase = (request_base_class*)param_1; + if (!pReqBase->field_0xc) { + int* tmp = pReqBase->field_0x10; + request_base_class* tmp2 = (request_base_class*)&pReqBase->field_0xc4; + cReq_Create(tmp2, 1); + pReqBase->field_0xc0 = tmp[9]; + pReqBase->field_0xc8 = (u32*)-1; + } + fpcMtd_Create((process_method_class*)pReqBase->field_0xc0, param_1); +} +#else asm void fopOvlp_Create(void* param_1) { nofralloc #include "f/f_op/f_op_overlap/asm/func_8001E41C.s" } +#endif diff --git a/src/f/f_op/f_op_scene_req.cpp b/src/f/f_op/f_op_scene_req.cpp index 0024f2a0ccf..75da798488c 100644 --- a/src/f/f_op/f_op_scene_req.cpp +++ b/src/f/f_op/f_op_scene_req.cpp @@ -1,13 +1,14 @@ -/* f_op_scene_req.cpp autogenerated by split.py v0.4 at 2021-02-15 20:29:06.358849 */ +/* f_op_scene_req.cpp autogenerated by split.py v0.4 at 2021-03-20 21:43:05.095943 */ -#include "SComponent/c_phase.h" -#include "f/f_pc/f_pc_manager.h" -#include "f/f_pc/f_pc_node.h" +#include "f/f_op/f_op_scene_req.h" +#include "f/f_op/f_op_overlap_mng.h" #include "global.h" // additional symbols needed for f_op_scene_req.cpp -// autogenerated by split.py v0.4 at 2021-02-15 20:29:06.358877 +// 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); @@ -21,9 +22,15 @@ 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(void); -void fopScnRq_Request(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 fpcNdRq_Request__FUliP18process_node_classsPvP32node_create_request_method_class(void); void func_8001EE64(void); void func_8001EE84(void); void func_8001EEB4(void); @@ -33,92 +40,72 @@ void func_8001EFB0(void); } // additional symbols needed for f_op_scene_req.cpp -// autogenerated by split.py v0.4 at 2021-02-15 20:29:06.358882 +// autogenerated by split.py v0.4 at 2021-03-20 21:43:05.095976 extern u8 lbl_803A38C8; extern u8 lbl_80450CE0; -extern "C" { -// fopScnRq_phase_ClearOverlap__FP19scene_request_class -// fopScnRq_phase_ClearOverlap__FP19scene_request_class(scene_request_class*) -asm void fopScnRq_phase_ClearOverlap__FP19scene_request_class(void) { - nofralloc -#include "f/f_op/f_op_scene_req/asm/func_8001EE34.s" +scene_request_class* fopScnRq_phase_ClearOverlap(scene_request_class* param_1) { + param_1 = 0; + + if (fopOvlpM_ClearOfReq() == 1) { + param_1 = (scene_request_class*)2; + return param_1; + } + + return param_1; } -// fopScnRq_phase_Execute__FP19scene_request_class -// fopScnRq_phase_Execute(scene_request_class*) -asm void func_8001EE64(void) { +asm void fopScnRq_phase_Execute(scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EE64.s" } -// fopScnRq_phase_IsDoingOverlap__FP19scene_request_class -// fopScnRq_phase_IsDoingOverlap(scene_request_class*) -asm void func_8001EE84(void) { +asm void fopScnRq_phase_IsDoingOverlap(scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EE84.s" } -// fopScnRq_phase_IsDoneOverlap__FP19scene_request_class -// fopScnRq_phase_IsDoneOverlap(scene_request_class*) -asm void func_8001EEB4(void) { +asm void fopScnRq_phase_IsDoneOverlap(scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EEB4.s" } -// fopScnRq_phase_Done__FP19scene_request_class -// fopScnRq_phase_Done(scene_request_class*) -asm void func_8001EEE4(void) { +asm void fopScnRq_phase_Done(scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EEE4.s" } -// fopScnRq_Execute__FP19scene_request_class -// fopScnRq_Execute__FP19scene_request_class(scene_request_class*) -asm void fopScnRq_Execute__FP19scene_request_class(void) { +asm void fopScnRq_Execute(scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EF24.s" } -// fopScnRq_PostMethod__FPvP19scene_request_class -// fopScnRq_PostMethod(void*, scene_request_class*) -asm void func_8001EF6C(void) { +asm void fopScnRq_PostMethod(void*, scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EF6C.s" } -// fopScnRq_Cancel__FP19scene_request_class -// fopScnRq_Cancel(scene_request_class*) -asm void func_8001EFB0(void) { +asm void fopScnRq_Cancel(scene_request_class*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EFB0.s" } -// fopScnRq_FadeRequest__FsUs -// fopScnRq_FadeRequest__FsUs(s16, u16) -asm void fopScnRq_FadeRequest__FsUs(void) { +asm void fopScnRq_FadeRequest(s16, u16) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001EFF0.s" } -// fopScnRq_Request__FiP11scene_classsPvsUs -// fopScnRq_Request(int, scene_class*, s16, void*, s16, u16) -asm void fopScnRq_Request(void) { +asm u32 fopScnRq_Request(int, scene_class*, s16, void*, s16, u16) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001F034.s" } -// fopScnRq_ReRequest__FUisPv -// fopScnRq_ReRequest(unsigned int, s16, void*) -asm void fopScnRq_ReRequest(void) { +asm u32 fopScnRq_ReRequest(unsigned int, s16, void*) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001F0FC.s" } -// fopScnRq_Handler__Fv -// fopScnRq_Handler__Fv(void) -asm void fopScnRq_Handler__Fv(void) { +asm void fopScnRq_Handler(void) { nofralloc #include "f/f_op/f_op_scene_req/asm/func_8001F11C.s" -} -}; +} \ No newline at end of file