mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07: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:
+132
-1
@@ -1 +1,132 @@
|
||||
// ok
|
||||
#include "f/f_pc/f_pc_manager.h"
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "d/d_com/d_com_inf_game/d_com_inf_game.h"
|
||||
#include "d/d_lib/d_lib.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_creator.h"
|
||||
#include "f/f_pc/f_pc_delete_tag.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_line.h"
|
||||
#include "f/f_pc/f_pc_line_iter.h"
|
||||
#include "f/f_pc/f_pc_line_tag.h"
|
||||
#include "f/f_pc/f_pc_method.h"
|
||||
#include "f/f_pc/f_pc_node_req.h"
|
||||
#include "f/f_pc/f_pc_pause.h"
|
||||
#include "f/f_pc/f_pc_priority.h"
|
||||
#include "f/f_pc/f_pc_profile.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern u8 lbl_80450D38;
|
||||
extern s8 lbl_80450D39;
|
||||
extern u8 lbl_80450EC4;
|
||||
extern layer_class lbl_803F4DB0; // f_pc_manager::rootlayer$3716
|
||||
extern node_list_class lbl_803F4DDC; // f_pc_manager::queue$3717
|
||||
|
||||
extern void fpcDw_Execute(base_process_class* pProc);
|
||||
extern void fpcDw_Handler(void*, void*);
|
||||
extern base_process_class* fpcFCtRq_Request(layer_class* pLayer, s16 pProcTypeID,
|
||||
FastCreateReqFunc param_3, void* param_4, void* pData);
|
||||
extern void* fpcCtIt_JudgeInLayer(u32 pLayerID, cNdIt_MethodFunc pFunc, void* pUserData);
|
||||
|
||||
void fpcM_Draw(void* pProc) {
|
||||
fpcDw_Execute((base_process_class*)pProc);
|
||||
}
|
||||
|
||||
s32 fpcM_DrawIterater(cNdIt_MethodFunc pFunc) {
|
||||
return fpcLyIt_OnlyHere(fpcLy_RootLayer(), pFunc, NULL);
|
||||
}
|
||||
|
||||
void fpcM_Execute(void* pProc) {
|
||||
fpcEx_Execute((base_process_class*)pProc);
|
||||
}
|
||||
|
||||
void fpcM_Delete(void* pProc) {
|
||||
fpcDt_Delete((base_process_class*)pProc);
|
||||
}
|
||||
|
||||
BOOL fpcM_IsCreating(u32 pID) {
|
||||
return fpcCt_IsCreatingByID(pID);
|
||||
}
|
||||
|
||||
typedef void (*fpcM_ManagementFunc)(void);
|
||||
void fpcM_Management(fpcM_ManagementFunc pFunc1, fpcM_ManagementFunc pFunc2) {
|
||||
MtxInit();
|
||||
dDlst_peekZ_c_NS_peekData(&g_dComIfG_gameInfo.draw_list_list.dlstPeekZ);
|
||||
if (!dShutdownErrorMsg_c_NS_execute()) {
|
||||
if (lbl_80450D39 == 0) {
|
||||
lbl_80450D38 = 0;
|
||||
lbl_80450D39 = 1;
|
||||
}
|
||||
if (!dDvdErrorMsg_c_NS_execute()) {
|
||||
if (lbl_80450D38 != 0) {
|
||||
dLib_time_c::startTime();
|
||||
Z2SoundMgr_NS_pauseAllGameSound(lbl_80450B60, false);
|
||||
lbl_80450D38 = 0;
|
||||
}
|
||||
cAPIGph_Painter();
|
||||
if ((lbl_80450EC4 & 1) == 0) {
|
||||
fpcDt_Handler();
|
||||
} else {
|
||||
lbl_80450EC4 &= ~1;
|
||||
}
|
||||
fpcPi_Handler();
|
||||
fpcCt_Handler();
|
||||
if (pFunc1 != NULL) {
|
||||
pFunc1();
|
||||
}
|
||||
fpcEx_Handler((cNdIt_MethodFunc)fpcM_Execute);
|
||||
fpcDw_Handler((void*)fpcM_DrawIterater, fpcM_Draw);
|
||||
if (pFunc2 != NULL) {
|
||||
pFunc2();
|
||||
}
|
||||
dComIfG_play_c_NS_drawSimpleModel(&g_dComIfG_gameInfo.play);
|
||||
} else if (lbl_80450D38 == 0) {
|
||||
dLib_time_c::stopTime();
|
||||
Z2SoundMgr_NS_pauseAllGameSound(lbl_80450B60, true);
|
||||
lbl_803DD2D8[0]->stopPatternedRumble();
|
||||
lbl_80450D38 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fpcM_Init(void) {
|
||||
fpcLy_Create(&lbl_803F4DB0, NULL, &lbl_803F4DDC, 10);
|
||||
fpcLn_Create();
|
||||
}
|
||||
|
||||
base_process_class* fpcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3,
|
||||
void* pData) {
|
||||
return fpcFCtRq_Request(fpcLy_CurrentLayer(), pProcTypeID, param_2, param_3, pData);
|
||||
}
|
||||
|
||||
s32 fpcM_IsPause(void* pProc, u8 param_2) {
|
||||
return fpcPause_IsEnable((base_process_class*)pProc, param_2 & 0xFF);
|
||||
}
|
||||
|
||||
void fpcM_PauseEnable(void* pProc, u8 param_2) {
|
||||
fpcPause_Enable((process_node_class*)pProc, param_2 & 0xFF);
|
||||
}
|
||||
|
||||
void fpcM_PauseDisable(void* pProc, u8 param_2) {
|
||||
fpcPause_Disable((process_node_class*)pProc, param_2 & 0xFF);
|
||||
}
|
||||
|
||||
void* fpcM_JudgeInLayer(u32 pLayerID, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_class* layer = fpcLy_Layer(pLayerID);
|
||||
if (layer != NULL) {
|
||||
void* ret = fpcCtIt_JudgeInLayer(pLayerID, pFunc, pUserData);
|
||||
if (ret == NULL) {
|
||||
ret = fpcLyIt_Judge(layer, pFunc, pUserData);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user