f_op_scene_pause OK

This commit is contained in:
Pheenoh 2021-02-16 15:47:00 -05:00
parent d06ba53d39
commit 1876efc170
No known key found for this signature in database
GPG Key ID: 4312662758CE7D5A
2 changed files with 37 additions and 29 deletions

View File

@ -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);

View File

@ -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;
}
};