Files
dusklight/src/f/f_pc/f_pc_draw.cpp
T
lepelog 0555115de8 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
2020-12-31 15:12:29 -05:00

42 lines
1.1 KiB
C++

#include "f/f_pc/f_pc_draw.h"
#include "f/f_pc/f_pc_layer.h"
#include "f/f_pc/f_pc_pause.h"
// f_pc_leaf::g_fpcLf_type
extern s32 lbl_80450D30;
typedef s32 (*cNdIt_MethodFuncFunc)(cNdIt_MethodFunc);
extern "C" {
extern void cAPIGph_AfterOfDraw(void);
extern void cAPIGph_BeforeOfDraw(void);
s32 fpcDw_Execute(base_process_class* pProc) {
if (!fpcPause_IsEnable(pProc, 2)) {
layer_class* curLay;
s32 ret;
process_method_func func;
curLay = fpcLy_CurrentLayer();
if (fpcBs_Is_JustOfType(lbl_80450D30, pProc->mSubType)) {
func = ((nodedraw_method_class*)pProc->mpPcMtd)->mNodedrawFunc;
} else {
func = ((nodedraw_method_class*)pProc->mpPcMtd)->mNodedrawFunc;
}
fpcLy_SetCurrentLayer(pProc->mLyTg.mpLayer);
ret = func(pProc);
fpcLy_SetCurrentLayer(curLay);
return ret;
} else {
return 0;
}
}
s32 fpcDw_Handler(cNdIt_MethodFuncFunc param_1, cNdIt_MethodFunc param_2) {
s32 ret;
cAPIGph_BeforeOfDraw();
ret = param_1(param_2);
cAPIGph_AfterOfDraw();
return ret;
}
}