summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPheenoh <pheenoh@gmail.com>2021-02-16 15:47:00 -0500
committerPheenoh <pheenoh@gmail.com>2021-02-16 15:47:00 -0500
commit1876efc170abf0b2b028be9de2ad1d499fbed672 (patch)
treeff242f75d115b83e6d8dd1d31b601f3ecce6bbaa
parentd06ba53d39e2d696faaf134de818e996f4d0ba75 (diff)
f_op_scene_pause OK
-rw-r--r--include/f/f_op/f_op_scene_pause.h12
-rw-r--r--src/f/f_op/f_op_scene_pause.cpp54
2 files changed, 37 insertions, 29 deletions
diff --git a/include/f/f_op/f_op_scene_pause.h b/include/f/f_op/f_op_scene_pause.h
index d7a4edf28c..98d3a84c57 100644
--- a/include/f/f_op/f_op_scene_pause.h
+++ b/include/f/f_op/f_op_scene_pause.h
@@ -1,7 +1,13 @@
-#ifndef F_F_FOP_SCENE_PAUSE_H_
-#define F_F_FOP_SCENE_PAUSE_H_
+#ifndef F_F_OP_SCENE_PAUSE_H_
+#define F_F_OP_SCENE_PAUSE_H_
-struct scene_class;
+#include "dolphin/types.h"
+
+class scene_class {
+public:
+ /* 0x00 */ u8 field_0x00[0x2c];
+ /* 0x2C */ int* field_0x2C;
+};
int fopScnPause_Enable(scene_class* pScene);
int fopScnPause_Disable(scene_class* pScene);
diff --git a/src/f/f_op/f_op_scene_pause.cpp b/src/f/f_op/f_op_scene_pause.cpp
index 06fbb53f1e..8b9c4defd7 100644
--- a/src/f/f_op/f_op_scene_pause.cpp
+++ b/src/f/f_op/f_op_scene_pause.cpp
@@ -1,33 +1,35 @@
-/* f_op_scene_pause.cpp autogenerated by split.py v0.4 at 2021-02-15 20:28:00.829529 */
-
+#include "f/f_op/f_op_scene_pause.h"
+#include "f/f_pc/f_pc_executor.h"
+#include "f/f_pc/f_pc_manager.h"
#include "global.h"
-// additional symbols needed for f_op_scene_pause.cpp
-// autogenerated by split.py v0.4 at 2021-02-15 20:28:00.829561
-extern "C" {
-void fopScnPause_Disable__FP11scene_class(void);
-void fopScnPause_Enable__FP11scene_class(void);
-void fpcEx_IsExist(void);
-void fpcM_IsPause(void);
-void fpcM_PauseDisable(void);
-void fpcM_PauseEnable(void);
+int fopScnPause_Enable(scene_class* pScene) {
+ if (pScene) {
+ fpcM_PauseEnable(pScene, 1);
+ fpcM_PauseEnable(pScene, 2);
+ return 1;
+ }
+ return 0;
}
-// additional symbols needed for f_op_scene_pause.cpp
-// autogenerated by split.py v0.4 at 2021-02-15 20:28:00.829565
+// some of this will need to be changed once scene_class is properly mapped
+int fopScnPause_Disable(scene_class* pScene) {
+ if (pScene) {
+ void* tmp = (void*)pScene->field_0x2C[6];
-extern "C" {
-// fopScnPause_Enable__FP11scene_class
-// fopScnPause_Enable(scene_class*)
-asm void fopScnPause_Enable__FP11scene_class(void) {
- nofralloc
-#include "f/f_op/f_op_scene_pause/asm/func_80020548.s"
-}
+ if (!tmp) {
+ fpcM_PauseDisable(pScene, 1);
+ fpcM_PauseDisable(pScene, 2);
+ } else if (fpcEx_IsExist((s32)((int*)tmp)[1]) == 1) {
+ if (!fpcM_IsPause(tmp, 1)) {
+ fpcM_PauseDisable(pScene, 1);
+ }
-// fopScnPause_Disable__FP11scene_class
-// fopScnPause_Disable(scene_class*)
-asm void fopScnPause_Disable__FP11scene_class(void) {
- nofralloc
-#include "f/f_op/f_op_scene_pause/asm/func_80020594.s"
+ if (!fpcM_IsPause(tmp, 2)) {
+ fpcM_PauseDisable(pScene, 2);
+ }
+ }
+ return 1;
+ }
+ return 0;
}
-};