From f5e3ba086845ea80f96b0b18f22ce2d3d788f5f6 Mon Sep 17 00:00:00 2001 From: Pheenoh Date: Sat, 20 Mar 2021 20:16:42 -0400 Subject: [PATCH] fopScnRq_Cancel OK --- include/f/f_op/f_op_overlap_mng.h | 1 + src/f/f_op/f_op_scene_req.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/f/f_op/f_op_overlap_mng.h b/include/f/f_op/f_op_overlap_mng.h index c8f5c0bf379..b8a0f9a21cf 100644 --- a/include/f/f_op/f_op_overlap_mng.h +++ b/include/f/f_op/f_op_overlap_mng.h @@ -21,5 +21,6 @@ int fopOvlpM_IsDone(void); int fopOvlpM_IsDoingReq(void); int fopOvlpM_ClearOfReq(void); request_base_class* fopOvlpM_Request(s16 param_1, u16 param_2); +int fopOvlpM_Cancel(void); #endif \ No newline at end of file diff --git a/src/f/f_op/f_op_scene_req.cpp b/src/f/f_op/f_op_scene_req.cpp index 84cd018f367..335dc5d2133 100644 --- a/src/f/f_op/f_op_scene_req.cpp +++ b/src/f/f_op/f_op_scene_req.cpp @@ -107,9 +107,13 @@ int fopScnRq_PostMethod(void* param_1, scene_request_class* pScnRq) { return 1; } -asm void fopScnRq_Cancel(scene_request_class*) { - nofralloc -#include "f/f_op/f_op_scene_req/asm/func_8001EFB0.s" +int fopScnRq_Cancel(scene_request_class* pScnRq) { + + if (pScnRq->mFadeRequest && !fopOvlpM_Cancel()) { + return 0; + } + + return 1; } asm void fopScnRq_FadeRequest(s16, u16) {