mirror of
https://github.com/zeldaret/tp
synced 2026-09-07 19:20:58 -04:00
run clang-format
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "f/f_op/f_op_actor_tag.h"
|
||||
#include "global.h"
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// f_op_actor_tag::g_fopAcTg_Queue
|
||||
extern node_list_class lbl_803A35E0;
|
||||
@@ -19,5 +19,4 @@ u32 fopAcTg_Init(create_tag_class* pTag, void* data) {
|
||||
cTg_Create(pTag, data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,43 +4,38 @@
|
||||
#include "SComponent/c_phase.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_create_iter.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_method.h"
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcCtRq_isCreatingByID(create_tag *pTag, int *pId)
|
||||
{
|
||||
create_request *pReq = (create_request *) (pTag->mpTagData);
|
||||
bool fpcCtRq_isCreatingByID(create_tag* pTag, int* pId) {
|
||||
create_request* pReq = (create_request*)(pTag->mpTagData);
|
||||
return pReq->mBsPcId == *pId;
|
||||
}
|
||||
|
||||
bool fpcCtRq_IsCreatingByID(unsigned int id)
|
||||
{
|
||||
return fpcCtIt_Judge((cNdIt_JudgeFunc) fpcCtRq_isCreatingByID, &id) != NULL;
|
||||
bool fpcCtRq_IsCreatingByID(unsigned int id) {
|
||||
return fpcCtIt_Judge((cNdIt_JudgeFunc)fpcCtRq_isCreatingByID, &id) != NULL;
|
||||
}
|
||||
|
||||
void fpcCtRq_CreateQTo(create_request *pReq)
|
||||
{
|
||||
void fpcCtRq_CreateQTo(create_request* pReq) {
|
||||
fpcCtTg_CreateQTo(pReq);
|
||||
fpcLy_CreatedMesg(pReq->mpLayer);
|
||||
fpcLy_CancelQTo(&pReq->mMtdTg);
|
||||
}
|
||||
|
||||
void fpcCtRq_ToCreateQ(create_request *pReq)
|
||||
{
|
||||
void fpcCtRq_ToCreateQ(create_request* pReq) {
|
||||
fpcLy_CreatingMesg(pReq->mpLayer);
|
||||
fpcLy_ToCancelQ(pReq->mpLayer, &pReq->mMtdTg);
|
||||
fpcCtTg_ToCreateQ(pReq);
|
||||
}
|
||||
|
||||
extern void cMl_NS_free(void *pPtr);
|
||||
extern void cMl_NS_free(void* pPtr);
|
||||
|
||||
#if NON_MATCHING
|
||||
bool fpcCtRq_Delete(create_request *pReq)
|
||||
{
|
||||
bool fpcCtRq_Delete(create_request* pReq) {
|
||||
fpcCtRq_CreateQTo(pReq);
|
||||
if (pReq->mpCtRqMtd != NULL) {
|
||||
// flow control
|
||||
@@ -56,49 +51,64 @@ bool fpcCtRq_Delete(create_request *pReq)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
asm bool fpcCtRq_Delete(create_request *pReq)
|
||||
{
|
||||
asm bool fpcCtRq_Delete(create_request* pReq) {
|
||||
nofralloc
|
||||
/* 80020BA0 0001DAE0 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||
/* 80020BA4 0001DAE4 7C 08 02 A6 */ mflr r0
|
||||
/* 80020BA8 0001DAE8 90 01 00 14 */ stw r0, 0x14(r1)
|
||||
/* 80020BAC 0001DAEC 93 E1 00 0C */ stw r31, 0xc(r1)
|
||||
/* 80020BB0 0001DAF0 7C 7F 1B 78 */ mr r31, r3
|
||||
/* 80020BB4 0001DAF4 4B FF FF 6D */ bl fpcCtRq_CreateQTo
|
||||
/* 80020BB8 0001DAF8 80 7F 00 34 */ lwz r3, 0x34(r31)
|
||||
/* 80020BBC 0001DAFC 28 03 00 00 */ cmplwi r3, 0
|
||||
/* 80020BC0 0001DB00 41 82 00 20 */ beq lbl_80020BE0
|
||||
/* 80020BC4 0001DB04 80 63 00 08 */ lwz r3, 8(r3)
|
||||
/* 80020BC8 0001DB08 7F E4 FB 78 */ mr r4, r31
|
||||
/* 80020BCC 0001DB0C 48 00 18 5D */ bl fpcMtd_Method
|
||||
/* 80020BD0 0001DB10 2C 03 00 00 */ cmpwi r3, 0
|
||||
/* 80020BD4 0001DB14 40 82 00 0C */ bne lbl_80020BE0
|
||||
/* 80020BD8 0001DB18 38 60 00 00 */ li r3, 0
|
||||
/* 80020BDC 0001DB1C 48 00 00 24 */ b lbl_80020C00
|
||||
lbl_80020BE0:
|
||||
/* 80020BE0 0001DB20 80 7F 00 40 */ lwz r3, 0x40(r31)
|
||||
/* 80020BE4 0001DB24 28 03 00 00 */ cmplwi r3, 0
|
||||
/* 80020BE8 0001DB28 41 82 00 0C */ beq lbl_80020BF4
|
||||
/* 80020BEC 0001DB2C 38 00 00 00 */ li r0, 0
|
||||
/* 80020BF0 0001DB30 90 03 00 14 */ stw r0, 0x14(r3)
|
||||
lbl_80020BF4:
|
||||
/* 80020BF4 0001DB34 7F E3 FB 78 */ mr r3, r31
|
||||
/* 80020BF8 0001DB38 48 24 26 69 */ bl cMl_NS_free
|
||||
/* 80020BFC 0001DB3C 38 60 00 01 */ li r3, 1
|
||||
lbl_80020C00:
|
||||
/* 80020C00 0001DB40 83 E1 00 0C */ lwz r31, 0xc(r1)
|
||||
/* 80020C04 0001DB44 80 01 00 14 */ lwz r0, 0x14(r1)
|
||||
/* 80020C08 0001DB48 7C 08 03 A6 */ mtlr r0
|
||||
/* 80020C0C 0001DB4C 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 80020C10 0001DB50 4E 80 00 20 */ blr
|
||||
/* 80020BA0 0001DAE0 94 21 FF F0 */ stwu r1,
|
||||
-0x10(r1)
|
||||
/* 80020BA4 0001DAE4 7C 08 02 A6 */ mflr r0
|
||||
/* 80020BA8 0001DAE8 90 01 00 14 */ stw r0,
|
||||
0x14(r1)
|
||||
/* 80020BAC 0001DAEC 93 E1 00 0C */ stw r31,
|
||||
0xc(r1)
|
||||
/* 80020BB0 0001DAF0 7C 7F 1B 78 */ mr r31,
|
||||
r3
|
||||
/* 80020BB4 0001DAF4 4B FF FF 6D */ bl fpcCtRq_CreateQTo
|
||||
/* 80020BB8 0001DAF8 80 7F 00 34 */ lwz r3,
|
||||
0x34(r31)
|
||||
/* 80020BBC 0001DAFC 28 03 00 00 */ cmplwi r3,
|
||||
0
|
||||
/* 80020BC0 0001DB00 41 82 00 20 */ beq lbl_80020BE0
|
||||
/* 80020BC4 0001DB04 80 63 00 08 */ lwz r3,
|
||||
8(r3)
|
||||
/* 80020BC8 0001DB08 7F E4 FB 78 */ mr r4,
|
||||
r31
|
||||
/* 80020BCC 0001DB0C 48 00 18 5D */ bl fpcMtd_Method
|
||||
/* 80020BD0 0001DB10 2C 03 00 00 */ cmpwi r3,
|
||||
0
|
||||
/* 80020BD4 0001DB14 40 82 00 0C */ bne lbl_80020BE0
|
||||
/* 80020BD8 0001DB18 38 60 00 00 */ li r3,
|
||||
0
|
||||
/* 80020BDC 0001DB1C 48 00 00 24 */ b lbl_80020C00 lbl_80020BE0 :
|
||||
/* 80020BE0 0001DB20 80 7F 00 40 */ lwz r3,
|
||||
0x40(r31)
|
||||
/* 80020BE4 0001DB24 28 03 00 00 */ cmplwi r3,
|
||||
0
|
||||
/* 80020BE8 0001DB28 41 82 00 0C */ beq lbl_80020BF4
|
||||
/* 80020BEC 0001DB2C 38 00 00 00 */ li r0,
|
||||
0
|
||||
/* 80020BF0 0001DB30 90 03 00 14 */ stw r0,
|
||||
0x14(r3)lbl_80020BF4 :
|
||||
/* 80020BF4 0001DB34 7F E3 FB 78 */ mr r3,
|
||||
r31
|
||||
/* 80020BF8 0001DB38 48 24 26 69 */ bl cMl_NS_free
|
||||
/* 80020BFC 0001DB3C 38 60 00 01 */ li r3,
|
||||
1 lbl_80020C00 :
|
||||
/* 80020C00 0001DB40 83 E1 00 0C */ lwz r31,
|
||||
0xc(r1)
|
||||
/* 80020C04 0001DB44 80 01 00 14 */ lwz r0,
|
||||
0x14(r1)
|
||||
/* 80020C08 0001DB48 7C 08 03 A6 */ mtlr r0
|
||||
/* 80020C0C 0001DB4C 38 21 00 10 */ addi r1,
|
||||
r1,
|
||||
0x10
|
||||
/* 80020C10 0001DB50 4E 80 00 20 */ blr
|
||||
}
|
||||
#endif
|
||||
|
||||
bool fpcCtRq_Cancel(create_request *pReq)
|
||||
{
|
||||
bool fpcCtRq_Cancel(create_request* pReq) {
|
||||
if (pReq != NULL && !pReq->mbIsCancelling) {
|
||||
pReq->mbIsCancelling = true;
|
||||
base_process_class *pProc = pReq->mpRes;
|
||||
base_process_class* pProc = pReq->mpRes;
|
||||
|
||||
if (pProc != NULL && !fpcDt_Delete(pProc))
|
||||
return false;
|
||||
@@ -112,16 +122,14 @@ bool fpcCtRq_Cancel(create_request *pReq)
|
||||
}
|
||||
}
|
||||
|
||||
int fpcCtRq_IsDoing(create_request *pReq)
|
||||
{
|
||||
int fpcCtRq_IsDoing(create_request* pReq) {
|
||||
if (pReq != NULL)
|
||||
return pReq->mbIsCreating;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool fpcCtRq_Do(create_request *pReq)
|
||||
{
|
||||
static bool fpcCtRq_Do(create_request* pReq) {
|
||||
int ret = cPhs_COMPLEATE_e;
|
||||
|
||||
if (pReq->mpCtRqMtd != NULL) {
|
||||
@@ -149,21 +157,20 @@ static bool fpcCtRq_Do(create_request *pReq)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fpcCtRq_Handler(void)
|
||||
{
|
||||
fpcCtIt_Method((cNdIt_MethodFunc) fpcCtRq_Do, NULL);
|
||||
void fpcCtRq_Handler(void) {
|
||||
fpcCtIt_Method((cNdIt_MethodFunc)fpcCtRq_Do, NULL);
|
||||
}
|
||||
|
||||
extern void * cMl_NS_memalignB(int, unsigned long);
|
||||
extern void* cMl_NS_memalignB(int, unsigned long);
|
||||
extern int fpcBs_MakeOfId(void);
|
||||
|
||||
create_request * fpcCtRq_Create(layer_class *pLayer, unsigned long size, create_request_method_class *pMthd)
|
||||
{
|
||||
create_request *pReq = (create_request *) cMl_NS_memalignB(-4, size);
|
||||
create_request* fpcCtRq_Create(layer_class* pLayer, unsigned long size,
|
||||
create_request_method_class* pMthd) {
|
||||
create_request* pReq = (create_request*)cMl_NS_memalignB(-4, size);
|
||||
|
||||
if (pReq != NULL) {
|
||||
fpcCtTg_Init(pReq, pReq);
|
||||
fpcMtdTg_Init(&pReq->mMtdTg, (process_method_tag_func) fpcCtRq_Cancel, pReq);
|
||||
fpcMtdTg_Init(&pReq->mMtdTg, (process_method_tag_func)fpcCtRq_Cancel, pReq);
|
||||
pReq->mpLayer = pLayer;
|
||||
pReq->mpCtRqMtd = pMthd;
|
||||
pReq->mBsPcId = fpcBs_MakeOfId();
|
||||
@@ -174,5 +181,4 @@ create_request * fpcCtRq_Create(layer_class *pLayer, unsigned long size, create_
|
||||
|
||||
return pReq;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_create_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// g_fpcCtTg_Queue
|
||||
extern node_list_class lbl_803A3990;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcCtTg_ToCreateQ(create_tag_class *pTag)
|
||||
{
|
||||
void fpcCtTg_ToCreateQ(create_tag_class* pTag) {
|
||||
cTg_Addition(&lbl_803A3990, pTag);
|
||||
}
|
||||
|
||||
void fpcCtTg_CreateQTo(create_tag_class *pTag)
|
||||
{
|
||||
void fpcCtTg_CreateQTo(create_tag_class* pTag) {
|
||||
cTg_SingleCut(pTag);
|
||||
}
|
||||
|
||||
int fpcCtTg_Init(create_tag *pTag, void *pUserData)
|
||||
{
|
||||
int fpcCtTg_Init(create_tag* pTag, void* pUserData) {
|
||||
cTg_Create(pTag, pUserData);
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -5,24 +5,19 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcCt_IsCreatingByID(unsigned int id)
|
||||
{
|
||||
bool fpcCt_IsCreatingByID(unsigned int id) {
|
||||
return fpcCtRq_IsCreatingByID(id);
|
||||
}
|
||||
|
||||
int fpcCt_IsDoing(base_process_class *pProc)
|
||||
{
|
||||
int fpcCt_IsDoing(base_process_class* pProc) {
|
||||
return fpcCtRq_IsDoing(pProc->mpCtRq);
|
||||
}
|
||||
|
||||
void fpcCt_Abort(base_process_class *pProc)
|
||||
{
|
||||
void fpcCt_Abort(base_process_class* pProc) {
|
||||
fpcCtRq_Cancel(pProc->mpCtRq);
|
||||
}
|
||||
|
||||
void fpcCt_Handler(void)
|
||||
{
|
||||
void fpcCt_Handler(void) {
|
||||
fpcCtRq_Handler();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,30 +1,26 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_delete_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// g_fpcDtTg_Queue
|
||||
extern node_list_class lbl_803A39A0;
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcDtTg_IsEmpty(delete_tag_class *pTag)
|
||||
{
|
||||
bool fpcDtTg_IsEmpty(delete_tag_class* pTag) {
|
||||
return lbl_803A39A0.mSize == 0;
|
||||
}
|
||||
|
||||
void fpcDtTg_ToDeleteQ(delete_tag_class *pTag)
|
||||
{
|
||||
void fpcDtTg_ToDeleteQ(delete_tag_class* pTag) {
|
||||
pTag->mTimer = 1;
|
||||
cTg_Addition(&lbl_803A39A0, pTag);
|
||||
}
|
||||
|
||||
void fpcDtTg_DeleteQTo(delete_tag_class *pTag)
|
||||
{
|
||||
void fpcDtTg_DeleteQTo(delete_tag_class* pTag) {
|
||||
cTg_SingleCut(pTag);
|
||||
}
|
||||
|
||||
int fpcDtTg_Do(delete_tag_class *pTag, delete_tag_func pFunc)
|
||||
{
|
||||
int fpcDtTg_Do(delete_tag_class* pTag, delete_tag_func pFunc) {
|
||||
if (pTag->mTimer <= 0) {
|
||||
fpcDtTg_DeleteQTo(pTag);
|
||||
int ret = pFunc(pTag->mpTagData);
|
||||
@@ -40,10 +36,8 @@ int fpcDtTg_Do(delete_tag_class *pTag, delete_tag_func pFunc)
|
||||
}
|
||||
}
|
||||
|
||||
int fpcDtTg_Init(delete_tag_class *pTag, void *pUserData)
|
||||
{
|
||||
int fpcDtTg_Init(delete_tag_class* pTag, void* pUserData) {
|
||||
cTg_Create(pTag, pUserData);
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
#include "f/f_pc/f_pc_creator.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_creator.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcDt_Delete(base_process_class *pProc)
|
||||
{
|
||||
int fpcDt_Delete(base_process_class* pProc) {
|
||||
if (pProc != NULL) {
|
||||
if (fpcCt_IsDoing(pProc) == 1)
|
||||
return 0;
|
||||
@@ -19,5 +18,4 @@ int fpcDt_Delete(base_process_class *pProc)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_draw_priority.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcDwPi_Get(draw_priority_class *pDwPi)
|
||||
{
|
||||
int fpcDwPi_Get(draw_priority_class* pDwPi) {
|
||||
return pDwPi->mPriority;
|
||||
}
|
||||
|
||||
void fpcDwPi_Set(draw_priority_class *pDwPi, int p)
|
||||
{
|
||||
void fpcDwPi_Set(draw_priority_class* pDwPi, int p) {
|
||||
pDwPi->mPriority = p;
|
||||
}
|
||||
|
||||
void fpcDwPi_Init(draw_priority_class *pDwPi, int p)
|
||||
{
|
||||
void fpcDwPi_Init(draw_priority_class* pDwPi, int p) {
|
||||
fpcDwPi_Set(pDwPi, p);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,50 +1,46 @@
|
||||
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_line_iter.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_layer.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_iter.h"
|
||||
#include "f/f_pc/f_pc_node.h"
|
||||
#include "f/f_pc/f_pc_searcher.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern int fpcPause_IsEnable(base_process_class *pProc, int);
|
||||
extern int fpcPause_IsEnable(base_process_class* pProc, int);
|
||||
|
||||
// g_fpcNd_type
|
||||
extern int lbl_80450D40;
|
||||
|
||||
base_process_class * fpcEx_Search(void *pFunc, void *pUserData)
|
||||
{
|
||||
return (base_process_class *) fpcLyIt_AllJudge((cNdIt_MethodFunc) pFunc, pUserData);
|
||||
base_process_class* fpcEx_Search(void* pFunc, void* pUserData) {
|
||||
return (base_process_class*)fpcLyIt_AllJudge((cNdIt_MethodFunc)pFunc, pUserData);
|
||||
}
|
||||
|
||||
base_process_class * fpcEx_SearchByID(u32 id)
|
||||
{
|
||||
base_process_class* fpcEx_SearchByID(u32 id) {
|
||||
if (id + 2 <= 1)
|
||||
return NULL;
|
||||
|
||||
return fpcEx_Search(fpcSch_JudgeByID, &id);;
|
||||
return fpcEx_Search(fpcSch_JudgeByID, &id);
|
||||
;
|
||||
}
|
||||
|
||||
bool fpcEx_IsExist(int id)
|
||||
{
|
||||
bool fpcEx_IsExist(int id) {
|
||||
return fpcEx_SearchByID(id) != NULL;
|
||||
}
|
||||
|
||||
int fpcEx_Execute(base_process_class *pProc)
|
||||
{
|
||||
int fpcEx_Execute(base_process_class* pProc) {
|
||||
if (pProc->mInitState != 2 || fpcPause_IsEnable(pProc, 1) == 1)
|
||||
return 0;
|
||||
fpcBs_Execute(pProc);
|
||||
// TODO: missing return?
|
||||
}
|
||||
|
||||
int fpcEx_ToLineQ(base_process_class *pProc)
|
||||
{
|
||||
layer_class *pLayer = pProc->mLyTg.mpLayer;
|
||||
base_process_class *pLayerPcNode = pLayer->mpPcNode;
|
||||
int fpcEx_ToLineQ(base_process_class* pProc) {
|
||||
layer_class* pLayer = pProc->mLyTg.mpLayer;
|
||||
base_process_class* pLayerPcNode = pLayer->mpPcNode;
|
||||
|
||||
if (pLayer->mLayerID == 0 || cTg_IsUse(&pLayerPcNode->mLnTg) == true) {
|
||||
int ret = fpcLnTg_ToQueue(&pProc->mLnTg, pProc->mPi.mInfoCurr.mListID);
|
||||
@@ -55,8 +51,8 @@ int fpcEx_ToLineQ(base_process_class *pProc)
|
||||
|
||||
pProc->mInitState = 2;
|
||||
if (fpcBs_Is_JustOfType(lbl_80450D40, pProc->mSubType)) {
|
||||
process_node_class *pNode = (process_node_class *) pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc) fpcEx_ToLineQ, pNode);
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcEx_ToLineQ, pNode);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -65,8 +61,7 @@ int fpcEx_ToLineQ(base_process_class *pProc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fpcEx_ExecuteQTo(base_process_class *pProc)
|
||||
{
|
||||
int fpcEx_ExecuteQTo(base_process_class* pProc) {
|
||||
int ret = fpcLyTg_QueueTo(&pProc->mLyTg);
|
||||
if (ret == 1) {
|
||||
pProc->mInitState = 3;
|
||||
@@ -76,9 +71,9 @@ int fpcEx_ExecuteQTo(base_process_class *pProc)
|
||||
}
|
||||
}
|
||||
|
||||
int fpcEx_ToExecuteQ(base_process_class *pProc)
|
||||
{
|
||||
int ret = fpcLyTg_ToQueue(&pProc->mLyTg, pProc->mPi.mInfoCurr.mLayer, pProc->mPi.mInfoCurr.mListID, pProc->mPi.mInfoCurr.mListPrio);
|
||||
int fpcEx_ToExecuteQ(base_process_class* pProc) {
|
||||
int ret = fpcLyTg_ToQueue(&pProc->mLyTg, pProc->mPi.mInfoCurr.mLayer,
|
||||
pProc->mPi.mInfoCurr.mListID, pProc->mPi.mInfoCurr.mListPrio);
|
||||
if (ret == 1) {
|
||||
fpcEx_ToLineQ(pProc);
|
||||
return 1;
|
||||
@@ -87,9 +82,7 @@ int fpcEx_ToExecuteQ(base_process_class *pProc)
|
||||
}
|
||||
}
|
||||
|
||||
void fpcEx_Handler(cNdIt_MethodFunc pFunc)
|
||||
{
|
||||
void fpcEx_Handler(cNdIt_MethodFunc pFunc) {
|
||||
return fpcLnIt_Queue(pFunc);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+32
-32
@@ -1,10 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_method_tag.h"
|
||||
#include "f/f_pc/f_pc_method_iter.h"
|
||||
#include "f/f_pc/f_pc_method_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// f_pc_layer::l_fpcLy_CurrLayer_p
|
||||
extern layer_class *lbl_80450D18;
|
||||
extern layer_class* lbl_80450D18;
|
||||
extern s8 lbl_80450D20;
|
||||
// f_pc_layer::IsInitOfLayerList
|
||||
extern s32 lbl_80450D1C;
|
||||
@@ -18,71 +18,71 @@ extern layer_class lbl_803A39B0;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcLy_CancelQTo(process_method_tag_class *pMthd) {
|
||||
void fpcLy_CancelQTo(process_method_tag_class* pMthd) {
|
||||
fpcMtdTg_MethodQTo(pMthd);
|
||||
}
|
||||
|
||||
int fpcLy_ToCancelQ(layer_class *pLayer, process_method_tag_class *pMthd) {
|
||||
int fpcLy_ToCancelQ(layer_class* pLayer, process_method_tag_class* pMthd) {
|
||||
return fpcMtdTg_ToMethodQ(&pLayer->mCancelList, pMthd);
|
||||
}
|
||||
|
||||
bool fpcLy_CancelMethod(process_method_tag_class *pLayer) {
|
||||
bool fpcLy_CancelMethod(process_method_tag_class* pLayer) {
|
||||
return fpcMtdTg_Do(pLayer) == 1;
|
||||
}
|
||||
|
||||
int fpcLy_IntoQueue(layer_class *pLayer, int treeListIdx, create_tag_class *pTag, int idx) {
|
||||
int fpcLy_IntoQueue(layer_class* pLayer, int treeListIdx, create_tag_class* pTag, int idx) {
|
||||
return cTg_InsertToTree(&pLayer->mNodeListTree, treeListIdx, pTag, idx);
|
||||
}
|
||||
|
||||
int fpcLy_ToQueue(layer_class *pLayer, int treeListIdx, create_tag_class *pTag) {
|
||||
int fpcLy_ToQueue(layer_class* pLayer, int treeListIdx, create_tag_class* pTag) {
|
||||
return cTg_AdditionToTree(&pLayer->mNodeListTree, treeListIdx, pTag);
|
||||
}
|
||||
|
||||
int fpcLy_QueueTo(layer_class *pLayer, create_tag_class *pTag) {
|
||||
int fpcLy_QueueTo(layer_class* pLayer, create_tag_class* pTag) {
|
||||
return cTg_SingleCutFromTree(pTag);
|
||||
}
|
||||
|
||||
bool fpcLy_IsDeletingMesg(layer_class *pLayer) {
|
||||
bool fpcLy_IsDeletingMesg(layer_class* pLayer) {
|
||||
return pLayer->mDeletingCount > 0;
|
||||
}
|
||||
|
||||
void fpcLy_DeletingMesg(layer_class *pLayer) {
|
||||
void fpcLy_DeletingMesg(layer_class* pLayer) {
|
||||
pLayer->mDeletingCount++;
|
||||
}
|
||||
|
||||
void fpcLy_DeletedMesg(layer_class *pLayer) {
|
||||
void fpcLy_DeletedMesg(layer_class* pLayer) {
|
||||
if (pLayer->mDeletingCount > 0) {
|
||||
pLayer->mDeletingCount--;
|
||||
}
|
||||
}
|
||||
|
||||
bool fpcLy_IsCreatingMesg(layer_class *pLayer) {
|
||||
bool fpcLy_IsCreatingMesg(layer_class* pLayer) {
|
||||
return pLayer->mCreatingCount > 0;
|
||||
}
|
||||
|
||||
void fpcLy_CreatingMesg(layer_class *pLayer) {
|
||||
void fpcLy_CreatingMesg(layer_class* pLayer) {
|
||||
pLayer->mCreatingCount++;
|
||||
}
|
||||
|
||||
void fpcLy_CreatedMesg(layer_class *pLayer) {
|
||||
void fpcLy_CreatedMesg(layer_class* pLayer) {
|
||||
if (pLayer->mCreatingCount > 0) {
|
||||
pLayer->mCreatingCount--;
|
||||
}
|
||||
}
|
||||
|
||||
layer_class * fpcLy_RootLayer(void) {
|
||||
layer_class* fpcLy_RootLayer(void) {
|
||||
return (layer_class*)lbl_803A39DC.mpHead;
|
||||
}
|
||||
|
||||
void fpcLy_SetCurrentLayer(layer_class *pLayer) {
|
||||
void fpcLy_SetCurrentLayer(layer_class* pLayer) {
|
||||
lbl_80450D18 = pLayer;
|
||||
}
|
||||
|
||||
layer_class * fpcLy_CurrentLayer(void) {
|
||||
layer_class* fpcLy_CurrentLayer(void) {
|
||||
return lbl_80450D18;
|
||||
}
|
||||
|
||||
layer_class * fpcLy_Search(unsigned int id) {
|
||||
layer_class* fpcLy_Search(unsigned int id) {
|
||||
layer_class* iVar1 = fpcLy_RootLayer();
|
||||
while (iVar1 != NULL) {
|
||||
if (iVar1->mLayerID == id) {
|
||||
@@ -93,7 +93,7 @@ layer_class * fpcLy_Search(unsigned int id) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
layer_class * fpcLy_Layer(unsigned int id) {
|
||||
layer_class* fpcLy_Layer(unsigned int id) {
|
||||
if (id == 0 || fpcLy_RootLayer()->mLayerID == id) {
|
||||
return fpcLy_RootLayer();
|
||||
} else if (id == ~2 || fpcLy_CurrentLayer()->mLayerID == id) {
|
||||
@@ -103,34 +103,35 @@ layer_class * fpcLy_Layer(unsigned int id) {
|
||||
}
|
||||
}
|
||||
|
||||
void fpcLy_Regist(layer_class *pLayer) {
|
||||
void fpcLy_Regist(layer_class* pLayer) {
|
||||
cLs_Addition(&lbl_803A39DC, &pLayer->mNode);
|
||||
}
|
||||
|
||||
int fpcLy_Delete(layer_class *pLayer) {
|
||||
int fpcLy_Delete(layer_class* pLayer) {
|
||||
if (pLayer->mNodeListTree.mpLists->mSize == 0 && pLayer->mCancelList.mSize == 0) {
|
||||
cLs_SingleCut(&pLayer->mNode);
|
||||
*pLayer = lbl_803A39B0;
|
||||
*pLayer = lbl_803A39B0;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void fpcLy_Cancel(layer_class *pLayer) {
|
||||
void fpcLy_Cancel(layer_class* pLayer) {
|
||||
fpcMtdIt_Method(&pLayer->mCancelList, (cNdIt_MethodFunc)fpcLy_CancelMethod);
|
||||
}
|
||||
|
||||
void fpcLy_Create(layer_class *pLayer, process_node_class *pPcNode, node_list_class *pLists, int listNum) {
|
||||
void *pvVar1;
|
||||
void fpcLy_Create(layer_class* pLayer, process_node_class* pPcNode, node_list_class* pLists,
|
||||
int listNum) {
|
||||
void* pvVar1;
|
||||
int iVar2;
|
||||
|
||||
|
||||
if (lbl_80450D20 == 0) {
|
||||
lbl_80450D1C = 0x1; // IsInitOfLayerList
|
||||
lbl_80450D1C = 0x1; // IsInitOfLayerList
|
||||
lbl_80450D20 = 1;
|
||||
}
|
||||
if (lbl_80450D28 == 0) {
|
||||
lbl_80450D24 = 0; // layer_id
|
||||
lbl_80450D24 = 0; // layer_id
|
||||
lbl_80450D28 = 1;
|
||||
}
|
||||
*pLayer = lbl_803A39B0;
|
||||
@@ -144,9 +145,8 @@ void fpcLy_Create(layer_class *pLayer, process_node_class *pPcNode, node_list_cl
|
||||
}
|
||||
(pLayer->mNodeListTree).mpLists = pLists;
|
||||
(pLayer->mNodeListTree).mNumLists = listNum;
|
||||
cTr_Create(&pLayer->mNodeListTree,(pLayer->mNodeListTree).mpLists,
|
||||
(pLayer->mNodeListTree).mNumLists);
|
||||
cTr_Create(&pLayer->mNodeListTree, (pLayer->mNodeListTree).mpLists,
|
||||
(pLayer->mNodeListTree).mNumLists);
|
||||
fpcLy_Regist(pLayer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "SComponent/c_tree_iter.h"
|
||||
#include "SComponent/c_tag_iter.h"
|
||||
#include "SComponent/c_tree_iter.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcLyIt_OnlyHere(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
int fpcLyIt_OnlyHere(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = pFunc;
|
||||
lIter.mpUserData = pUserData;
|
||||
return cTrIt_Method(&pLayer->mNodeListTree,(cNdIt_MethodFunc) cTgIt_MethodCall, &lIter);
|
||||
return cTrIt_Method(&pLayer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter);
|
||||
}
|
||||
|
||||
int fpcLyIt_OnlyHereLY(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
int fpcLyIt_OnlyHereLY(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
int result;
|
||||
layer_class* currentLayer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(pLayer);
|
||||
@@ -20,21 +20,22 @@ int fpcLyIt_OnlyHereLY(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserD
|
||||
return result;
|
||||
}
|
||||
|
||||
void * fpcLyIt_Judge(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
void* fpcLyIt_Judge(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = pFunc;
|
||||
lIter.mpUserData = pUserData;
|
||||
return cTrIt_Judge(&pLayer->mNodeListTree,(cNdIt_JudgeFunc) cTgIt_JudgeFilter, &lIter);
|
||||
return cTrIt_Judge(&pLayer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
|
||||
}
|
||||
|
||||
void * fpcLyIt_AllJudge(cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
void* fpcLyIt_AllJudge(cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = pFunc;
|
||||
lIter.mpUserData = pUserData;
|
||||
|
||||
|
||||
layer_class* current = fpcLy_RootLayer();
|
||||
while (current != NULL) {
|
||||
void* result = cTrIt_Judge(¤t->mNodeListTree,(cNdIt_JudgeFunc) cTgIt_JudgeFilter, &lIter);
|
||||
void* result =
|
||||
cTrIt_Judge(¤t->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
|
||||
if (result != NULL) {
|
||||
return result;
|
||||
}
|
||||
@@ -42,5 +43,4 @@ void * fpcLyIt_AllJudge(cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "global.h"
|
||||
|
||||
// f_pc_layer_tag::crear
|
||||
extern layer_management_tag_class lbl_803A3A00;
|
||||
|
||||
extern "C" {
|
||||
|
||||
s32 fpcLyTg_ToQueue(layer_management_tag_class *pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
s32 fpcLyTg_ToQueue(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
if (pTag->mpLayer == NULL && layerID == -1) {
|
||||
return 0;
|
||||
} else {
|
||||
@@ -22,7 +22,7 @@ s32 fpcLyTg_ToQueue(layer_management_tag_class *pTag, u32 layerID, u16 listID, u
|
||||
pTag->mNodeListIdx = tmp - 1;
|
||||
return 1;
|
||||
}
|
||||
} else if (fpcLy_IntoQueue(pTag->mpLayer,listID,&pTag->mCreateTag,listPrio) != 0x0) {
|
||||
} else if (fpcLy_IntoQueue(pTag->mpLayer, listID, &pTag->mCreateTag, listPrio) != 0x0) {
|
||||
pTag->mNodeListID = listID;
|
||||
pTag->mNodeListIdx = listPrio;
|
||||
return 1;
|
||||
@@ -31,8 +31,8 @@ s32 fpcLyTg_ToQueue(layer_management_tag_class *pTag, u32 layerID, u16 listID, u
|
||||
}
|
||||
}
|
||||
|
||||
s32 fpcLyTg_QueueTo(layer_management_tag_class *pTag) {
|
||||
if (fpcLy_QueueTo(pTag->mpLayer,&pTag->mCreateTag) == 1) {
|
||||
s32 fpcLyTg_QueueTo(layer_management_tag_class* pTag) {
|
||||
if (fpcLy_QueueTo(pTag->mpLayer, &pTag->mCreateTag) == 1) {
|
||||
pTag->mpLayer = NULL;
|
||||
pTag->mNodeListID = 0xFFFF;
|
||||
pTag->mNodeListIdx = 0xFFFF;
|
||||
@@ -42,22 +42,21 @@ s32 fpcLyTg_QueueTo(layer_management_tag_class *pTag) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 fpcLyTg_Move(layer_management_tag_class * pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
layer_class *layer = fpcLy_Layer(layerID);
|
||||
s32 fpcLyTg_Move(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
layer_class* layer = fpcLy_Layer(layerID);
|
||||
if (layer == NULL) {
|
||||
return 0;
|
||||
}
|
||||
else if (fpcLyTg_QueueTo(pTag) == 0x1) {
|
||||
} else if (fpcLyTg_QueueTo(pTag) == 0x1) {
|
||||
pTag->mpLayer = layer;
|
||||
return fpcLyTg_ToQueue(pTag,layerID,listID,listPrio);
|
||||
return fpcLyTg_ToQueue(pTag, layerID, listID, listPrio);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
s32 fpcLyTg_Init(layer_management_tag_class * pTag, u32 param2, void * param3) {
|
||||
s32 fpcLyTg_Init(layer_management_tag_class* pTag, u32 param2, void* param3) {
|
||||
*pTag = lbl_803A3A00;
|
||||
cTg_Create(&pTag->mCreateTag, param3);
|
||||
cTg_Create(&pTag->mCreateTag, param3);
|
||||
layer_class* layer = fpcLy_Layer(param2);
|
||||
if (layer != NULL) {
|
||||
pTag->mpLayer = layer;
|
||||
@@ -66,5 +65,4 @@ s32 fpcLyTg_Init(layer_management_tag_class * pTag, u32 param2, void * param3) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,13 +3,11 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcLf_GetPriority(leafdraw_class *pLeaf)
|
||||
{
|
||||
int fpcLf_GetPriority(leafdraw_class* pLeaf) {
|
||||
return fpcDwPi_Get(&pLeaf->mDwPi);
|
||||
}
|
||||
|
||||
int fpcLf_DrawMethod(leafdraw_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcLf_DrawMethod(leafdraw_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpDrawFunc, pUserData);
|
||||
}
|
||||
|
||||
@@ -22,5 +20,4 @@ int fpcLf_Draw(leafdraw_class *pLeaf)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "SComponent/c_list.h"
|
||||
#include "global.h"
|
||||
|
||||
// l_fpcLn_Line
|
||||
extern node_list_class lbl_803F4CF0[16];
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcLn_Create(void)
|
||||
{
|
||||
void fpcLn_Create(void) {
|
||||
int i = ARRAY_SIZE(lbl_803F4CF0);
|
||||
node_list_class *pLine = lbl_803F4CF0;
|
||||
node_list_class* pLine = lbl_803F4CF0;
|
||||
while (i-- > 0)
|
||||
cLs_Create(pLine++);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "SComponent/c_tag_iter.h"
|
||||
#include "SComponent/c_tree_iter.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
|
||||
// g_fpcLn_Queue
|
||||
extern node_lists_tree_class lbl_804505D8;
|
||||
|
||||
extern "C" {
|
||||
|
||||
static int fpcLnIt_MethodCall(create_tag_class *pTag, method_filter *pFilter)
|
||||
{
|
||||
layer_class *pLayer = ((base_process_class *) pTag->mpTagData)->mLyTg.mpLayer;
|
||||
layer_class *pCurLayer = fpcLy_CurrentLayer();
|
||||
static int fpcLnIt_MethodCall(create_tag_class* pTag, method_filter* pFilter) {
|
||||
layer_class* pLayer = ((base_process_class*)pTag->mpTagData)->mLyTg.mpLayer;
|
||||
layer_class* pCurLayer = fpcLy_CurrentLayer();
|
||||
|
||||
fpcLy_SetCurrentLayer(pLayer);
|
||||
int ret = cTgIt_MethodCall(pTag, pFilter);
|
||||
@@ -21,12 +20,10 @@ static int fpcLnIt_MethodCall(create_tag_class *pTag, method_filter *pFilter)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fpcLnIt_Queue(cNdIt_MethodFunc pFunc)
|
||||
{
|
||||
void fpcLnIt_Queue(cNdIt_MethodFunc pFunc) {
|
||||
method_filter filter;
|
||||
filter.mpMethodFunc = pFunc;
|
||||
filter.mpUserData = NULL;
|
||||
cTrIt_Method(&lbl_804505D8, (cNdIt_MethodFunc) fpcLnIt_MethodCall, &filter);
|
||||
cTrIt_Method(&lbl_804505D8, (cNdIt_MethodFunc)fpcLnIt_MethodCall, &filter);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -6,8 +6,7 @@ extern node_lists_tree_class lbl_804505D8;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcLnTg_Move(line_tag *pLineTag, int newLineListID)
|
||||
{
|
||||
int fpcLnTg_Move(line_tag* pLineTag, int newLineListID) {
|
||||
if (pLineTag->mLineListID != newLineListID) {
|
||||
fpcLnTg_QueueTo(pLineTag);
|
||||
return fpcLnTg_ToQueue(pLineTag, newLineListID);
|
||||
@@ -16,14 +15,12 @@ int fpcLnTg_Move(line_tag *pLineTag, int newLineListID)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fpcLnTg_QueueTo(line_tag *pLineTag)
|
||||
{
|
||||
void fpcLnTg_QueueTo(line_tag* pLineTag) {
|
||||
cTg_SingleCutFromTree(pLineTag);
|
||||
pLineTag->mLineListID = -1;
|
||||
}
|
||||
|
||||
int fpcLnTg_ToQueue(line_tag *pLineTag, int lineListID)
|
||||
{
|
||||
int fpcLnTg_ToQueue(line_tag* pLineTag, int lineListID) {
|
||||
int ret = cTg_AdditionToTree(&lbl_804505D8, lineListID, pLineTag);
|
||||
|
||||
if (ret) {
|
||||
@@ -34,11 +31,8 @@ int fpcLnTg_ToQueue(line_tag *pLineTag, int lineListID)
|
||||
}
|
||||
}
|
||||
|
||||
void fpcLnTg_Init(line_tag *pLineTag, void *pData)
|
||||
{
|
||||
void fpcLnTg_Init(line_tag* pLineTag, void* pData) {
|
||||
cTg_Create(pLineTag, pData);
|
||||
pLineTag->mLineListID = -1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "SComponent/c_phase.h"
|
||||
#include "f/f_pc/f_pc_load.h"
|
||||
#include "SComponent/c_phase.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -8,25 +8,21 @@ extern int cDyl_IsLinked(short procName);
|
||||
extern int cDyl_Unlink(short procName);
|
||||
extern int cDyl_LinkASync(short procName);
|
||||
|
||||
bool fpcLd_Use(u16 procName)
|
||||
{
|
||||
bool fpcLd_Use(u16 procName) {
|
||||
if (fpcLd_IsLoaded(procName) == true && fpcLd_Load(procName) == cPhs_COMPLEATE_e)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int fpcLd_IsLoaded(u16 procName)
|
||||
{
|
||||
int fpcLd_IsLoaded(u16 procName) {
|
||||
return cDyl_IsLinked(procName);
|
||||
}
|
||||
|
||||
void fpcLd_Free(u16 procName)
|
||||
{
|
||||
void fpcLd_Free(u16 procName) {
|
||||
cDyl_Unlink(procName);
|
||||
}
|
||||
|
||||
int fpcLd_Load(u16 procName)
|
||||
{
|
||||
int fpcLd_Load(u16 procName) {
|
||||
int phase = cDyl_LinkASync(procName);
|
||||
|
||||
switch (phase) {
|
||||
@@ -38,5 +34,4 @@ int fpcLd_Load(u16 procName)
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,35 +1,29 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_method.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcMtd_Method(process_method_func pFunc, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Method(process_method_func pFunc, void* pUserData) {
|
||||
if (pFunc != NULL)
|
||||
return pFunc(pUserData);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcMtd_Execute(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Execute(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpExecuteFunc, pUserData);
|
||||
}
|
||||
|
||||
int fpcMtd_IsDelete(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_IsDelete(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpIsDeleteFunc, pUserData);
|
||||
}
|
||||
|
||||
int fpcMtd_Delete(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Delete(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpDeleteFunc, pUserData);
|
||||
}
|
||||
|
||||
int fpcMtd_Create(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Create(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpCreateFunc, pUserData);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_method_iter.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcMtdIt_Method(node_list_class *pList, cNdIt_MethodFunc pMethod)
|
||||
{
|
||||
void fpcMtdIt_Method(node_list_class* pList, cNdIt_MethodFunc pMethod) {
|
||||
cLsIt_Method(pList, pMethod, NULL);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -6,27 +6,22 @@ extern node_lists_tree_class lbl_804505D8;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcMtdTg_Do(process_method_tag_class *pMthd)
|
||||
{
|
||||
int fpcMtdTg_Do(process_method_tag_class* pMthd) {
|
||||
return pMthd->mpFunc(pMthd->mpMthdData);
|
||||
}
|
||||
|
||||
int fpcMtdTg_ToMethodQ(node_list_class *pList, process_method_tag_class *pMthd)
|
||||
{
|
||||
int fpcMtdTg_ToMethodQ(node_list_class* pList, process_method_tag_class* pMthd) {
|
||||
return cTg_Addition(pList, pMthd);
|
||||
}
|
||||
|
||||
void fpcMtdTg_MethodQTo(process_method_tag_class *pMthd)
|
||||
{
|
||||
void fpcMtdTg_MethodQTo(process_method_tag_class* pMthd) {
|
||||
cTg_SingleCut(pMthd);
|
||||
}
|
||||
|
||||
int fpcMtdTg_Init(process_method_tag_class *pMthd, process_method_tag_func pFunc, void *pMthdData)
|
||||
{
|
||||
int fpcMtdTg_Init(process_method_tag_class* pMthd, process_method_tag_func pFunc, void* pMthdData) {
|
||||
cTg_Create(pMthd, pMthd);
|
||||
pMthd->mpFunc = pFunc;
|
||||
pMthd->mpMthdData = pMthdData;
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+40
-31
@@ -4,65 +4,74 @@
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_node.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
|
||||
// f_pc_node::g_fpcNd_type
|
||||
extern int lbl_80450D40;
|
||||
|
||||
#if NON_MATCHING
|
||||
bool fpcPause_IsEnable(void *pProcess, u8 flag)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
bool 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 bool fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
nofralloc
|
||||
/* 80023844 00020784 54 84 06 3E */ clrlwi r4, r4, 0x18
|
||||
/* 80023848 00020788 88 03 00 0B */ lbz r0, 0xb(r3)
|
||||
/* 8002384C 0002078C 7C 80 00 38 */ and r0, r4, r0
|
||||
/* 80023850 00020790 7C 64 00 50 */ subf r3, r4, r0
|
||||
/* 80023854 00020794 30 03 FF FF */ addic r0, r3, -1
|
||||
/* 80023858 00020798 7C 00 19 10 */ subfe r0, r0, r3
|
||||
/* 8002385C 0002079C 7C 00 00 34 */ cntlzw r0, r0
|
||||
/* 80023860 000207A0 54 03 D9 7E */ srwi r3, r0, 5
|
||||
/* 80023864 000207A4 4E 80 00 20 */ blr
|
||||
/* 80023844 00020784 54 84 06 3E */ clrlwi r4,
|
||||
r4,
|
||||
0x18
|
||||
/* 80023848 00020788 88 03 00 0B */ lbz r0,
|
||||
0xb(r3)
|
||||
/* 8002384C 0002078C 7C 80 00 38 */
|
||||
and r0,
|
||||
r4,
|
||||
r0
|
||||
/* 80023850 00020790 7C 64 00 50 */ subf r3,
|
||||
r4,
|
||||
r0
|
||||
/* 80023854 00020794 30 03 FF FF */ addic r0,
|
||||
r3,
|
||||
-1
|
||||
/* 80023858 00020798 7C 00 19 10 */ subfe r0,
|
||||
r0,
|
||||
r3
|
||||
/* 8002385C 0002079C 7C 00 00 34 */ cntlzw r0,
|
||||
r0
|
||||
/* 80023860 000207A0 54 03 D9 7E */ srwi r3,
|
||||
r0,
|
||||
5
|
||||
/* 80023864 000207A4 4E 80 00 20 */ blr
|
||||
}
|
||||
#endif
|
||||
|
||||
int fpcPause_Enable(void *pProcess, u8 flag)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
int fpcPause_Enable(void* pProcess, u8 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag |= flag;
|
||||
|
||||
if (fpcBs_Is_JustOfType(lbl_80450D40, pProc->mSubType)) {
|
||||
process_node_class *pNode = (process_node_class *) pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Enable, (void*) (flag & 0xFF));
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Enable, (void*)(flag & 0xFF));
|
||||
}
|
||||
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)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
// 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) {
|
||||
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));
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Disable, (void*)(flag & 0xFF));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fpcPause_Init(void *pProcess)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
void fpcPause_Init(void* pProcess) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
#include "f/f_pc/f_pc_priority.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
|
||||
// f_pc_priority::crear$2186
|
||||
extern process_priority_queue_info lbl_804505E8;
|
||||
@@ -13,25 +12,22 @@ extern process_priority_queue_info lbl_804505E8;
|
||||
// f_pc_priority::l_fpcPi_Queue
|
||||
extern node_list_class lbl_803F4E58;
|
||||
|
||||
int fpcPi_IsInQueue(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_IsInQueue(process_priority_class* pPi) {
|
||||
return cTg_IsUse(pPi);
|
||||
}
|
||||
|
||||
int fpcPi_QueueTo(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_QueueTo(process_priority_class* pPi) {
|
||||
cTg_SingleCut(pPi);
|
||||
fpcLy_CancelQTo(&pPi->mMtdTag);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcPi_ToQueue(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_ToQueue(process_priority_class* pPi) {
|
||||
u32 layer = pPi->mInfoQ.mLayer;
|
||||
|
||||
if (cTg_Addition(&lbl_803F4E58, pPi)) {
|
||||
if (layer != 0xFFFFFFFD) {
|
||||
layer_class *pLayer = fpcLy_Layer(layer);
|
||||
layer_class* pLayer = fpcLy_Layer(layer);
|
||||
|
||||
if (!fpcLy_ToCancelQ(pLayer, &pPi->mMtdTag)) {
|
||||
cTg_SingleCut(pPi);
|
||||
@@ -45,13 +41,12 @@ int fpcPi_ToQueue(process_priority_class *pPi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
process_priority_class * fpcPi_GetFromQueue(void)
|
||||
{
|
||||
process_priority_class *pPi = (process_priority_class *) cTg_GetFirst(&lbl_803F4E58);
|
||||
process_priority_class* fpcPi_GetFromQueue(void) {
|
||||
process_priority_class* pPi = (process_priority_class*)cTg_GetFirst(&lbl_803F4E58);
|
||||
|
||||
if (pPi != NULL) {
|
||||
base_process_class *pProc = (base_process_class *) pPi->mpTagData;
|
||||
process_priority_class *pProcPi = &pProc->mPi;
|
||||
base_process_class* pProc = (base_process_class*)pPi->mpTagData;
|
||||
process_priority_class* pProcPi = &pProc->mPi;
|
||||
fpcLy_CancelQTo(&pProcPi->mMtdTag);
|
||||
return pProcPi;
|
||||
}
|
||||
@@ -59,24 +54,22 @@ process_priority_class * fpcPi_GetFromQueue(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int fpcPi_Delete(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_Delete(process_priority_class* pPi) {
|
||||
fpcPi_QueueTo(pPi);
|
||||
pPi->mInfoQ = lbl_804505E8;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcPi_IsNormal(unsigned int layer, unsigned short listID, unsigned short priority)
|
||||
{
|
||||
int fpcPi_IsNormal(unsigned int layer, unsigned short listID, unsigned short priority) {
|
||||
if ((layer < 0xFFFFFFFE) && (listID < 0xFFFE) && (priority < 0xFFFE))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fpcPi_Change(process_priority_class *pPi, unsigned int layer, unsigned short listID, unsigned short priority)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pPi->mpTagData;
|
||||
int fpcPi_Change(process_priority_class* pPi, unsigned int layer, unsigned short listID,
|
||||
unsigned short priority) {
|
||||
base_process_class* pProc = (base_process_class*)pPi->mpTagData;
|
||||
int changed = 0;
|
||||
|
||||
if (pProc->mInitState == 3)
|
||||
@@ -98,7 +91,7 @@ int fpcPi_Change(process_priority_class *pPi, unsigned int layer, unsigned short
|
||||
}
|
||||
|
||||
if (priority != 0xFFFD && pPi->mInfoCurr.mListPrio != priority) {
|
||||
pPi->mInfoQ.mListPrio = priority;
|
||||
pPi->mInfoQ.mListPrio = priority;
|
||||
changed = 1;
|
||||
}
|
||||
|
||||
@@ -113,13 +106,13 @@ int fpcPi_Change(process_priority_class *pPi, unsigned int layer, unsigned short
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fpcPi_Handler(void)
|
||||
{
|
||||
while (process_priority_class *pPi = fpcPi_GetFromQueue()) {
|
||||
base_process_class *pProc = (base_process_class *) pPi->mpTagData;
|
||||
layer_management_tag_class *pLayerTag = &pProc->mLyTg;
|
||||
line_tag *pLineTag = &pProc->mLnTg;
|
||||
if (fpcLyTg_Move(pLayerTag, pPi->mInfoQ.mLayer, pPi->mInfoQ.mListID, pPi->mInfoQ.mListPrio) == 1) {
|
||||
int fpcPi_Handler(void) {
|
||||
while (process_priority_class* pPi = fpcPi_GetFromQueue()) {
|
||||
base_process_class* pProc = (base_process_class*)pPi->mpTagData;
|
||||
layer_management_tag_class* pLayerTag = &pProc->mLyTg;
|
||||
line_tag* pLineTag = &pProc->mLnTg;
|
||||
if (fpcLyTg_Move(pLayerTag, pPi->mInfoQ.mLayer, pPi->mInfoQ.mListID,
|
||||
pPi->mInfoQ.mListPrio) == 1) {
|
||||
fpcLnTg_Move(pLineTag, pPi->mInfoCurr.mListID);
|
||||
pPi->mInfoCurr = pPi->mInfoQ;
|
||||
} else {
|
||||
@@ -130,8 +123,8 @@ int fpcPi_Handler(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcPi_Init(process_priority_class *pPi, void *pUserData, unsigned int layer, unsigned short listID, unsigned short priority)
|
||||
{
|
||||
int fpcPi_Init(process_priority_class* pPi, void* pUserData, unsigned int layer,
|
||||
unsigned short listID, unsigned short priority) {
|
||||
if (!fpcPi_IsNormal(layer, listID, priority))
|
||||
return 0;
|
||||
|
||||
@@ -140,8 +133,7 @@ int fpcPi_Init(process_priority_class *pPi, void *pUserData, unsigned int layer,
|
||||
pPi->mInfoQ.mListPrio = priority;
|
||||
pPi->mInfoCurr = pPi->mInfoQ;
|
||||
cTg_Create(pPi, pUserData);
|
||||
fpcMtdTg_Init(&pPi->mMtdTag, (process_method_tag_func) fpcPi_Delete, pPi);
|
||||
fpcMtdTg_Init(&pPi->mMtdTag, (process_method_tag_func)fpcPi_Delete, pPi);
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
#include "f/f_pc/f_pc_profile.h"
|
||||
|
||||
// g_fpcPf_ProfileList_p
|
||||
extern void ** lbl_80450D50;
|
||||
extern void** lbl_80450D50;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void * fpcPf_Get(s16 profileID)
|
||||
{
|
||||
void* fpcPf_Get(s16 profileID) {
|
||||
return lbl_80450D50[profileID];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -4,20 +4,17 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
void * fpcSch_JudgeForPName(base_process_class *pProc, void *pUserData)
|
||||
{
|
||||
void* fpcSch_JudgeForPName(base_process_class* pProc, void* pUserData) {
|
||||
short pname = *(short*)pUserData;
|
||||
if (pProc->mProcName == pname)
|
||||
return pProc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * fpcSch_JudgeByID(base_process_class *pProc, void *pUserData)
|
||||
{
|
||||
void* fpcSch_JudgeByID(base_process_class* pProc, void* pUserData) {
|
||||
int id = *(int*)pUserData;
|
||||
if (pProc->mBsPcId == id)
|
||||
return pProc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user