mirror of
https://github.com/zeldaret/tp
synced 2026-06-11 05:08:39 -04:00
A few f_pc files (#26)
* f_pc_base, one non matching * some of f_pc_manager * f_pc_node OK * f_pc_pause partly * started node_req * more progress * most of node req * delete unused asm * node req header and param names * param renaming * header for manager * review comment struct names * fpcM_Management OK * int -> s32 * merge master * most of f_pc_create_iter * f_pc_stdcreate_req OK * f_pc_fstcreate OK * f_pc_leaf OK * f_pc_draw OK * f_pc_deletor partly * fix parameter type in f_pc_pause * review * review, use cPh enum and fix process_profile_definition struct * convert f_pc files to C * matched more functions * fix global.h * fix variable types * format * mpre Phs enum * fix merge errors * fix gamepad stopPatternedRumble * format * delete leftover files from merge * move asm to correct folder * revert f_pc from C to CPP * remove C hacks and format * format * OK
This commit is contained in:
+11
-13
@@ -4,25 +4,25 @@
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_node.h"
|
||||
|
||||
// f_pc_node::g_fpcNd_type
|
||||
extern s32 lbl_80450D40;
|
||||
|
||||
extern "C" {
|
||||
|
||||
// f_pc_node::g_fpcNd_type
|
||||
extern int lbl_80450D40;
|
||||
|
||||
#if NON_MATCHING
|
||||
bool fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
#ifdef NON_MATCHING
|
||||
s32 fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
// extra addic/subfe?
|
||||
return (pProc->mPauseFlag & flag) == flag;
|
||||
}
|
||||
#else
|
||||
asm bool fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
asm s32 fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
nofralloc
|
||||
#include "f/f_pc/f_pc_pause/asm/func_80023844.s"
|
||||
#include "f/f_pc/asm/80023844.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
int fpcPause_Enable(void* pProcess, u8 flag) {
|
||||
s32 fpcPause_Enable(void* pProcess, u8 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag |= flag;
|
||||
|
||||
@@ -33,15 +33,13 @@ int fpcPause_Enable(void* pProcess, u8 flag) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// According to symbols, they used u8 instead of u32, but I can't get a match with u8 here. This is
|
||||
// the best I got...
|
||||
int fpcPause_Disable(void* pProcess, u32 flag) {
|
||||
s32 fpcPause_Disable(void* pProcess, u8 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag &= (0xFF - flag) & 0xFF;
|
||||
|
||||
if (fpcBs_Is_JustOfType(lbl_80450D40, pProc->mSubType)) {
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Disable, (void*)(flag & 0xFF));
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Disable, (void*)flag);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -51,4 +49,4 @@ void fpcPause_Init(void* pProcess) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user