mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-02 16:16:20 -04:00
some cleanup of f_pc/f_op files (#2254)
* cleanup f_pc files * cleanup f_op files * fix a couple f_op_actor_mng functions * minor JSystem work
This commit is contained in:
+72
-67
@@ -11,20 +11,18 @@
|
||||
#include "f_pc/f_pc_method.h"
|
||||
#include "f_pc/f_pc_pause.h"
|
||||
#include "f_pc/f_pc_profile.h"
|
||||
#include "global.h"
|
||||
|
||||
/* 8002064C-8002065C 0010+00 s=0 e=14 z=0 None .text fpcBs_Is_JustOfType__Fii */
|
||||
s32 fpcBs_Is_JustOfType(int i_typeA, int i_typeB) {
|
||||
return checkEqual(i_typeA, i_typeB); // return pType2 == pType1 matches when return type is bool
|
||||
BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB) {
|
||||
return i_typeB == i_typeA ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450D00-80450D04 0004+00 s=1 e=0 z=0 None .sbss g_fpcBs_type */
|
||||
static int g_fpcBs_type;
|
||||
int g_fpcBs_type;
|
||||
|
||||
/* 8002065C-8002069C 0040+00 s=1 e=5 z=0 None .text fpcBs_MakeOfType__FPi */
|
||||
s32 fpcBs_MakeOfType(int* i_type) {
|
||||
static s32 t_type = 0x9130000;
|
||||
int fpcBs_MakeOfType(int* i_type) {
|
||||
static int t_type = 0x9130000;
|
||||
if (*i_type == 0) {
|
||||
*i_type = ++t_type;
|
||||
}
|
||||
@@ -32,102 +30,109 @@ s32 fpcBs_MakeOfType(int* i_type) {
|
||||
}
|
||||
|
||||
/* 8002069C-800206C4 0028+00 s=0 e=2 z=0 None .text fpcBs_MakeOfId__Fv */
|
||||
s32 fpcBs_MakeOfId() {
|
||||
static s32 process_id = 1;
|
||||
int fpcBs_MakeOfId() {
|
||||
static int process_id = 1;
|
||||
return process_id++;
|
||||
}
|
||||
|
||||
/* 800206C4-80020720 005C+00 s=0 e=1 z=0 None .text fpcBs_Execute__FP18base_process_class */
|
||||
s32 fpcBs_Execute(base_process_class* i_proc) {
|
||||
s32 result;
|
||||
layer_class* savedLayer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(i_proc->mLyTg.mpLayer);
|
||||
result = fpcMtd_Execute(i_proc->mpPcMtd, i_proc);
|
||||
fpcLy_SetCurrentLayer(savedLayer);
|
||||
int fpcBs_Execute(base_process_class* i_proc) {
|
||||
int result;
|
||||
layer_class* save_layer = fpcLy_CurrentLayer();
|
||||
|
||||
fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
|
||||
result = fpcMtd_Execute(i_proc->methods, i_proc);
|
||||
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 80020720-80020760 0040+00 s=2 e=0 z=0 None .text fpcBs_DeleteAppend__FP18base_process_class
|
||||
*/
|
||||
void fpcBs_DeleteAppend(base_process_class* i_proc) {
|
||||
if (i_proc->mpUserData != NULL) {
|
||||
cMl::free(i_proc->mpUserData);
|
||||
i_proc->mpUserData = NULL;
|
||||
if (i_proc->append != NULL) {
|
||||
cMl::free(i_proc->append);
|
||||
i_proc->append = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80020760-800207BC 005C+00 s=0 e=1 z=0 None .text fpcBs_IsDelete__FP18base_process_class */
|
||||
s32 fpcBs_IsDelete(base_process_class* i_proc) {
|
||||
s32 result;
|
||||
layer_class* savedLayer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(i_proc->mLyTg.mpLayer);
|
||||
result = fpcMtd_IsDelete(i_proc->mpPcMtd, i_proc);
|
||||
fpcLy_SetCurrentLayer(savedLayer);
|
||||
int fpcBs_IsDelete(base_process_class* i_proc) {
|
||||
int result;
|
||||
layer_class* save_layer = fpcLy_CurrentLayer();
|
||||
|
||||
fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
|
||||
result = fpcMtd_IsDelete(i_proc->methods, i_proc);
|
||||
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 800207BC-80020820 0064+00 s=0 e=2 z=0 None .text fpcBs_Delete__FP18base_process_class */
|
||||
s32 fpcBs_Delete(base_process_class* i_proc) {
|
||||
s32 deleteResult = fpcMtd_Delete(i_proc->mpPcMtd, i_proc);
|
||||
if (deleteResult == 1) {
|
||||
int fpcBs_Delete(base_process_class* i_proc) {
|
||||
int result = fpcMtd_Delete(i_proc->methods, i_proc);
|
||||
if (result == 1) {
|
||||
fpcBs_DeleteAppend(i_proc);
|
||||
i_proc->mBsType = 0;
|
||||
i_proc->type = 0;
|
||||
cMl::free(i_proc);
|
||||
}
|
||||
return deleteResult;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 80020820-8002091C 00FC+00 s=0 e=2 z=0 None .text fpcBs_Create__FsUiPv */
|
||||
base_process_class* fpcBs_Create(s16 i_procTypeID, fpc_ProcID i_procID, void* i_data) {
|
||||
process_profile_definition* procProfDef;
|
||||
base_process_class* procClass;
|
||||
base_process_class* fpcBs_Create(s16 i_profname, fpc_ProcID i_procID, void* i_append) {
|
||||
process_profile_definition* pprofile;
|
||||
base_process_class* pprocess;
|
||||
u32 size;
|
||||
|
||||
procProfDef = (process_profile_definition*)fpcPf_Get(i_procTypeID);
|
||||
size = procProfDef->mSize + procProfDef->mSizeOther;
|
||||
procClass = (base_process_class*)cMl::memalignB(-4, size);
|
||||
if (procClass == NULL) {
|
||||
pprofile = (process_profile_definition*)fpcPf_Get(i_profname);
|
||||
size = pprofile->process_size + pprofile->unk_size;
|
||||
|
||||
pprocess = (base_process_class*)cMl::memalignB(-4, size);
|
||||
if (pprocess == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
sBs_ClearArea(procClass, size);
|
||||
fpcLyTg_Init(&procClass->mLyTg, procProfDef->mLayerID, procClass);
|
||||
fpcLnTg_Init(&procClass->mLnTg, procClass);
|
||||
fpcDtTg_Init(&procClass->mDtTg, procClass);
|
||||
fpcPi_Init(&procClass->mPi, procClass, procProfDef->mLayerID, procProfDef->mListID,
|
||||
procProfDef->mListPrio);
|
||||
procClass->mInitState = 0;
|
||||
procClass->mUnk0 = 0;
|
||||
procClass->mBsPcId = i_procID;
|
||||
procClass->mBsTypeId = i_procTypeID;
|
||||
procClass->mBsType = fpcBs_MakeOfType(&g_fpcBs_type);
|
||||
procClass->mProcName = procProfDef->mProcName;
|
||||
fpcPause_Init(procClass);
|
||||
procClass->mpPcMtd = procProfDef->sub_method;
|
||||
procClass->mpProf = procProfDef;
|
||||
procClass->mpUserData = i_data;
|
||||
procClass->mParameters = procProfDef->mParameters;
|
||||
return procClass;
|
||||
}
|
||||
|
||||
sBs_ClearArea(pprocess, size);
|
||||
fpcLyTg_Init(&pprocess->layer_tag, pprofile->layer_id, pprocess);
|
||||
fpcLnTg_Init(&pprocess->line_tag_, pprocess);
|
||||
fpcDtTg_Init(&pprocess->delete_tag, pprocess);
|
||||
fpcPi_Init(&pprocess->priority, pprocess, pprofile->layer_id, pprofile->list_id,
|
||||
pprofile->list_priority);
|
||||
|
||||
pprocess->init_state = 0;
|
||||
pprocess->unk_0xA = 0;
|
||||
pprocess->id = i_procID;
|
||||
pprocess->profname = i_profname;
|
||||
pprocess->type = fpcBs_MakeOfType(&g_fpcBs_type);
|
||||
pprocess->name = pprofile->name;
|
||||
fpcPause_Init(pprocess);
|
||||
pprocess->methods = pprofile->methods;
|
||||
pprocess->profile = pprofile;
|
||||
pprocess->append = i_append;
|
||||
pprocess->parameters = pprofile->parameters;
|
||||
return pprocess;
|
||||
}
|
||||
|
||||
s32 fpcBs_SubCreate(base_process_class* i_proc) {
|
||||
switch (fpcMtd_Create(i_proc->mpPcMtd, i_proc)) {
|
||||
case 2:
|
||||
int fpcBs_SubCreate(base_process_class* i_proc) {
|
||||
switch (fpcMtd_Create(i_proc->methods, i_proc)) {
|
||||
case cPhs_NEXT_e:
|
||||
case cPhs_COMPLEATE_e:
|
||||
fpcBs_DeleteAppend(i_proc);
|
||||
i_proc->mUnk2 = 2;
|
||||
return 2;
|
||||
i_proc->create_phase = cPhs_NEXT_e;
|
||||
return cPhs_NEXT_e;
|
||||
case cPhs_INIT_e:
|
||||
case 1:
|
||||
i_proc->mInitState = 1;
|
||||
i_proc->mUnk2 = 0;
|
||||
case cPhs_LOADING_e:
|
||||
i_proc->init_state = 1;
|
||||
i_proc->create_phase = cPhs_INIT_e;
|
||||
return cPhs_INIT_e;
|
||||
case 3:
|
||||
i_proc->mUnk2 = 3;
|
||||
return 3;
|
||||
case cPhs_UNK3_e:
|
||||
i_proc->create_phase = cPhs_UNK3_e;
|
||||
return cPhs_UNK3_e;
|
||||
case cPhs_ERROR_e:
|
||||
default:
|
||||
i_proc->mUnk2 = 5;
|
||||
i_proc->create_phase = cPhs_ERROR_e;
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,37 +10,38 @@
|
||||
#include "f_pc/f_pc_layer.h"
|
||||
|
||||
/* 800209C8-80020A04 003C+00 s=0 e=1 z=0 None .text fpcCtIt_Method__FPFPvPv_iPv */
|
||||
s32 fpcCtIt_Method(fpcCtIt_MethodFunc i_judgeFunc, void* i_data) {
|
||||
int fpcCtIt_Method(fpcCtIt_MethodFunc i_method, void* i_data) {
|
||||
node_method_data iter;
|
||||
iter.mFunc = i_judgeFunc;
|
||||
iter.mpUserData = i_data;
|
||||
iter.method = i_method;
|
||||
iter.data = i_data;
|
||||
return cLsIt_Method(&g_fpcCtTg_Queue, (cNdIt_MethodFunc)cTgIt_MethodCall, &iter);
|
||||
}
|
||||
|
||||
/* 80020A04-80020A40 003C+00 s=1 e=2 z=0 None .text fpcCtIt_Judge__FPFPvPv_PvPv */
|
||||
void* fpcCtIt_Judge(fpcCtIt_JudgeFunc i_judgeFunc, void* i_data) {
|
||||
void* fpcCtIt_Judge(fpcCtIt_JudgeFunc i_judge, void* i_data) {
|
||||
node_judge_data iter;
|
||||
iter.mFunc = i_judgeFunc;
|
||||
iter.mpUserData = i_data;
|
||||
iter.method = i_judge;
|
||||
iter.data = i_data;
|
||||
return cLsIt_Judge(&g_fpcCtTg_Queue, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
|
||||
}
|
||||
|
||||
/* 80020A40-80020A94 0054+00 s=1 e=0 z=0 None .text
|
||||
* fpcCtIt_filter_JudgeInLayer__FP10create_tagP16fpcCtIt_jilprm_c */
|
||||
void* fpcCtIt_filter_JudgeInLayer(create_tag* i_createTag, fpcCtIt_jilprm_c* i_iterData) {
|
||||
create_request* create_req = static_cast<create_request*>(i_createTag->mBase.mpTagData);
|
||||
if (create_req->mpLayer->mLayerID == i_iterData->mLayerID) {
|
||||
return i_iterData->mFunc((node_class*)create_req->mpRes, i_iterData->mpUserData);
|
||||
create_request* create_req = (create_request*)i_createTag->base.mpTagData;
|
||||
|
||||
if (create_req->layer->layer_id == i_iterData->layer_id) {
|
||||
return i_iterData->method((node_class*)create_req->process, i_iterData->data);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80020A94-80020ACC 0038+00 s=0 e=1 z=0 None .text fpcCtIt_JudgeInLayer__FUiPFPvPv_PvPv */
|
||||
void* fpcCtIt_JudgeInLayer(fpc_ProcID i_layerID, fpcCtIt_JudgeFunc i_judgeFunc, void* i_data) {
|
||||
void* fpcCtIt_JudgeInLayer(fpc_ProcID i_layerID, fpcCtIt_JudgeFunc i_method, void* i_data) {
|
||||
fpcCtIt_jilprm_c data;
|
||||
data.mLayerID = i_layerID;
|
||||
data.mFunc = i_judgeFunc;
|
||||
data.mpUserData = i_data;
|
||||
data.layer_id = i_layerID;
|
||||
data.method = i_method;
|
||||
data.data = i_data;
|
||||
return fpcCtIt_Judge((fpcCtIt_JudgeFunc)fpcCtIt_filter_JudgeInLayer, &data);
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
|
||||
/* 80020ACC-80020AE8 001C+00 s=1 e=0 z=0 None .text fpcCtRq_isCreatingByID__FP10create_tagPUi
|
||||
*/
|
||||
bool fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_procID) {
|
||||
create_request* pReq = static_cast<create_request*>(i_createTag->mBase.mpTagData);
|
||||
return pReq->mBsPcId == *i_procID;
|
||||
bool fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id) {
|
||||
create_request* req = (create_request*)i_createTag->base.mpTagData;
|
||||
return req->id == *i_id;
|
||||
}
|
||||
|
||||
/* 80020AE8-80020B20 0038+00 s=0 e=2 z=0 None .text fpcCtRq_IsCreatingByID__FUi */
|
||||
@@ -25,81 +25,82 @@ BOOL fpcCtRq_IsCreatingByID(fpc_ProcID i_id) {
|
||||
|
||||
/* 80020B20-80020B5C 003C+00 s=1 e=0 z=0 None .text fpcCtRq_CreateQTo__FP14create_request */
|
||||
void fpcCtRq_CreateQTo(create_request* i_request) {
|
||||
fpcCtTg_CreateQTo(&i_request->mBase);
|
||||
fpcLy_CreatedMesg(i_request->mpLayer);
|
||||
fpcLy_CancelQTo(&i_request->mMtdTg);
|
||||
fpcCtTg_CreateQTo(&i_request->base);
|
||||
fpcLy_CreatedMesg(i_request->layer);
|
||||
fpcLy_CancelQTo(&i_request->method_tag);
|
||||
}
|
||||
|
||||
/* 80020B5C-80020BA0 0044+00 s=1 e=0 z=0 None .text fpcCtRq_ToCreateQ__FP14create_request */
|
||||
void fpcCtRq_ToCreateQ(create_request* i_request) {
|
||||
fpcLy_CreatingMesg(i_request->mpLayer);
|
||||
fpcLy_ToCancelQ(i_request->mpLayer, &i_request->mMtdTg);
|
||||
fpcCtTg_ToCreateQ(&i_request->mBase);
|
||||
fpcLy_CreatingMesg(i_request->layer);
|
||||
fpcLy_ToCancelQ(i_request->layer, &i_request->method_tag);
|
||||
fpcCtTg_ToCreateQ(&i_request->base);
|
||||
}
|
||||
|
||||
/* 80020BA0-80020C14 0074+00 s=2 e=0 z=0 None .text fpcCtRq_Delete__FP14create_request */
|
||||
BOOL fpcCtRq_Delete(create_request* i_request) {
|
||||
fpcCtRq_CreateQTo(i_request);
|
||||
if (i_request->mpCtRqMtd != NULL && fpcMtd_Method(i_request->mpCtRqMtd->mpDelete, i_request) == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
if (i_request->mpRes) {
|
||||
i_request->mpRes->mpCtRq = NULL;
|
||||
}
|
||||
cMl::free(i_request);
|
||||
return 1;
|
||||
if (i_request->methods != NULL && fpcMtd_Method(i_request->methods->delete_method, i_request) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (i_request->process != NULL) {
|
||||
i_request->process->create_req = NULL;
|
||||
}
|
||||
|
||||
cMl::free(i_request);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 80020C14-80020CAC 0098+00 s=2 e=2 z=0 None .text fpcCtRq_Cancel__FP14create_request */
|
||||
BOOL fpcCtRq_Cancel(create_request* i_request) {
|
||||
base_process_class* pProc;
|
||||
if (i_request != NULL && !i_request->mbIsCancelling) {
|
||||
i_request->mbIsCancelling = TRUE;
|
||||
pProc = i_request->mpRes;
|
||||
base_process_class* pproc;
|
||||
if (i_request != NULL && !i_request->is_cancel) {
|
||||
i_request->is_cancel = TRUE;
|
||||
pproc = i_request->process;
|
||||
|
||||
if (pProc != NULL && !fpcDt_Delete(pProc))
|
||||
if (pproc != NULL && !fpcDt_Delete(pproc))
|
||||
return FALSE;
|
||||
|
||||
if (i_request->mpCtRqMtd != NULL && !fpcMtd_Method(i_request->mpCtRqMtd->mpCancel, i_request))
|
||||
if (i_request->methods != NULL && !fpcMtd_Method(i_request->methods->cancel_method, i_request))
|
||||
return FALSE;
|
||||
|
||||
return fpcCtRq_Delete(i_request);
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 80020CAC-80020CC8 001C+00 s=0 e=1 z=0 None .text fpcCtRq_IsDoing__FP14create_request */
|
||||
s32 fpcCtRq_IsDoing(create_request* i_request) {
|
||||
BOOL fpcCtRq_IsDoing(create_request* i_request) {
|
||||
if (i_request != NULL)
|
||||
return i_request->mbIsCreating;
|
||||
return i_request->is_doing;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 80020CC8-80020D84 00BC+00 s=1 e=0 z=0 None .text fpcCtRq_Do__FP14create_request */
|
||||
BOOL fpcCtRq_Do(create_request* i_request) {
|
||||
s32 phase = cPhs_COMPLEATE_e;
|
||||
int phase = cPhs_COMPLEATE_e;
|
||||
|
||||
if (i_request->mpCtRqMtd != NULL) {
|
||||
cPhs__Handler pHandler = i_request->mpCtRqMtd->mpHandler;
|
||||
if (i_request->methods != NULL) {
|
||||
cPhs__Handler pHandler = i_request->methods->phase_handler;
|
||||
if (pHandler != NULL) {
|
||||
i_request->mbIsCreating = TRUE;
|
||||
i_request->is_doing = TRUE;
|
||||
phase = pHandler(i_request);
|
||||
i_request->mbIsCreating = FALSE;
|
||||
i_request->is_doing = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
switch (phase) {
|
||||
case cPhs_COMPLEATE_e: {
|
||||
s32 success = fpcEx_ToExecuteQ(i_request->mpRes);
|
||||
int success = fpcEx_ToExecuteQ(i_request->process);
|
||||
if (success == 0)
|
||||
return fpcCtRq_Cancel(i_request);
|
||||
else
|
||||
return fpcCtRq_Delete(i_request);
|
||||
}
|
||||
case 3:
|
||||
case cPhs_UNK3_e:
|
||||
case cPhs_ERROR_e:
|
||||
return fpcCtRq_Cancel(i_request);
|
||||
}
|
||||
@@ -108,26 +109,25 @@ BOOL fpcCtRq_Do(create_request* i_request) {
|
||||
}
|
||||
|
||||
/* 80020D84-80020DB0 002C+00 s=0 e=1 z=0 None .text fpcCtRq_Handler__Fv */
|
||||
|
||||
void fpcCtRq_Handler() {
|
||||
fpcCtIt_Method((fpcCtIt_MethodFunc)fpcCtRq_Do, NULL);
|
||||
}
|
||||
|
||||
/* 80020DB0-80020E38 0088+00 s=0 e=2 z=0 None .text
|
||||
* fpcCtRq_Create__FP11layer_classUlP27create_request_method_class */
|
||||
create_request* fpcCtRq_Create(layer_class* i_layer, u32 i_size, create_request_method_class* i_CtRqMethods) {
|
||||
create_request* pReq = (create_request*)cMl::memalignB(-4, i_size);
|
||||
create_request* fpcCtRq_Create(layer_class* i_layer, u32 i_size, create_request_method_class* i_methods) {
|
||||
create_request* req = (create_request*)cMl::memalignB(-4, i_size);
|
||||
|
||||
if (pReq != NULL) {
|
||||
fpcCtTg_Init(&pReq->mBase, pReq);
|
||||
fpcMtdTg_Init(&pReq->mMtdTg, (process_method_tag_func)fpcCtRq_Cancel, pReq);
|
||||
pReq->mpLayer = i_layer;
|
||||
pReq->mpCtRqMtd = i_CtRqMethods;
|
||||
pReq->mBsPcId = fpcBs_MakeOfId();
|
||||
pReq->mpRes = NULL;
|
||||
pReq->mbIsCancelling = FALSE;
|
||||
fpcCtRq_ToCreateQ(pReq);
|
||||
if (req != NULL) {
|
||||
fpcCtTg_Init(&req->base, req);
|
||||
fpcMtdTg_Init(&req->method_tag, (process_method_tag_func)fpcCtRq_Cancel, req);
|
||||
req->layer = i_layer;
|
||||
req->methods = i_methods;
|
||||
req->id = fpcBs_MakeOfId();
|
||||
req->process = NULL;
|
||||
req->is_cancel = FALSE;
|
||||
fpcCtRq_ToCreateQ(req);
|
||||
}
|
||||
|
||||
return pReq;
|
||||
return req;
|
||||
}
|
||||
|
||||
@@ -5,23 +5,21 @@
|
||||
|
||||
#include "f_pc/f_pc_create_tag.h"
|
||||
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A3990-803A39A0 000C+04 s=1 e=2 z=0 None .data g_fpcCtTg_Queue */
|
||||
node_list_class g_fpcCtTg_Queue = {NULL, NULL, 0};
|
||||
|
||||
/* 80020E38-80020E64 002C+00 s=0 e=1 z=0 None .text fpcCtTg_ToCreateQ__FP10create_tag */
|
||||
void fpcCtTg_ToCreateQ(create_tag* i_createTag) {
|
||||
cTg_Addition(&g_fpcCtTg_Queue, &i_createTag->mBase);
|
||||
cTg_Addition(&g_fpcCtTg_Queue, &i_createTag->base);
|
||||
}
|
||||
|
||||
/* 80020E64-80020E84 0020+00 s=0 e=1 z=0 None .text fpcCtTg_CreateQTo__FP10create_tag */
|
||||
void fpcCtTg_CreateQTo(create_tag* i_createTag) {
|
||||
cTg_SingleCut(&i_createTag->mBase);
|
||||
cTg_SingleCut(&i_createTag->base);
|
||||
}
|
||||
|
||||
/* 80020E84-80020EA8 0024+00 s=0 e=1 z=0 None .text fpcCtTg_Init__FP10create_tagPv */
|
||||
s32 fpcCtTg_Init(create_tag* i_createTag, void* i_data) {
|
||||
cTg_Create(&i_createTag->mBase, i_data);
|
||||
cTg_Create(&i_createTag->base, i_data);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,23 +7,19 @@
|
||||
#include "f_pc/f_pc_base.h"
|
||||
#include "f_pc/f_pc_create_req.h"
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 80020EA8-80020EC8 0020+00 s=0 e=1 z=0 None .text fpcCt_IsCreatingByID__FUi */
|
||||
BOOL fpcCt_IsCreatingByID(fpc_ProcID i_id) {
|
||||
return fpcCtRq_IsCreatingByID(i_id);
|
||||
}
|
||||
|
||||
/* 80020EC8-80020EEC 0024+00 s=0 e=1 z=0 None .text fpcCt_IsDoing__FP18base_process_class */
|
||||
s32 fpcCt_IsDoing(base_process_class* i_proc) {
|
||||
return fpcCtRq_IsDoing(i_proc->mpCtRq);
|
||||
BOOL fpcCt_IsDoing(base_process_class* i_proc) {
|
||||
return fpcCtRq_IsDoing(i_proc->create_req);
|
||||
}
|
||||
|
||||
/* 80020EEC-80020F10 0024+00 s=0 e=1 z=0 None .text fpcCt_Abort__FP18base_process_class */
|
||||
BOOL fpcCt_Abort(base_process_class* i_proc) {
|
||||
return fpcCtRq_Cancel(i_proc->mpCtRq);
|
||||
return fpcCtRq_Cancel(i_proc->create_req);
|
||||
}
|
||||
|
||||
/* 80020F10-80020F30 0020+00 s=0 e=1 z=0 None .text fpcCt_Handler__Fv */
|
||||
|
||||
@@ -5,34 +5,33 @@
|
||||
|
||||
#include "SSystem/SComponent/c_list.h"
|
||||
#include "f_pc/f_pc_delete_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A39A0-803A39B0 000C+04 s=2 e=1 z=0 None .data g_fpcDtTg_Queue */
|
||||
node_list_class g_fpcDtTg_Queue = {NULL, NULL, 0};
|
||||
|
||||
/* 80020F30-80020F48 0018+00 s=0 e=1 z=0 None .text fpcDtTg_IsEmpty__Fv */
|
||||
BOOL fpcDtTg_IsEmpty() {
|
||||
return checkEqual(g_fpcDtTg_Queue.mSize, 0);
|
||||
return g_fpcDtTg_Queue.mSize == 0 ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/* 80020F48-80020F7C 0034+00 s=1 e=1 z=0 None .text fpcDtTg_ToDeleteQ__FP16delete_tag_class */
|
||||
void fpcDtTg_ToDeleteQ(delete_tag_class* i_deleteTag) {
|
||||
i_deleteTag->mTimer = 1;
|
||||
cTg_Addition(&g_fpcDtTg_Queue, &i_deleteTag->mBase);
|
||||
i_deleteTag->timer = 1;
|
||||
cTg_Addition(&g_fpcDtTg_Queue, &i_deleteTag->base);
|
||||
}
|
||||
|
||||
/* 80020F7C-80020F9C 0020+00 s=1 e=0 z=0 None .text fpcDtTg_DeleteQTo__FP16delete_tag_class */
|
||||
void fpcDtTg_DeleteQTo(delete_tag_class* i_deleteTag) {
|
||||
cTg_SingleCut(&i_deleteTag->mBase);
|
||||
cTg_SingleCut(&i_deleteTag->base);
|
||||
}
|
||||
|
||||
/* 80020F9C-8002101C 0080+00 s=0 e=1 z=0 None .text fpcDtTg_Do__FP16delete_tag_classPFPv_i */
|
||||
s32 fpcDtTg_Do(delete_tag_class* i_deleteTag, delete_tag_func i_func) {
|
||||
if (i_deleteTag->mTimer <= 0) {
|
||||
if (i_deleteTag->timer <= 0) {
|
||||
s32 ret;
|
||||
fpcDtTg_DeleteQTo(i_deleteTag);
|
||||
ret = i_func(i_deleteTag->mBase.mpTagData);
|
||||
|
||||
ret = i_func(i_deleteTag->base.mpTagData);
|
||||
if (ret == 0) {
|
||||
fpcDtTg_ToDeleteQ(i_deleteTag);
|
||||
return 0;
|
||||
@@ -40,13 +39,13 @@ s32 fpcDtTg_Do(delete_tag_class* i_deleteTag, delete_tag_func i_func) {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
i_deleteTag->mTimer--;
|
||||
i_deleteTag->timer--;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8002101C-80021040 0024+00 s=0 e=1 z=0 None .text fpcDtTg_Init__FP16delete_tag_classPv */
|
||||
s32 fpcDtTg_Init(delete_tag_class* i_deleteTag, void* i_data) {
|
||||
cTg_Create(&i_deleteTag->mBase, i_data);
|
||||
cTg_Create(&i_deleteTag->base, i_data);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
+61
-54
@@ -9,6 +9,7 @@
|
||||
#include "f_pc/f_pc_executor.h"
|
||||
#include "f_pc/f_pc_load.h"
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
/* 80021040-80021060 0020+00 s=0 e=1 z=0 None .text fpcDt_IsComplete__Fv */
|
||||
BOOL fpcDt_IsComplete() {
|
||||
@@ -18,95 +19,101 @@ BOOL fpcDt_IsComplete() {
|
||||
/* 80021060-800210D4 0074+00 s=1 e=0 z=0 None .text fpcDt_deleteMethod__FP18base_process_class
|
||||
*/
|
||||
s32 fpcDt_deleteMethod(base_process_class* i_proc) {
|
||||
layer_class* layer = i_proc->mDtTg.mpLayer;
|
||||
s16 typeID = i_proc->mBsTypeId;
|
||||
layer_class* layer = i_proc->delete_tag.layer;
|
||||
s16 profname = i_proc->profname;
|
||||
|
||||
fpcLy_SetCurrentLayer(layer);
|
||||
fpcLnTg_QueueTo(&i_proc->mLnTg);
|
||||
fpcLnTg_QueueTo(&i_proc->line_tag_);
|
||||
|
||||
if (fpcBs_Delete(i_proc) == 1) {
|
||||
fpcLy_DeletedMesg(layer);
|
||||
fpcLd_Free(typeID);
|
||||
fpcLd_Free(profname);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 800210D4-8002110C 0038+00 s=0 e=1 z=0 None .text fpcDt_Handler__Fv */
|
||||
void fpcDt_Handler(void) {
|
||||
void fpcDt_Handler() {
|
||||
cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, fpcDt_deleteMethod);
|
||||
}
|
||||
|
||||
/* 8002110C-80021188 007C+00 s=1 e=0 z=0 None .text fpcDt_ToQueue__FP18base_process_class */
|
||||
s32 fpcDt_ToQueue(base_process_class* i_proc) {
|
||||
if (i_proc->mUnk0 != 1 && fpcBs_IsDelete(i_proc) == 1) {
|
||||
if (fpcPi_IsInQueue(&i_proc->mPi) == 1) {
|
||||
fpcPi_Delete(&i_proc->mPi);
|
||||
if (i_proc->unk_0xA != 1 && fpcBs_IsDelete(i_proc) == 1) {
|
||||
if (fpcPi_IsInQueue(&i_proc->priority) == 1) {
|
||||
fpcPi_Delete(&i_proc->priority);
|
||||
}
|
||||
i_proc->mDtTg.mpLayer = i_proc->mLyTg.mpLayer;
|
||||
fpcDtTg_ToDeleteQ(&i_proc->mDtTg);
|
||||
fpcLy_DeletingMesg(i_proc->mLyTg.mpLayer);
|
||||
|
||||
i_proc->delete_tag.layer = i_proc->layer_tag.layer;
|
||||
fpcDtTg_ToDeleteQ(&i_proc->delete_tag);
|
||||
fpcLy_DeletingMesg(i_proc->layer_tag.layer);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80021188-800212A4 011C+00 s=1 e=0 z=0 None .text fpcDt_ToDeleteQ__FP18base_process_class */
|
||||
s32 fpcDt_ToDeleteQ(base_process_class* i_proc) {
|
||||
if (i_proc->mUnk0 == 1) {
|
||||
if (i_proc->unk_0xA == 1) {
|
||||
return 0;
|
||||
} else {
|
||||
if (cTg_IsUse(&i_proc->mDtTg.mBase) != 0) {
|
||||
return 1;
|
||||
} else {
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->mSubType)) {
|
||||
process_node_class* procNode = (process_node_class*)i_proc;
|
||||
if (fpcNd_IsDeleteTiming(procNode) == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
layer_class* layer = &procNode->mLayer;
|
||||
fpcLy_Cancel(layer);
|
||||
if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fpcDt_ToQueue(i_proc) == 1) {
|
||||
// return type has to be BOOL
|
||||
if (fpcEx_IsExist(i_proc->mBsPcId) == 1) {
|
||||
if (fpcEx_ExecuteQTo(i_proc) == 0) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
// return type is wrong, has to be BOOL
|
||||
if (fpcCt_Abort(i_proc) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
i_proc->mInitState = 3;
|
||||
return 1;
|
||||
} else {
|
||||
if (cTg_IsUse(&i_proc->delete_tag.base)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->subtype)) {
|
||||
process_node_class* node = (process_node_class*)i_proc;
|
||||
if (fpcNd_IsDeleteTiming(node) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
layer_class* layer = &node->layer;
|
||||
|
||||
if (fpcLy_Cancel(layer) == 0) {
|
||||
JUT_ASSERT(0);
|
||||
}
|
||||
|
||||
|
||||
if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (fpcDt_ToQueue(i_proc) == 1) {
|
||||
if (fpcEx_IsExist(i_proc->id) == 1) {
|
||||
if (fpcEx_ExecuteQTo(i_proc) == 0) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (fpcCt_Abort(i_proc) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
i_proc->init_state = 3;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 800212A4-80021308 0064+00 s=0 e=3 z=0 None .text fpcDt_Delete__FPv */
|
||||
s32 fpcDt_Delete(void* i_proc) {
|
||||
base_process_class* proc = static_cast<base_process_class*>(i_proc);
|
||||
base_process_class* proc = (base_process_class*)i_proc;
|
||||
if (proc != NULL) {
|
||||
if (fpcCt_IsDoing(proc) == 1)
|
||||
if (fpcCt_IsDoing(proc) == TRUE)
|
||||
return 0;
|
||||
|
||||
if (proc->mInitState == 3)
|
||||
if (proc->init_state == 3)
|
||||
return 0;
|
||||
|
||||
return fpcDt_ToDeleteQ(proc);
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
+14
-12
@@ -12,29 +12,31 @@
|
||||
/* 80023954-800239F4 00A0+00 s=0 e=1 z=0 None .text fpcDw_Execute__FP18base_process_class */
|
||||
s32 fpcDw_Execute(base_process_class* i_proc) {
|
||||
if (!fpcPause_IsEnable(i_proc, 2)) {
|
||||
layer_class* curLay;
|
||||
layer_class* save_layer;
|
||||
s32 ret;
|
||||
process_method_func draw_func;
|
||||
curLay = fpcLy_CurrentLayer();
|
||||
if (fpcBs_Is_JustOfType(g_fpcLf_type, i_proc->mSubType)) {
|
||||
draw_func = ((leafdraw_method_class*)i_proc->mpPcMtd)->mpDrawFunc;
|
||||
|
||||
save_layer = fpcLy_CurrentLayer();
|
||||
if (fpcBs_Is_JustOfType(g_fpcLf_type, i_proc->subtype)) {
|
||||
draw_func = ((leafdraw_method_class*)i_proc->methods)->draw_method;
|
||||
} else {
|
||||
draw_func = ((nodedraw_method_class*)i_proc->mpPcMtd)->mpDrawFunc;
|
||||
draw_func = ((nodedraw_method_class*)i_proc->methods)->draw_method;
|
||||
}
|
||||
fpcLy_SetCurrentLayer(i_proc->mLyTg.mpLayer);
|
||||
|
||||
fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
|
||||
ret = draw_func(i_proc);
|
||||
fpcLy_SetCurrentLayer(curLay);
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
return ret;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 800239F4-80023A48 0054+00 s=0 e=2 z=10 None .text fpcDw_Handler__FPFPFPvPv_i_iPFPvPv_i */
|
||||
s32 fpcDw_Handler(fpcDw_HandlerFuncFunc param_1, fpcDw_HandlerFunc param_2) {
|
||||
s32 fpcDw_Handler(fpcDw_HandlerFuncFunc i_iterHandler, fpcDw_HandlerFunc i_func) {
|
||||
s32 ret;
|
||||
cAPIGph_BeforeOfDraw();
|
||||
ret = param_1(param_2);
|
||||
ret = i_iterHandler(i_func);
|
||||
cAPIGph_AfterOfDraw();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
#include "f_pc/f_pc_draw_priority.h"
|
||||
|
||||
/* 80021308-80021310 0008+00 s=0 e=1 z=0 None .text fpcDwPi_Get__FPC19draw_priority_class */
|
||||
s16 fpcDwPi_Get(const draw_priority_class* i_drawPrioClass) {
|
||||
return i_drawPrioClass->mPriority;
|
||||
s16 fpcDwPi_Get(const draw_priority_class* i_drawpriority) {
|
||||
return i_drawpriority->priority;
|
||||
}
|
||||
|
||||
/* 80021310-80021318 0008+00 s=1 e=0 z=0 None .text fpcDwPi_Set__FP19draw_priority_classs */
|
||||
void fpcDwPi_Set(draw_priority_class* i_drawPrioClass, s16 i_priority) {
|
||||
i_drawPrioClass->mPriority = i_priority;
|
||||
void fpcDwPi_Set(draw_priority_class* i_drawpriority, s16 i_priority) {
|
||||
i_drawpriority->priority = i_priority;
|
||||
}
|
||||
|
||||
/* 80021318-80021338 0020+00 s=0 e=1 z=0 None .text fpcDwPi_Init__FP19draw_priority_classs */
|
||||
void fpcDwPi_Init(draw_priority_class* i_drawPrioClass, s16 i_priority) {
|
||||
fpcDwPi_Set(i_drawPrioClass, i_priority);
|
||||
}
|
||||
void fpcDwPi_Init(draw_priority_class* i_drawpriority, s16 i_priority) {
|
||||
fpcDwPi_Set(i_drawpriority, i_priority);
|
||||
}
|
||||
|
||||
+19
-18
@@ -28,27 +28,28 @@ BOOL fpcEx_IsExist(fpc_ProcID i_id) {
|
||||
|
||||
/* 800213C4-80021418 0054+00 s=0 e=1 z=0 None .text fpcEx_Execute__FP18base_process_class */
|
||||
s32 fpcEx_Execute(base_process_class* i_proc) {
|
||||
if (i_proc->mInitState != 2 || fpcPause_IsEnable(i_proc, 1) == 1)
|
||||
if (i_proc->init_state != 2 || fpcPause_IsEnable(i_proc, 1) == TRUE)
|
||||
return 0;
|
||||
|
||||
return fpcBs_Execute(i_proc);
|
||||
}
|
||||
|
||||
/* 80021418-800214C4 00AC+00 s=1 e=0 z=0 None .text fpcEx_ToLineQ__FP18base_process_class */
|
||||
s32 fpcEx_ToLineQ(base_process_class* i_proc) {
|
||||
layer_class* pLayer = i_proc->mLyTg.mpLayer;
|
||||
base_process_class* pLayerPcNode = &pLayer->mpPcNode->mBase;
|
||||
layer_class* layer = i_proc->layer_tag.layer;
|
||||
base_process_class* process = &layer->process_node->base;
|
||||
|
||||
if (pLayer->mLayerID == 0 || cTg_IsUse(&pLayerPcNode->mLnTg.mBase) == TRUE) {
|
||||
s32 ret = fpcLnTg_ToQueue(&i_proc->mLnTg, i_proc->mPi.mInfoCurr.mListID);
|
||||
if (layer->layer_id == fpcLy_ROOT_e || cTg_IsUse(&process->line_tag_.base) == TRUE) {
|
||||
s32 ret = fpcLnTg_ToQueue(&i_proc->line_tag_, i_proc->priority.current_info.list_id);
|
||||
if (ret == 0) {
|
||||
fpcLyTg_QueueTo(&i_proc->mLyTg);
|
||||
fpcLyTg_QueueTo(&i_proc->layer_tag);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i_proc->mInitState = 2;
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->mSubType)) {
|
||||
process_node_class* pNode = (process_node_class*)i_proc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, pNode);
|
||||
i_proc->init_state = 2;
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->subtype)) {
|
||||
process_node_class* node = (process_node_class*)i_proc;
|
||||
fpcLyIt_OnlyHere(&node->layer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, node);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -60,26 +61,26 @@ s32 fpcEx_ToLineQ(base_process_class* i_proc) {
|
||||
/* 800214C4-80021510 004C+00 s=0 e=1 z=0 None .text fpcEx_ExecuteQTo__FP18base_process_class
|
||||
*/
|
||||
s32 fpcEx_ExecuteQTo(base_process_class* i_proc) {
|
||||
s32 ret = fpcLyTg_QueueTo(&i_proc->mLyTg);
|
||||
s32 ret = fpcLyTg_QueueTo(&i_proc->layer_tag);
|
||||
if (ret == 1) {
|
||||
i_proc->mInitState = 3;
|
||||
i_proc->init_state = 3;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80021510-80021568 0058+00 s=0 e=1 z=0 None .text fpcEx_ToExecuteQ__FP18base_process_class
|
||||
*/
|
||||
s32 fpcEx_ToExecuteQ(base_process_class* i_proc) {
|
||||
s32 ret = fpcLyTg_ToQueue(&i_proc->mLyTg, i_proc->mPi.mInfoCurr.mLayer,
|
||||
i_proc->mPi.mInfoCurr.mListID, i_proc->mPi.mInfoCurr.mListPrio);
|
||||
s32 ret = fpcLyTg_ToQueue(&i_proc->layer_tag, i_proc->priority.current_info.layer_id,
|
||||
i_proc->priority.current_info.list_id, i_proc->priority.current_info.list_priority);
|
||||
if (ret == 1) {
|
||||
fpcEx_ToLineQ(i_proc);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80021568-80021588 0020+00 s=0 e=1 z=0 None .text fpcEx_Handler__FPFPvPv_i */
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
|
||||
/* 80023A48-80023A98 0050+00 s=1 e=3 z=52 None .text fpcFCtRq_Do__FP19fast_create_request */
|
||||
s32 fpcFCtRq_Do(fast_create_request* i_createReq) {
|
||||
if (i_createReq->mpFastCreateFunc != NULL &&
|
||||
i_createReq->mpFastCreateFunc(i_createReq->mBase.mpRes, i_createReq->mpFastCreateData) == 0)
|
||||
if (i_createReq->create_func != NULL &&
|
||||
i_createReq->create_func(i_createReq->base.process, i_createReq->data) == 0)
|
||||
{
|
||||
return 3;
|
||||
return cPhs_UNK3_e;
|
||||
} else {
|
||||
return 4;
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,32 +27,36 @@ s32 fpcFCtRq_Delete(fast_create_request* i_createReq) {
|
||||
|
||||
/* 80023AA0-80023B70 00D0+00 s=0 e=3 z=43 None .text
|
||||
* fpcFCtRq_Request__FP11layer_classsPFPvPv_iPvPv */
|
||||
base_process_class* fpcFCtRq_Request(layer_class* i_layer, s16 i_procTypeID,
|
||||
fstCreateFunc i_createFunc, void* i_createData, void* pData) {
|
||||
base_process_class* fpcFCtRq_Request(layer_class* i_layer, s16 i_procname,
|
||||
fstCreateFunc i_createFunc, void* i_createData, void* i_append) {
|
||||
static create_request_method_class submethod = {(cPhs__Handler)fpcFCtRq_Do, NULL,
|
||||
(process_method_func)fpcFCtRq_Delete};
|
||||
|
||||
if (!fpcLd_Use(i_procTypeID)) {
|
||||
return NULL;
|
||||
} else {
|
||||
fast_create_request* request =
|
||||
(fast_create_request*)fpcCtRq_Create(i_layer, 0x50, &submethod);
|
||||
if (request != NULL) {
|
||||
base_process_class* proc;
|
||||
fpcLy_SetCurrentLayer(i_layer);
|
||||
proc = fpcBs_Create(i_procTypeID, fpcBs_MakeOfId(), pData);
|
||||
if (proc != NULL) {
|
||||
proc->mpCtRq = (struct create_request*)request;
|
||||
request->mBase.mpRes = proc;
|
||||
request->mBase.mBsPcId = proc->mBsPcId;
|
||||
if (fpcBs_SubCreate(proc) == 2) {
|
||||
request->mpFastCreateFunc = i_createFunc;
|
||||
request->mpFastCreateData = i_createData;
|
||||
return proc;
|
||||
}
|
||||
}
|
||||
fpcCtRq_Cancel(&request->mBase);
|
||||
}
|
||||
if (!fpcLd_Use(i_procname)) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
fast_create_request* request =
|
||||
(fast_create_request*)fpcCtRq_Create(i_layer, sizeof(fast_create_request), &submethod);
|
||||
if (request != NULL) {
|
||||
base_process_class* proc;
|
||||
fpcLy_SetCurrentLayer(i_layer);
|
||||
|
||||
proc = fpcBs_Create(i_procname, fpcBs_MakeOfId(), i_append);
|
||||
if (proc != NULL) {
|
||||
proc->create_req = &request->base;
|
||||
request->base.process = proc;
|
||||
request->base.id = proc->id;
|
||||
|
||||
if (fpcBs_SubCreate(proc) == 2) {
|
||||
request->create_func = i_createFunc;
|
||||
request->data = i_createData;
|
||||
return proc;
|
||||
}
|
||||
}
|
||||
|
||||
fpcCtRq_Cancel(&request->base);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+35
-37
@@ -3,7 +3,6 @@
|
||||
* Framework - Process Layer
|
||||
*/
|
||||
|
||||
#include "f_pc/f_pc_layer.h"
|
||||
#include "f_pc/f_pc_layer.h"
|
||||
#include "f_pc/f_pc_method_iter.h"
|
||||
#include "f_pc/f_pc_method_tag.h"
|
||||
@@ -17,7 +16,7 @@ void fpcLy_CancelQTo(process_method_tag_class* i_methods) {
|
||||
/* 800215A8-800215CC 0024+00 s=0 e=3 z=0 None .text
|
||||
* fpcLy_ToCancelQ__FP11layer_classP24process_method_tag_class */
|
||||
s32 fpcLy_ToCancelQ(layer_class* i_layer, process_method_tag_class* i_methods) {
|
||||
return fpcMtdTg_ToMethodQ(&i_layer->mCancelList, i_methods);
|
||||
return fpcMtdTg_ToMethodQ(&i_layer->cancel_list, i_methods);
|
||||
}
|
||||
|
||||
/* 800215CC-800215F8 002C+00 s=1 e=0 z=0 None .text
|
||||
@@ -29,13 +28,13 @@ bool fpcLy_CancelMethod(process_method_tag_class* i_layer) {
|
||||
/* 800215F8-8002161C 0024+00 s=0 e=1 z=0 None .text
|
||||
* fpcLy_IntoQueue__FP11layer_classiP16create_tag_classi */
|
||||
s32 fpcLy_IntoQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag, int i_no) {
|
||||
return cTg_InsertToTree(&i_layer->mNodeListTree, i_treeListNo, i_createTag, i_no);
|
||||
return cTg_InsertToTree(&i_layer->node_tree, i_treeListNo, i_createTag, i_no);
|
||||
}
|
||||
|
||||
/* 8002161C-80021640 0024+00 s=0 e=1 z=0 None .text
|
||||
* fpcLy_ToQueue__FP11layer_classiP16create_tag_class */
|
||||
s32 fpcLy_ToQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag) {
|
||||
return cTg_AdditionToTree(&i_layer->mNodeListTree, i_treeListNo, i_createTag);
|
||||
return cTg_AdditionToTree(&i_layer->node_tree, i_treeListNo, i_createTag);
|
||||
}
|
||||
|
||||
/* 80021640-80021664 0024+00 s=0 e=1 z=0 None .text
|
||||
@@ -46,57 +45,55 @@ s32 fpcLy_QueueTo(layer_class* i_layer, create_tag_class* i_createTag) {
|
||||
|
||||
/* 80021664-80021678 0014+00 s=0 e=1 z=0 None .text fpcLy_IsDeletingMesg__FP11layer_class */
|
||||
BOOL fpcLy_IsDeletingMesg(layer_class* i_layer) {
|
||||
return i_layer->counts.mDeletingCount > 0;
|
||||
return i_layer->counts.delete_count > 0;
|
||||
}
|
||||
|
||||
/* 80021678-80021688 0010+00 s=0 e=1 z=0 None .text fpcLy_DeletingMesg__FP11layer_class */
|
||||
void fpcLy_DeletingMesg(layer_class* i_layer) {
|
||||
i_layer->counts.mDeletingCount++;
|
||||
i_layer->counts.delete_count++;
|
||||
}
|
||||
|
||||
/* 80021688-800216A0 0018+00 s=0 e=1 z=0 None .text fpcLy_DeletedMesg__FP11layer_class */
|
||||
void fpcLy_DeletedMesg(layer_class* i_layer) {
|
||||
if (i_layer->counts.mDeletingCount > 0) {
|
||||
i_layer->counts.mDeletingCount--;
|
||||
if (i_layer->counts.delete_count > 0) {
|
||||
i_layer->counts.delete_count--;
|
||||
}
|
||||
}
|
||||
|
||||
/* 800216A0-800216B4 0014+00 s=0 e=2 z=0 None .text fpcLy_IsCreatingMesg__FP11layer_class */
|
||||
BOOL fpcLy_IsCreatingMesg(layer_class* i_layer) {
|
||||
return i_layer->counts.mCreatingCount > 0;
|
||||
return i_layer->counts.create_count > 0;
|
||||
}
|
||||
|
||||
/* 800216B4-800216C4 0010+00 s=0 e=2 z=0 None .text fpcLy_CreatingMesg__FP11layer_class */
|
||||
void fpcLy_CreatingMesg(layer_class* i_layer) {
|
||||
i_layer->counts.mCreatingCount++;
|
||||
i_layer->counts.create_count++;
|
||||
}
|
||||
|
||||
/* 800216C4-800216DC 0018+00 s=0 e=2 z=0 None .text fpcLy_CreatedMesg__FP11layer_class */
|
||||
void fpcLy_CreatedMesg(layer_class* i_layer) {
|
||||
if (i_layer->counts.mCreatingCount > 0) {
|
||||
i_layer->counts.mCreatingCount--;
|
||||
if (i_layer->counts.create_count > 0) {
|
||||
i_layer->counts.create_count--;
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A39B0-803A39DC 002C+00 s=2 e=0 z=0 None .data l_fpcLy_Crear */
|
||||
layer_class l_fpcLy_Crear = {
|
||||
NULL, NULL, 0, 0xFFFFFFFF, NULL, 0, NULL, NULL, NULL, 0, 0, 0,
|
||||
};
|
||||
|
||||
/* 803A39DC-803A39E8 000C+00 s=3 e=0 z=0 None .data l_fpcLy_LayerList */
|
||||
node_list_class l_fpcLy_LayerList = {
|
||||
static node_list_class l_fpcLy_LayerList = {
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
};
|
||||
|
||||
/* 800216DC-800216EC 0010+00 s=2 e=3 z=0 None .text fpcLy_RootLayer__Fv */
|
||||
layer_class* fpcLy_RootLayer(void) {
|
||||
layer_class* fpcLy_RootLayer() {
|
||||
return (layer_class*)l_fpcLy_LayerList.mpHead;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450D18-80450D1C 0004+00 s=2 e=0 z=0 None .sbss l_fpcLy_CurrLayer_p */
|
||||
static layer_class* l_fpcLy_CurrLayer_p;
|
||||
|
||||
@@ -114,19 +111,20 @@ layer_class* fpcLy_CurrentLayer() {
|
||||
layer_class* fpcLy_Search(fpc_ProcID i_id) {
|
||||
layer_class* layer_p = fpcLy_RootLayer();
|
||||
while (layer_p != NULL) {
|
||||
if (layer_p->mLayerID == i_id) {
|
||||
if (layer_p->layer_id == i_id) {
|
||||
return layer_p;
|
||||
}
|
||||
layer_p = (layer_class*)layer_p->mNode.mpNextNode;
|
||||
layer_p = (layer_class*)layer_p->node.mpNextNode;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 8002174C-800217BC 0070+00 s=0 e=5 z=0 None .text fpcLy_Layer__FUi */
|
||||
layer_class* fpcLy_Layer(fpc_ProcID i_id) {
|
||||
if (i_id == 0 || fpcLy_RootLayer()->mLayerID == i_id) {
|
||||
if (i_id == 0 || fpcLy_RootLayer()->layer_id == i_id) {
|
||||
return fpcLy_RootLayer();
|
||||
} else if (i_id == ~2 || fpcLy_CurrentLayer()->mLayerID == i_id) {
|
||||
} else if (i_id == fpcLy_CURRENT_e || fpcLy_CurrentLayer()->layer_id == i_id) {
|
||||
return fpcLy_CurrentLayer();
|
||||
} else {
|
||||
return fpcLy_Search(i_id);
|
||||
@@ -140,40 +138,40 @@ void fpcLy_Regist(layer_class* i_layer) {
|
||||
|
||||
/* 800217E8-8002189C 00B4+00 s=0 e=1 z=0 None .text fpcLy_Delete__FP11layer_class */
|
||||
s32 fpcLy_Delete(layer_class* i_layer) {
|
||||
if (i_layer->mNodeListTree.mpLists->mSize == 0 && i_layer->mCancelList.mSize == 0) {
|
||||
if (i_layer->node_tree.mpLists->mSize == 0 && i_layer->cancel_list.mSize == 0) {
|
||||
cLs_SingleCut((node_class*)i_layer);
|
||||
*i_layer = l_fpcLy_Crear;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 8002189C-800218C8 002C+00 s=0 e=1 z=0 None .text fpcLy_Cancel__FP11layer_class */
|
||||
void fpcLy_Cancel(layer_class* i_layer) {
|
||||
fpcMtdIt_Method(&i_layer->mCancelList, (fpcMtdIt_MethodFunc)fpcLy_CancelMethod);
|
||||
int fpcLy_Cancel(layer_class* i_layer) {
|
||||
return fpcMtdIt_Method(&i_layer->cancel_list, (fpcMtdIt_MethodFunc)fpcLy_CancelMethod);
|
||||
}
|
||||
|
||||
/* 800218C8-80021A00 0138+00 s=0 e=2 z=0 None .text
|
||||
* fpcLy_Create__FP11layer_classPvP15node_list_classi */
|
||||
void fpcLy_Create(layer_class* i_layer, void* i_node, node_list_class* i_nodeList, int i_numLists) {
|
||||
void* pvVar1;
|
||||
s32 iVar2;
|
||||
static BOOL IsInitOfLayerList = TRUE;
|
||||
static fpc_ProcID layer_id = 0;
|
||||
|
||||
static int IsInitOfLayerList = 1;
|
||||
static int layer_id = 0;
|
||||
*i_layer = l_fpcLy_Crear;
|
||||
cNd_Create((node_class*)i_layer, NULL);
|
||||
i_layer->mLayerID = layer_id++;
|
||||
i_layer->mpPcNode = static_cast<process_node_class*>(i_node);
|
||||
if (IsInitOfLayerList == 1) {
|
||||
IsInitOfLayerList = 0;
|
||||
|
||||
i_layer->layer_id = layer_id++;
|
||||
i_layer->process_node = (process_node_class*)i_node;
|
||||
|
||||
if (IsInitOfLayerList == TRUE) {
|
||||
IsInitOfLayerList = FALSE;
|
||||
cLs_Create(&l_fpcLy_LayerList);
|
||||
fpcLy_SetCurrentLayer(i_layer);
|
||||
}
|
||||
(i_layer->mNodeListTree).mpLists = i_nodeList;
|
||||
(i_layer->mNodeListTree).mNumLists = i_numLists;
|
||||
cTr_Create(&i_layer->mNodeListTree, (i_layer->mNodeListTree).mpLists,
|
||||
(i_layer->mNodeListTree).mNumLists);
|
||||
|
||||
i_layer->node_tree.mpLists = i_nodeList;
|
||||
i_layer->node_tree.mNumLists = i_numLists;
|
||||
cTr_Create(&i_layer->node_tree, i_layer->node_tree.mpLists, i_layer->node_tree.mNumLists);
|
||||
fpcLy_Regist(i_layer);
|
||||
}
|
||||
|
||||
@@ -11,47 +11,49 @@
|
||||
/* 80021B88-80021BC0 0038+00 s=1 e=4 z=0 None .text fpcLyIt_OnlyHere__FP11layer_classPFPvPv_iPv
|
||||
*/
|
||||
s32 fpcLyIt_OnlyHere(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void* i_data) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = i_func;
|
||||
lIter.mpUserData = i_data;
|
||||
return cTrIt_Method(&i_layer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter);
|
||||
layer_iter iter;
|
||||
iter.func = i_func;
|
||||
iter.data = i_data;
|
||||
return cTrIt_Method(&i_layer->node_tree, (cNdIt_MethodFunc)cTgIt_MethodCall, &iter);
|
||||
}
|
||||
|
||||
/* 80021BC0-80021C28 0068+00 s=0 e=1 z=0 None .text fpcLyIt_OnlyHereLY__FP11layer_classPFPvPv_iPv
|
||||
*/
|
||||
s32 fpcLyIt_OnlyHereLY(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void* i_data) {
|
||||
s32 result;
|
||||
layer_class* currentLayer = fpcLy_CurrentLayer();
|
||||
layer_class* save_layer = fpcLy_CurrentLayer();
|
||||
|
||||
fpcLy_SetCurrentLayer(i_layer);
|
||||
result = fpcLyIt_OnlyHere(i_layer, i_func, i_data);
|
||||
fpcLy_SetCurrentLayer(currentLayer);
|
||||
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 80021C28-80021C60 0038+00 s=0 e=3 z=0 None .text fpcLyIt_Judge__FP11layer_classPFPvPv_PvPv
|
||||
*/
|
||||
void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = i_func;
|
||||
lIter.mpUserData = i_data;
|
||||
return cTrIt_Judge(&i_layer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
|
||||
layer_iter iter;
|
||||
iter.func = i_func;
|
||||
iter.data = i_data;
|
||||
return cTrIt_Judge(&i_layer->node_tree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
|
||||
}
|
||||
|
||||
/* 80021C60-80021CD4 0074+00 s=0 e=1 z=4 None .text fpcLyIt_AllJudge__FPFPvPv_PvPv */
|
||||
void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc i_func, void* i_data) {
|
||||
layer_iter lIter;
|
||||
layer_iter iter;
|
||||
layer_class* current;
|
||||
lIter.mpFunc = i_func;
|
||||
lIter.mpUserData = i_data;
|
||||
iter.func = i_func;
|
||||
iter.data = i_data;
|
||||
|
||||
current = fpcLy_RootLayer();
|
||||
while (current != NULL) {
|
||||
void* result =
|
||||
cTrIt_Judge(¤t->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
|
||||
cTrIt_Judge(¤t->node_tree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
|
||||
if (result != NULL) {
|
||||
return result;
|
||||
}
|
||||
current = (layer_class*)current->mNode.mpNextNode;
|
||||
current = (layer_class*)current->node.mpNextNode;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+39
-37
@@ -8,54 +8,55 @@
|
||||
|
||||
/* 80021CD4-80021DCC 00F8+00 s=1 e=1 z=0 None .text
|
||||
* fpcLyTg_ToQueue__FP26layer_management_tag_classUiUsUs */
|
||||
s32 fpcLyTg_ToQueue(layer_management_tag_class* i_LyTag, fpc_ProcID i_layerID, u16 i_listID,
|
||||
s32 fpcLyTg_ToQueue(layer_management_tag_class* i_layer_tag, fpc_ProcID i_layerID, u16 i_listID,
|
||||
u16 i_listPriority) {
|
||||
if (i_LyTag->mpLayer == NULL && i_layerID == -1) {
|
||||
if (i_layer_tag->layer == NULL && i_layerID == fpcLy_NONE_e) {
|
||||
return 0;
|
||||
} else {
|
||||
// ghidra says i_layerID is unsigned?
|
||||
if (i_layerID != -1 && i_layerID != -3 && i_LyTag->mpLayer->mLayerID != i_layerID) {
|
||||
i_LyTag->mpLayer = fpcLy_Layer(i_layerID);
|
||||
}
|
||||
if (i_layerID == -1 || i_layerID == -3) {
|
||||
s32 tmp = fpcLy_ToQueue(i_LyTag->mpLayer, i_listID, &i_LyTag->mCreateTag);
|
||||
if (tmp != 0) {
|
||||
i_LyTag->mNodeListID = i_listID;
|
||||
i_LyTag->mNodeListIdx = tmp - 1;
|
||||
return 1;
|
||||
}
|
||||
} else if (fpcLy_IntoQueue(i_LyTag->mpLayer, i_listID, &i_LyTag->mCreateTag,
|
||||
i_listPriority) != 0)
|
||||
{
|
||||
i_LyTag->mNodeListID = i_listID;
|
||||
i_LyTag->mNodeListIdx = i_listPriority;
|
||||
}
|
||||
|
||||
if (i_layerID != fpcLy_NONE_e && i_layerID != fpcLy_CURRENT_e && i_layer_tag->layer->layer_id != i_layerID) {
|
||||
i_layer_tag->layer = fpcLy_Layer(i_layerID);
|
||||
}
|
||||
|
||||
if (i_layerID == fpcLy_NONE_e || i_layerID == fpcLy_CURRENT_e) {
|
||||
s32 result = fpcLy_ToQueue(i_layer_tag->layer, i_listID, &i_layer_tag->create_tag);
|
||||
if (result != 0) {
|
||||
i_layer_tag->node_list_id = i_listID;
|
||||
i_layer_tag->node_list_priority = result - 1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
} else if (fpcLy_IntoQueue(i_layer_tag->layer, i_listID, &i_layer_tag->create_tag,
|
||||
i_listPriority) != 0)
|
||||
{
|
||||
i_layer_tag->node_list_id = i_listID;
|
||||
i_layer_tag->node_list_priority = i_listPriority;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 fpcLyTg_QueueTo(layer_management_tag_class* i_LyTag) {
|
||||
if (fpcLy_QueueTo(i_LyTag->mpLayer, &i_LyTag->mCreateTag) == 1) {
|
||||
i_LyTag->mpLayer = NULL;
|
||||
i_LyTag->mNodeListID = 0xFFFF;
|
||||
i_LyTag->mNodeListIdx = 0xFFFF;
|
||||
s32 fpcLyTg_QueueTo(layer_management_tag_class* i_layer_tag) {
|
||||
if (fpcLy_QueueTo(i_layer_tag->layer, &i_layer_tag->create_tag) == 1) {
|
||||
i_layer_tag->layer = NULL;
|
||||
i_layer_tag->node_list_id = 0xFFFF;
|
||||
i_layer_tag->node_list_priority = 0xFFFF;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80021E2C-80021EB0 0084+00 s=0 e=1 z=0 None .text
|
||||
* fpcLyTg_Move__FP26layer_management_tag_classUiUsUs */
|
||||
s32 fpcLyTg_Move(layer_management_tag_class* i_LyTag, fpc_ProcID i_layerID, u16 i_listID,
|
||||
s32 fpcLyTg_Move(layer_management_tag_class* i_layer_tag, fpc_ProcID i_layerID, u16 i_listID,
|
||||
u16 i_listPriority) {
|
||||
layer_class* layer = fpcLy_Layer(i_layerID);
|
||||
if (layer == NULL) {
|
||||
return 0;
|
||||
} else if (fpcLyTg_QueueTo(i_LyTag) == 0x1) {
|
||||
i_LyTag->mpLayer = layer;
|
||||
return fpcLyTg_ToQueue(i_LyTag, i_layerID, i_listID, i_listPriority);
|
||||
} else if (fpcLyTg_QueueTo(i_layer_tag) == 1) {
|
||||
i_layer_tag->layer = layer;
|
||||
return fpcLyTg_ToQueue(i_layer_tag, i_layerID, i_listID, i_listPriority);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -63,19 +64,20 @@ s32 fpcLyTg_Move(layer_management_tag_class* i_LyTag, fpc_ProcID i_layerID, u16
|
||||
|
||||
/* 80021EB0-80021F64 00B4+00 s=0 e=1 z=0 None .text
|
||||
* fpcLyTg_Init__FP26layer_management_tag_classUiPv */
|
||||
s32 fpcLyTg_Init(layer_management_tag_class* i_LyTag, fpc_ProcID i_id, void* i_data) {
|
||||
s32 fpcLyTg_Init(layer_management_tag_class* i_layer_tag, fpc_ProcID i_id, void* i_data) {
|
||||
static layer_management_tag_class crear = {
|
||||
NULL, NULL, NULL, NULL, 0, NULL, 0xFFFF, 0xFFFF,
|
||||
};
|
||||
|
||||
layer_class* layer;
|
||||
*i_LyTag = crear;
|
||||
cTg_Create(&i_LyTag->mCreateTag, i_data);
|
||||
*i_layer_tag = crear;
|
||||
cTg_Create(&i_layer_tag->create_tag, i_data);
|
||||
|
||||
layer = fpcLy_Layer(i_id);
|
||||
if (layer != NULL) {
|
||||
i_LyTag->mpLayer = layer;
|
||||
i_layer_tag->layer = layer;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+19
-20
@@ -7,63 +7,62 @@
|
||||
|
||||
/* 80021A00-80021A24 0024+00 s=0 e=4 z=2 None .text fpcLf_GetPriority__FPC14leafdraw_class */
|
||||
s16 fpcLf_GetPriority(const leafdraw_class* i_leaf) {
|
||||
return fpcDwPi_Get(&i_leaf->mDwPi);
|
||||
return fpcDwPi_Get(&i_leaf->draw_priority);
|
||||
}
|
||||
|
||||
/* 80021A24-80021A48 0024+00 s=1 e=6 z=0 None .text fpcLf_DrawMethod__FP21leafdraw_method_classPv
|
||||
*/
|
||||
s32 fpcLf_DrawMethod(leafdraw_method_class* i_methods, void* i_data) {
|
||||
return fpcMtd_Method(i_methods->mpDrawFunc, i_data);
|
||||
s32 fpcLf_DrawMethod(leafdraw_method_class* i_methods, void* i_process) {
|
||||
return fpcMtd_Method(i_methods->draw_method, i_process);
|
||||
}
|
||||
|
||||
/* 80021A48-80021A80 0038+00 s=1 e=0 z=0 None .text fpcLf_Draw__FP14leafdraw_class */
|
||||
s32 fpcLf_Draw(leafdraw_class* i_leaf) {
|
||||
s32 ret = 0;
|
||||
if (i_leaf->mbUnk0 == 0)
|
||||
ret = fpcLf_DrawMethod(i_leaf->mpDrawMtd, i_leaf);
|
||||
if (i_leaf->unk_0xBC == 0)
|
||||
ret = fpcLf_DrawMethod(i_leaf->leaf_methods, i_leaf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80021A80-80021AA8 0028+00 s=1 e=0 z=0 None .text fpcLf_Execute__FP14leafdraw_class */
|
||||
s32 fpcLf_Execute(leafdraw_class* i_leaf) {
|
||||
return fpcMtd_Execute(&i_leaf->mpDrawMtd->mBase, i_leaf);
|
||||
return fpcMtd_Execute(&i_leaf->leaf_methods->base, i_leaf);
|
||||
}
|
||||
|
||||
/* 80021AA8-80021AD0 0028+00 s=1 e=0 z=0 None .text fpcLf_IsDelete__FP14leafdraw_class */
|
||||
s32 fpcLf_IsDelete(leafdraw_class* i_leaf) {
|
||||
return fpcMtd_IsDelete(&i_leaf->mpDrawMtd->mBase, i_leaf);
|
||||
return fpcMtd_IsDelete(&i_leaf->leaf_methods->base, i_leaf);
|
||||
}
|
||||
|
||||
/* 80021AD0-80021B14 0044+00 s=1 e=0 z=0 None .text fpcLf_Delete__FP14leafdraw_class */
|
||||
s32 fpcLf_Delete(leafdraw_class* i_leaf) {
|
||||
s32 ret = fpcMtd_Delete(&i_leaf->mpDrawMtd->mBase, i_leaf);
|
||||
s32 ret = fpcMtd_Delete(&i_leaf->leaf_methods->base, i_leaf);
|
||||
if (ret == 1) {
|
||||
i_leaf->mBase.mSubType = 0;
|
||||
i_leaf->base.subtype = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450D30-80450D38 0004+04 s=1 e=1 z=0 None .sbss g_fpcLf_type */
|
||||
int g_fpcLf_type;
|
||||
|
||||
/* 80021B14-80021B88 0074+00 s=1 e=0 z=0 None .text fpcLf_Create__FP14leafdraw_class */
|
||||
s32 fpcLf_Create(leafdraw_class* i_leaf) {
|
||||
leaf_process_profile_definition* profDef;
|
||||
if (i_leaf->mBase.mInitState == 0) {
|
||||
profDef = (leaf_process_profile_definition*)i_leaf->mBase.mpProf;
|
||||
i_leaf->mpDrawMtd = profDef->sub_method;
|
||||
i_leaf->mBase.mSubType = fpcBs_MakeOfType(&g_fpcLf_type);
|
||||
fpcDwPi_Init(&i_leaf->mDwPi, profDef->mPriority);
|
||||
i_leaf->mbUnk0 = 0;
|
||||
leaf_process_profile_definition* pprofile;
|
||||
if (i_leaf->base.init_state == 0) {
|
||||
pprofile = (leaf_process_profile_definition*)i_leaf->base.profile;
|
||||
i_leaf->leaf_methods = pprofile->sub_method;
|
||||
i_leaf->base.subtype = fpcBs_MakeOfType(&g_fpcLf_type);
|
||||
fpcDwPi_Init(&i_leaf->draw_priority, pprofile->priority);
|
||||
i_leaf->unk_0xBC = 0;
|
||||
}
|
||||
return fpcMtd_Create(&i_leaf->mpDrawMtd->mBase, i_leaf);
|
||||
|
||||
return fpcMtd_Create(&i_leaf->leaf_methods->base, i_leaf);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A39E8-803A3A00 0014+04 s=0 e=27 z=756 None .data g_fpcLf_Method */
|
||||
leafdraw_method_class g_fpcLf_Method = {
|
||||
(process_method_func)fpcLf_Create, (process_method_func)fpcLf_Delete,
|
||||
(process_method_func)fpcLf_Execute, (process_method_func)fpcLf_IsDelete,
|
||||
(process_method_func)fpcLf_Draw,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -7,21 +7,19 @@
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "global.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803F4CF0-803F4DB0 00C0+00 s=2 e=0 z=0 None .bss l_fpcLn_Line */
|
||||
static node_list_class l_fpcLn_Line[16];
|
||||
|
||||
/* 80021F64-80021FB8 0054+00 s=0 e=1 z=0 None .text fpcLn_Create__Fv */
|
||||
void fpcLn_Create() {
|
||||
s32 i = ARRAY_SIZE(l_fpcLn_Line);
|
||||
node_list_class* pLine = l_fpcLn_Line;
|
||||
node_list_class* line_node = l_fpcLn_Line;
|
||||
while (i-- > 0)
|
||||
cLs_Create(pLine++);
|
||||
cLs_Create(line_node++);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804505D8-804505E0 0008+00 s=0 e=2 z=0 None .sdata g_fpcLn_Queue */
|
||||
node_lists_tree_class g_fpcLn_Queue = {
|
||||
l_fpcLn_Line,
|
||||
ARRAY_SIZE(l_fpcLn_Line),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
/* 800236C0-80023728 0068+00 s=1 e=0 z=0 None .text
|
||||
* fpcLnIt_MethodCall__FP16create_tag_classP13method_filter */
|
||||
static s32 fpcLnIt_MethodCall(create_tag_class* i_createTag, method_filter* i_filter) {
|
||||
layer_class* pLayer = static_cast<base_process_class*>(i_createTag->mpTagData)->mLyTg.mpLayer;
|
||||
layer_class* pCurLayer = fpcLy_CurrentLayer();
|
||||
layer_class* layer = static_cast<base_process_class*>(i_createTag->mpTagData)->layer_tag.layer;
|
||||
layer_class* save_layer = fpcLy_CurrentLayer();
|
||||
s32 ret;
|
||||
|
||||
fpcLy_SetCurrentLayer(pLayer);
|
||||
fpcLy_SetCurrentLayer(layer);
|
||||
ret = cTgIt_MethodCall(i_createTag, i_filter);
|
||||
fpcLy_SetCurrentLayer(pCurLayer);
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -31,4 +31,4 @@ void fpcLnIt_Queue(fpcLnIt_QueueFunc i_queueFunc) {
|
||||
filter.mpMethodFunc = (cNdIt_MethodFunc)i_queueFunc;
|
||||
filter.mpUserData = NULL;
|
||||
cTrIt_Method(&g_fpcLn_Queue, (cNdIt_MethodFunc)fpcLnIt_MethodCall, &filter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/* 800235A8-80023600 0058+00 s=0 e=1 z=0 None .text fpcLnTg_Move__FP8line_tagi */
|
||||
s32 fpcLnTg_Move(line_tag* i_lineTag, int i_newListID) {
|
||||
if (i_lineTag->mLineListID != i_newListID) {
|
||||
if (i_lineTag->list_id != i_newListID) {
|
||||
fpcLnTg_QueueTo(i_lineTag);
|
||||
return fpcLnTg_ToQueue(i_lineTag, i_newListID);
|
||||
}
|
||||
@@ -19,16 +19,16 @@ s32 fpcLnTg_Move(line_tag* i_lineTag, int i_newListID) {
|
||||
|
||||
/* 80023600-80023634 0034+00 s=1 e=1 z=1 None .text fpcLnTg_QueueTo__FP8line_tag */
|
||||
void fpcLnTg_QueueTo(line_tag* i_lineTag) {
|
||||
cTg_SingleCutFromTree(&i_lineTag->mBase);
|
||||
i_lineTag->mLineListID = -1;
|
||||
cTg_SingleCutFromTree(&i_lineTag->base);
|
||||
i_lineTag->list_id = -1;
|
||||
}
|
||||
|
||||
/* 80023634-8002368C 0058+00 s=1 e=1 z=1 None .text fpcLnTg_ToQueue__FP8line_tagi */
|
||||
s32 fpcLnTg_ToQueue(line_tag* i_lineTag, int lineListID) {
|
||||
s32 ret = cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->mBase);
|
||||
s32 ret = cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->base);
|
||||
|
||||
if (ret) {
|
||||
i_lineTag->mLineListID = lineListID;
|
||||
i_lineTag->list_id = lineListID;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -37,6 +37,6 @@ s32 fpcLnTg_ToQueue(line_tag* i_lineTag, int lineListID) {
|
||||
|
||||
/* 8002368C-800236C0 0034+00 s=0 e=1 z=0 None .text fpcLnTg_Init__FP8line_tagPv */
|
||||
void fpcLnTg_Init(line_tag* i_lineTag, void* i_data) {
|
||||
cTg_Create(&i_lineTag->mBase, i_data);
|
||||
i_lineTag->mLineListID = -1;
|
||||
}
|
||||
cTg_Create(&i_lineTag->base, i_data);
|
||||
i_lineTag->list_id = -1;
|
||||
}
|
||||
|
||||
+8
-11
@@ -4,12 +4,9 @@
|
||||
*/
|
||||
|
||||
#include "f_pc/f_pc_load.h"
|
||||
#include "c/c_dylink.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
extern s32 cDyl_IsLinked(s16 i_procName);
|
||||
extern s32 cDyl_Unlink(s16 i_procName);
|
||||
extern s32 cDyl_LinkASync(s16 i_procName);
|
||||
|
||||
/* 80021FB8-80022008 0050+00 s=0 e=1 z=0 None .text fpcLd_Use__Fs */
|
||||
BOOL fpcLd_Use(s16 i_procName) {
|
||||
if (fpcLd_IsLoaded(i_procName) == TRUE && fpcLd_Load(i_procName) == cPhs_COMPLEATE_e)
|
||||
@@ -18,25 +15,25 @@ BOOL fpcLd_Use(s16 i_procName) {
|
||||
}
|
||||
|
||||
/* 80022008-8002202C 0024+00 s=1 e=0 z=0 None .text fpcLd_IsLoaded__Fs */
|
||||
s32 fpcLd_IsLoaded(s16 i_procName) {
|
||||
return cDyl_IsLinked((int)i_procName);
|
||||
BOOL fpcLd_IsLoaded(s16 i_procName) {
|
||||
return cDyl_IsLinked((s16)i_procName);
|
||||
}
|
||||
|
||||
/* 8002202C-80022050 0024+00 s=0 e=2 z=0 None .text fpcLd_Free__Fs */
|
||||
void fpcLd_Free(s16 i_procName) {
|
||||
cDyl_Unlink((int)i_procName);
|
||||
cDyl_Unlink((s16)i_procName);
|
||||
}
|
||||
|
||||
/* 80022050-800220A0 0050+00 s=1 e=1 z=0 None .text fpcLd_Load__Fs */
|
||||
s32 fpcLd_Load(s16 i_procName) {
|
||||
s32 phase = cDyl_LinkASync((int)i_procName);
|
||||
s32 phase = cDyl_LinkASync((s16)i_procName);
|
||||
|
||||
switch (phase) {
|
||||
case cPhs_COMPLEATE_e:
|
||||
return cPhs_COMPLEATE_e;
|
||||
case 0:
|
||||
return 0;
|
||||
case cPhs_INIT_e:
|
||||
return cPhs_INIT_e;
|
||||
default:
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -38,12 +38,12 @@ s32 fpcM_Delete(void* i_proc) {
|
||||
}
|
||||
|
||||
/* 80022138-80022158 0020+00 s=0 e=6 z=43 None .text fpcM_IsCreating__FUi */
|
||||
BOOL fpcM_IsCreating(fpc_ProcID pID) {
|
||||
return fpcCt_IsCreatingByID(pID);
|
||||
BOOL fpcM_IsCreating(fpc_ProcID i_id) {
|
||||
return fpcCt_IsCreatingByID(i_id);
|
||||
}
|
||||
|
||||
/* 80022158-800222B8 0160+00 s=0 e=1 z=0 None .text fpcM_Management__FPFv_vPFv_v */
|
||||
void fpcM_Management(fpcM_ManagementFunc i_mngFunc1, fpcM_ManagementFunc i_mngFunc2) {
|
||||
void fpcM_Management(fpcM_ManagementFunc i_preExecuteFn, fpcM_ManagementFunc i_postExecuteFn) {
|
||||
MtxInit();
|
||||
dComIfGd_peekZdata();
|
||||
|
||||
@@ -68,15 +68,15 @@ void fpcM_Management(fpcM_ManagementFunc i_mngFunc1, fpcM_ManagementFunc i_mngFu
|
||||
fpcPi_Handler();
|
||||
fpcCt_Handler();
|
||||
|
||||
if (i_mngFunc1 != NULL) {
|
||||
i_mngFunc1();
|
||||
if (i_preExecuteFn != NULL) {
|
||||
i_preExecuteFn();
|
||||
}
|
||||
|
||||
fpcEx_Handler((fpcLnIt_QueueFunc)fpcM_Execute);
|
||||
fpcDw_Handler((fpcDw_HandlerFuncFunc)fpcM_DrawIterater, (fpcDw_HandlerFunc)fpcM_Draw);
|
||||
|
||||
if (i_mngFunc2 != NULL) {
|
||||
i_mngFunc2();
|
||||
if (i_postExecuteFn != NULL) {
|
||||
i_postExecuteFn();
|
||||
}
|
||||
|
||||
dComIfGp_drawSimpleModel();
|
||||
@@ -99,10 +99,10 @@ void fpcM_Init() {
|
||||
}
|
||||
|
||||
/* 800222F4-80022348 0054+00 s=0 e=3 z=0 None .text fpcM_FastCreate__FsPFPv_iPvPv */
|
||||
base_process_class* fpcM_FastCreate(s16 i_procTypeID, FastCreateReqFunc i_createReqFunc,
|
||||
void* i_createData, void* i_data) {
|
||||
return fpcFCtRq_Request(fpcLy_CurrentLayer(), i_procTypeID, (fstCreateFunc)i_createReqFunc,
|
||||
i_createData, i_data);
|
||||
base_process_class* fpcM_FastCreate(s16 i_procname, FastCreateReqFunc i_createReqFunc,
|
||||
void* i_createData, void* i_append) {
|
||||
return fpcFCtRq_Request(fpcLy_CurrentLayer(), i_procname, (fstCreateFunc)i_createReqFunc,
|
||||
i_createData, i_append);
|
||||
}
|
||||
|
||||
/* 80022348-8002236C 0024+00 s=0 e=1 z=0 None .text fpcM_IsPause__FPvUc */
|
||||
|
||||
+12
-12
@@ -6,33 +6,33 @@
|
||||
#include "f_pc/f_pc_method.h"
|
||||
|
||||
/* 80022428-80022460 0038+00 s=4 e=6 z=0 None .text fpcMtd_Method__FPFPv_iPv */
|
||||
s32 fpcMtd_Method(process_method_func i_methodFunc, void* i_data) {
|
||||
if (i_methodFunc != NULL)
|
||||
return i_methodFunc(i_data);
|
||||
s32 fpcMtd_Method(process_method_func i_method, void* i_process) {
|
||||
if (i_method != NULL)
|
||||
return i_method(i_process);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80022460-80022484 0024+00 s=0 e=10 z=0 None .text fpcMtd_Execute__FP20process_method_classPv
|
||||
*/
|
||||
s32 fpcMtd_Execute(process_method_class* i_methods, void* i_data) {
|
||||
return fpcMtd_Method(i_methods->mpExecuteFunc, i_data);
|
||||
s32 fpcMtd_Execute(process_method_class* i_methods, void* i_process) {
|
||||
return fpcMtd_Method(i_methods->execute_method, i_process);
|
||||
}
|
||||
|
||||
/* 80022484-800224A8 0024+00 s=0 e=10 z=0 None .text fpcMtd_IsDelete__FP20process_method_classPv
|
||||
*/
|
||||
s32 fpcMtd_IsDelete(process_method_class* i_methods, void* i_data) {
|
||||
return fpcMtd_Method(i_methods->mpIsDeleteFunc, i_data);
|
||||
s32 fpcMtd_IsDelete(process_method_class* i_methods, void* i_process) {
|
||||
return fpcMtd_Method(i_methods->is_delete_method, i_process);
|
||||
}
|
||||
|
||||
/* 800224A8-800224CC 0024+00 s=0 e=10 z=0 None .text fpcMtd_Delete__FP20process_method_classPv
|
||||
*/
|
||||
s32 fpcMtd_Delete(process_method_class* i_methods, void* i_data) {
|
||||
return fpcMtd_Method(i_methods->mpDeleteFunc, i_data);
|
||||
s32 fpcMtd_Delete(process_method_class* i_methods, void* i_process) {
|
||||
return fpcMtd_Method(i_methods->delete_method, i_process);
|
||||
}
|
||||
|
||||
/* 800224CC-800224F0 0024+00 s=0 e=10 z=0 None .text fpcMtd_Create__FP20process_method_classPv
|
||||
*/
|
||||
s32 fpcMtd_Create(process_method_class* i_methods, void* i_data) {
|
||||
return fpcMtd_Method(i_methods->mpCreateFunc, i_data);
|
||||
}
|
||||
s32 fpcMtd_Create(process_method_class* i_methods, void* i_process) {
|
||||
return fpcMtd_Method(i_methods->create_method, i_process);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
|
||||
/* 80023764-80023788 0024+00 s=0 e=1 z=0 None .text fpcMtdIt_Method__FP15node_list_classPFPv_i
|
||||
*/
|
||||
void fpcMtdIt_Method(node_list_class* i_nodeList, fpcMtdIt_MethodFunc i_methods) {
|
||||
cLsIt_Method(i_nodeList, (cNdIt_MethodFunc)i_methods, NULL);
|
||||
}
|
||||
int fpcMtdIt_Method(node_list_class* i_nodeList, fpcMtdIt_MethodFunc i_methods) {
|
||||
return cLsIt_Method(i_nodeList, (cNdIt_MethodFunc)i_methods, NULL);
|
||||
}
|
||||
|
||||
@@ -8,26 +8,26 @@
|
||||
/* 80023788-800237B8 0030+00 s=0 e=1 z=0 None .text fpcMtdTg_Do__FP24process_method_tag_class
|
||||
*/
|
||||
s32 fpcMtdTg_Do(process_method_tag_class* i_methodTag) {
|
||||
return i_methodTag->mpFunc(i_methodTag->mpMthdData);
|
||||
return i_methodTag->method(i_methodTag->data);
|
||||
}
|
||||
|
||||
/* 800237B8-800237D8 0020+00 s=0 e=1 z=0 None .text
|
||||
* fpcMtdTg_ToMethodQ__FP15node_list_classP24process_method_tag_class */
|
||||
s32 fpcMtdTg_ToMethodQ(node_list_class* pList, process_method_tag_class* i_methodTag) {
|
||||
return cTg_Addition(pList, &i_methodTag->mCreateTag);
|
||||
s32 fpcMtdTg_ToMethodQ(node_list_class* i_nodelist, process_method_tag_class* i_methodTag) {
|
||||
return cTg_Addition(i_nodelist, &i_methodTag->create_tag);
|
||||
}
|
||||
|
||||
/* 800237D8-800237F8 0020+00 s=0 e=1 z=0 None .text
|
||||
* fpcMtdTg_MethodQTo__FP24process_method_tag_class */
|
||||
void fpcMtdTg_MethodQTo(process_method_tag_class* i_methodTag) {
|
||||
cTg_SingleCut(&i_methodTag->mCreateTag);
|
||||
cTg_SingleCut(&i_methodTag->create_tag);
|
||||
}
|
||||
|
||||
/* 800237F8-80023844 004C+00 s=0 e=3 z=0 None .text
|
||||
* fpcMtdTg_Init__FP24process_method_tag_classPFPv_iPv */
|
||||
s32 fpcMtdTg_Init(process_method_tag_class* i_methodTag, process_method_tag_func i_mtdTgFunc, void* i_data) {
|
||||
cTg_Create(&i_methodTag->mCreateTag, i_methodTag);
|
||||
i_methodTag->mpFunc = i_mtdTgFunc;
|
||||
i_methodTag->mpMthdData = i_data;
|
||||
s32 fpcMtdTg_Init(process_method_tag_class* i_methodTag, process_method_tag_func i_method, void* i_data) {
|
||||
cTg_Create(&i_methodTag->create_tag, i_methodTag);
|
||||
i_methodTag->method = i_method;
|
||||
i_methodTag->data = i_data;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
+45
-48
@@ -8,110 +8,107 @@
|
||||
|
||||
/* 800224F0-80022514 0024+00 s=1 e=1 z=0 None .text fpcNd_DrawMethod__FP21nodedraw_method_classPv
|
||||
*/
|
||||
s32 fpcNd_DrawMethod(nodedraw_method_class* i_nodeMethods, void* i_data) {
|
||||
return fpcMtd_Method(i_nodeMethods->mpDrawFunc, i_data);
|
||||
s32 fpcNd_DrawMethod(nodedraw_method_class* i_method_class, void* i_data) {
|
||||
return fpcMtd_Method(i_method_class->draw_method, i_data);
|
||||
}
|
||||
|
||||
/* 80022514-80022580 006C+00 s=1 e=0 z=0 None .text fpcNd_Draw__FP18process_node_class */
|
||||
s32 fpcNd_Draw(process_node_class* i_procNode) {
|
||||
s32 ret = 0;
|
||||
if (i_procNode->mUnk0 == 0) {
|
||||
layer_class* curLayer_p = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(&i_procNode->mLayer);
|
||||
ret = fpcNd_DrawMethod(i_procNode->mpNodeMtd, i_procNode);
|
||||
fpcLy_SetCurrentLayer(curLayer_p);
|
||||
if (i_procNode->unk_0x1A8 == 0) {
|
||||
layer_class* save_layer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(&i_procNode->layer);
|
||||
ret = fpcNd_DrawMethod(i_procNode->nodedraw_method, i_procNode);
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80022580-800225DC 005C+00 s=1 e=0 z=0 None .text fpcNd_Execute__FP18process_node_class */
|
||||
s32 fpcNd_Execute(process_node_class* i_procNode) {
|
||||
s32 ret;
|
||||
layer_class* curLayer_p = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(&i_procNode->mLayer);
|
||||
ret = fpcMtd_Execute(&i_procNode->mpNodeMtd->mBase, i_procNode);
|
||||
fpcLy_SetCurrentLayer(curLayer_p);
|
||||
layer_class* save_layer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(&i_procNode->layer);
|
||||
ret = fpcMtd_Execute(&i_procNode->nodedraw_method->base, i_procNode);
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450D40-80450D48 0004+04 s=2 e=11 z=0 None .sbss g_fpcNd_type */
|
||||
int g_fpcNd_type;
|
||||
|
||||
/* 800225DC-8002265C 0080+00 s=1 e=0 z=0 None .text fpcNd_IsCreatingFromUnder__FPv */
|
||||
void* fpcNd_IsCreatingFromUnder(void* i_procNode) {
|
||||
layer_class* layer;
|
||||
process_node_class* pProcNode = static_cast<process_node_class*>(i_procNode);
|
||||
if (pProcNode != NULL && fpcBs_Is_JustOfType(g_fpcNd_type, pProcNode->mBase.mSubType) != FALSE)
|
||||
process_node_class* procnode = (process_node_class*)i_procNode;
|
||||
if (procnode != NULL && fpcBs_Is_JustOfType(g_fpcNd_type, procnode->base.subtype) != FALSE)
|
||||
{
|
||||
layer = &pProcNode->mLayer;
|
||||
if (fpcLy_IsCreatingMesg(layer) == 0) {
|
||||
layer = &procnode->layer;
|
||||
if (fpcLy_IsCreatingMesg(layer) == FALSE) {
|
||||
return (process_node_class*)fpcLyIt_Judge(
|
||||
layer, (fpcLyIt_JudgeFunc)fpcNd_IsCreatingFromUnder, NULL);
|
||||
} else {
|
||||
return pProcNode;
|
||||
return procnode;
|
||||
}
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804505E0-804505E8 0004+04 s=1 e=0 z=0 None .sdata g_fpcNd_IsCheckOfDeleteTiming */
|
||||
static s32 g_fpcNd_IsCheckOfDeleteTiming = 1;
|
||||
BOOL g_fpcNd_IsCheckOfDeleteTiming = TRUE;
|
||||
|
||||
/* 8002265C-8002269C 0040+00 s=0 e=2 z=0 None .text fpcNd_IsDeleteTiming__FP18process_node_class
|
||||
*/
|
||||
s32 fpcNd_IsDeleteTiming(process_node_class* i_procNode) {
|
||||
if (g_fpcNd_IsCheckOfDeleteTiming == 1 && fpcNd_IsCreatingFromUnder(i_procNode) != NULL) {
|
||||
if (g_fpcNd_IsCheckOfDeleteTiming == TRUE && fpcNd_IsCreatingFromUnder(i_procNode) != NULL) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8002269C-800226C4 0028+00 s=1 e=0 z=0 None .text fpcNd_IsDelete__FP18process_node_class */
|
||||
s32 fpcNd_IsDelete(process_node_class* i_procNode) {
|
||||
return fpcMtd_IsDelete(&i_procNode->mpNodeMtd->mBase, i_procNode);
|
||||
return fpcMtd_IsDelete(&i_procNode->nodedraw_method->base, i_procNode);
|
||||
}
|
||||
|
||||
/* 800226C4-80022728 0064+00 s=1 e=0 z=0 None .text fpcNd_Delete__FP18process_node_class */
|
||||
s32 fpcNd_Delete(process_node_class* i_procNode) {
|
||||
if ((fpcLy_IsDeletingMesg(&i_procNode->mLayer) == 0) &&
|
||||
fpcMtd_Delete(&i_procNode->mpNodeMtd->mBase, i_procNode) == 1)
|
||||
if (!fpcLy_IsDeletingMesg(&i_procNode->layer) &&
|
||||
fpcMtd_Delete(&i_procNode->nodedraw_method->base, i_procNode) == 1)
|
||||
{
|
||||
i_procNode->mBase.mSubType = 0;
|
||||
return fpcLy_Delete(&i_procNode->mLayer);
|
||||
} else {
|
||||
return 0;
|
||||
i_procNode->base.subtype = 0;
|
||||
return fpcLy_Delete(&i_procNode->layer);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80022728-800227C4 009C+00 s=1 e=0 z=0 None .text fpcNd_Create__FP18process_node_class */
|
||||
s32 fpcNd_Create(process_node_class* i_procNode) {
|
||||
// this cast looks like a fake match, but it doesn't match without the cast, naive approach
|
||||
// swaps r31 and r30 most likely it gets casted to another unknown struct
|
||||
process_node_class* pProcNode = (process_node_class*)i_procNode;
|
||||
layer_class* curLayer_p;
|
||||
process_node_class* procnode = (process_node_class*)i_procNode;
|
||||
layer_class* save_layer;
|
||||
s32 ret;
|
||||
if (pProcNode->mBase.mInitState == 0) {
|
||||
node_process_profile_definition* pProcProfileDef =
|
||||
(node_process_profile_definition*)pProcNode->mBase.mpProf;
|
||||
pProcNode->mBase.mSubType = fpcBs_MakeOfType(&g_fpcNd_type);
|
||||
pProcNode->mpNodeMtd = (nodedraw_method_class*)pProcProfileDef->sub_method;
|
||||
fpcLy_Create(&pProcNode->mLayer, pProcNode, pProcNode->mLayerNodeLists, 0x10);
|
||||
pProcNode->mUnk0 = 0;
|
||||
|
||||
if (procnode->base.init_state == 0) {
|
||||
node_process_profile_definition* pprofile = (node_process_profile_definition*)procnode->base.profile;
|
||||
procnode->base.subtype = fpcBs_MakeOfType(&g_fpcNd_type);
|
||||
procnode->nodedraw_method = (nodedraw_method_class*)pprofile->sub_methods;
|
||||
fpcLy_Create(&procnode->layer, procnode, procnode->layer_nodelist, 16);
|
||||
procnode->unk_0x1A8 = 0;
|
||||
}
|
||||
curLayer_p = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(&pProcNode->mLayer);
|
||||
ret = fpcMtd_Create(&pProcNode->mpNodeMtd->mBase, pProcNode);
|
||||
fpcLy_SetCurrentLayer(curLayer_p);
|
||||
|
||||
save_layer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(&procnode->layer);
|
||||
ret = fpcMtd_Create(&procnode->nodedraw_method->base, procnode);
|
||||
fpcLy_SetCurrentLayer(save_layer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A3A20-803A3A38 0014+04 s=0 e=9 z=0 None .data g_fpcNd_Method */
|
||||
nodedraw_method_class g_fpcNd_Method = {
|
||||
(process_method_func)fpcNd_Create, (process_method_func)fpcNd_Delete,
|
||||
(process_method_func)fpcNd_Execute, (process_method_func)fpcNd_IsDelete,
|
||||
(process_method_func)fpcNd_Draw};
|
||||
(process_method_func)fpcNd_Draw};
|
||||
|
||||
+138
-119
@@ -10,143 +10,157 @@
|
||||
#include "f_pc/f_pc_executor.h"
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "f_pc/f_pc_stdcreate_req.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
/* 800227C4-80022804 0040+00 s=1 e=0 z=0 None .text fpcNdRq_RequestQTo__FP19node_create_request
|
||||
*/
|
||||
void fpcNdRq_RequestQTo(node_create_request* i_NdCtReq) {
|
||||
fpcLy_CreatedMesg(i_NdCtReq->mpLayerClass);
|
||||
fpcLy_CancelQTo(&i_NdCtReq->mProcMthCls);
|
||||
cTg_SingleCut(&i_NdCtReq->mCreateTag);
|
||||
void fpcNdRq_RequestQTo(node_create_request* i_request) {
|
||||
fpcLy_CreatedMesg(i_request->layer);
|
||||
fpcLy_CancelQTo(&i_request->method_tag);
|
||||
cTg_SingleCut(&i_request->create_tag);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A3A38-803A3A44 000C+00 s=5 e=0 z=0 None .data l_fpcNdRq_Queue */
|
||||
static node_list_class l_fpcNdRq_Queue = {NULL, NULL, 0};
|
||||
|
||||
/* 80022804-80022850 004C+00 s=1 e=0 z=0 None .text fpcNdRq_ToRequestQ__FP19node_create_request
|
||||
*/
|
||||
void fpcNdRq_ToRequestQ(node_create_request* i_NdCtReq) {
|
||||
cTg_Addition(&l_fpcNdRq_Queue, &i_NdCtReq->mCreateTag);
|
||||
fpcLy_ToCancelQ(i_NdCtReq->mpLayerClass, &i_NdCtReq->mProcMthCls);
|
||||
fpcLy_CreatingMesg(i_NdCtReq->mpLayerClass);
|
||||
void fpcNdRq_ToRequestQ(node_create_request* i_request) {
|
||||
cTg_Addition(&l_fpcNdRq_Queue, &i_request->create_tag);
|
||||
fpcLy_ToCancelQ(i_request->layer, &i_request->method_tag);
|
||||
fpcLy_CreatingMesg(i_request->layer);
|
||||
}
|
||||
|
||||
/* 80022850-800228A8 0058+00 s=2 e=0 z=0 None .text
|
||||
* fpcNdRq_phase_IsCreated__FP19node_create_request */
|
||||
s32 fpcNdRq_phase_IsCreated(node_create_request* i_NdCtReq) {
|
||||
if (fpcCtRq_IsCreatingByID(i_NdCtReq->mCreatingID) == TRUE) {
|
||||
s32 fpcNdRq_phase_IsCreated(node_create_request* i_request) {
|
||||
if (fpcCtRq_IsCreatingByID(i_request->creating_id) == TRUE) {
|
||||
return cPhs_INIT_e;
|
||||
} else if (fpcEx_IsExist(i_request->creating_id) == TRUE) {
|
||||
return cPhs_NEXT_e;
|
||||
} else {
|
||||
return fpcEx_IsExist(i_NdCtReq->mCreatingID) == TRUE ? 2 : 3;
|
||||
return cPhs_UNK3_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 800228A8-80022904 005C+00 s=2 e=0 z=0 None .text fpcNdRq_phase_Create__FP19node_create_request
|
||||
*/
|
||||
s32 fpcNdRq_phase_Create(node_create_request* i_NdCtReq) {
|
||||
i_NdCtReq->mCreatingID =
|
||||
fpcSCtRq_Request(i_NdCtReq->mpLayerClass, i_NdCtReq->mProcName,
|
||||
(stdCreateFunc)i_NdCtReq->mpNodeCrReqMthCls->mpPostMethodFunc, i_NdCtReq,
|
||||
i_NdCtReq->mpUserData);
|
||||
return i_NdCtReq->mCreatingID == -1 ? 3 : 2;
|
||||
s32 fpcNdRq_phase_Create(node_create_request* i_request) {
|
||||
i_request->creating_id =
|
||||
fpcSCtRq_Request(i_request->layer, i_request->name,
|
||||
(stdCreateFunc)i_request->create_req_methods->post_method, i_request,
|
||||
i_request->data);
|
||||
if (i_request->creating_id == fpcM_ERROR_PROCESS_ID_e) {
|
||||
return cPhs_UNK3_e;
|
||||
}
|
||||
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80022904-8002290C 0008+00 s=2 e=0 z=0 None .text
|
||||
* fpcNdRq_phase_IsDeleteTiming__FP19node_create_request */
|
||||
s32 fpcNdRq_phase_IsDeleteTiming(node_create_request* i_NdCtReq) {
|
||||
return 2;
|
||||
s32 fpcNdRq_phase_IsDeleteTiming(node_create_request* i_request) {
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8002290C-8002293C 0030+00 s=2 e=0 z=0 None .text
|
||||
* fpcNdRq_phase_IsDeleted__FP19node_create_request */
|
||||
s32 fpcNdRq_phase_IsDeleted(node_create_request* i_NdCtReq) {
|
||||
return fpcDt_IsComplete() == 0 ? cPhs_INIT_e : 2;
|
||||
s32 fpcNdRq_phase_IsDeleted(node_create_request* i_request) {
|
||||
if (fpcDt_IsComplete() == FALSE) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8002293C-80022990 0054+00 s=2 e=0 z=0 None .text fpcNdRq_phase_Delete__FP19node_create_request
|
||||
*/
|
||||
s32 fpcNdRq_phase_Delete(node_create_request* i_NdCtReq) {
|
||||
if (i_NdCtReq->mNodeProc.mpNodeProc != NULL) {
|
||||
if (fpcDt_Delete(&i_NdCtReq->mNodeProc.mpNodeProc->mBase) == 0) {
|
||||
s32 fpcNdRq_phase_Delete(node_create_request* i_request) {
|
||||
if (i_request->node_proc.node != NULL) {
|
||||
if (fpcDt_Delete(&i_request->node_proc.node->base) == 0) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
i_NdCtReq->mNodeProc.mpNodeProc = NULL;
|
||||
i_request->node_proc.node = NULL;
|
||||
}
|
||||
return 2;
|
||||
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80022990-800229D8 0048+00 s=1 e=0 z=0 None .text fpcNdRq_DoPhase__FP19node_create_request
|
||||
*/
|
||||
s32 fpcNdRq_DoPhase(node_create_request* i_NdCtReq) {
|
||||
s32 result = cPhs_Handler(&i_NdCtReq->mReqPhsProc, i_NdCtReq->mpPhsHandler, i_NdCtReq);
|
||||
if (result == 2) {
|
||||
return fpcNdRq_DoPhase(i_NdCtReq);
|
||||
s32 fpcNdRq_DoPhase(node_create_request* i_request) {
|
||||
s32 result = cPhs_Handler(&i_request->phase_request, i_request->phase_handler, i_request);
|
||||
if (result == cPhs_NEXT_e) {
|
||||
return fpcNdRq_DoPhase(i_request);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 800229D8-80022A3C 0064+00 s=0 e=1 z=0 None .text fpcNdRq_Execute__FP19node_create_request
|
||||
*/
|
||||
s32 fpcNdRq_Execute(node_create_request* i_NdCtReq) {
|
||||
s32 result = fpcNdRq_DoPhase(i_NdCtReq);
|
||||
s32 fpcNdRq_Execute(node_create_request* i_request) {
|
||||
s32 result = fpcNdRq_DoPhase(i_request);
|
||||
switch (result) {
|
||||
case 0:
|
||||
case 1:
|
||||
return 0;
|
||||
case 4:
|
||||
return 2;
|
||||
case 5:
|
||||
case 3:
|
||||
return 3;
|
||||
case cPhs_INIT_e:
|
||||
case cPhs_LOADING_e:
|
||||
return cPhs_INIT_e;
|
||||
case cPhs_COMPLEATE_e:
|
||||
return cPhs_NEXT_e;
|
||||
case cPhs_ERROR_e:
|
||||
case cPhs_UNK3_e:
|
||||
return cPhs_UNK3_e;
|
||||
default:
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80022A3C-80022AA4 0068+00 s=2 e=1 z=0 None .text fpcNdRq_Delete__FP19node_create_request */
|
||||
s32 fpcNdRq_Delete(node_create_request* i_NdCtReq) {
|
||||
fpcNdRq_RequestQTo(i_NdCtReq);
|
||||
if (i_NdCtReq->mpNodeCrReqMthCls != NULL && i_NdCtReq->mpNodeCrReqMthCls->mpUnkFunc != NULL &&
|
||||
fpcMtd_Method(i_NdCtReq->mpNodeCrReqMthCls->mpUnkFunc, i_NdCtReq) == 0)
|
||||
s32 fpcNdRq_Delete(node_create_request* i_request) {
|
||||
fpcNdRq_RequestQTo(i_request);
|
||||
if (i_request->create_req_methods != NULL && i_request->create_req_methods->delete_method != NULL &&
|
||||
fpcMtd_Method(i_request->create_req_methods->delete_method, i_request) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
cMl::free(i_NdCtReq);
|
||||
|
||||
cMl::free(i_request);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80022AA4-80022AFC 0058+00 s=2 e=0 z=0 None .text fpcNdRq_Cancel__FP19node_create_request */
|
||||
s32 fpcNdRq_Cancel(node_create_request* i_NdCtReq) {
|
||||
if (i_NdCtReq->mpNodeCrReqMthCls != NULL &&
|
||||
fpcMtd_Method(i_NdCtReq->mpNodeCrReqMthCls->mpCancelFunc, i_NdCtReq) == 0)
|
||||
s32 fpcNdRq_Cancel(node_create_request* i_request) {
|
||||
if (i_request->create_req_methods != NULL &&
|
||||
fpcMtd_Method(i_request->create_req_methods->cancel_method, i_request) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return fpcNdRq_Delete(i_NdCtReq);
|
||||
|
||||
return fpcNdRq_Delete(i_request);
|
||||
}
|
||||
|
||||
/* 80022AFC-80022BE4 00E8+00 s=0 e=1 z=0 None .text fpcNdRq_Handler__Fv */
|
||||
#define NODE_GET_NEXT(pNode) (pNode ? pNode->mpNextNode : NULL)
|
||||
|
||||
/* 80022AFC-80022BE4 00E8+00 s=0 e=1 z=0 None .text fpcNdRq_Handler__Fv */
|
||||
s32 fpcNdRq_Handler() {
|
||||
node_class* currentNode = l_fpcNdRq_Queue.mpHead;
|
||||
while (currentNode != NULL) {
|
||||
node_create_request* req = ((request_node_class*)currentNode)->mNodeCrReq;
|
||||
switch (req->mpNodeCrReqMthCls->mpExecuteFunc(req)) {
|
||||
case 3:
|
||||
case 5:
|
||||
currentNode = NODE_GET_NEXT(currentNode);
|
||||
node_class* node = l_fpcNdRq_Queue.mpHead;
|
||||
while (node != NULL) {
|
||||
node_create_request* req = ((request_node_class*)node)->node_create_req;
|
||||
switch (req->create_req_methods->execute_method(req)) {
|
||||
case cPhs_UNK3_e:
|
||||
case cPhs_ERROR_e:
|
||||
node = NODE_GET_NEXT(node);
|
||||
if (fpcNdRq_Cancel(req) == 0) {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
currentNode = NODE_GET_NEXT(currentNode);
|
||||
case cPhs_COMPLEATE_e:
|
||||
node = NODE_GET_NEXT(node);
|
||||
if (fpcNdRq_Delete(req) == 0) {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
currentNode = NODE_GET_NEXT(currentNode);
|
||||
node = NODE_GET_NEXT(node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -156,35 +170,37 @@ s32 fpcNdRq_Handler() {
|
||||
/* 80022BE4-80022C50 006C+00 s=3 e=0 z=0 None .text
|
||||
* fpcNdRq_IsPossibleTarget__FP18process_node_class */
|
||||
s32 fpcNdRq_IsPossibleTarget(process_node_class* i_procNode) {
|
||||
s32 bsPcId = i_procNode->mBase.mBsPcId;
|
||||
request_node_class* currentNode;
|
||||
node_create_request* currentNdCr;
|
||||
currentNode = (request_node_class*)l_fpcNdRq_Queue.mpHead;
|
||||
while (currentNode != NULL) {
|
||||
currentNdCr = currentNode->mNodeCrReq;
|
||||
if ((currentNdCr->mParameter == 2 || currentNdCr->mParameter == 4 ||
|
||||
currentNdCr->mParameter == 1) &&
|
||||
currentNdCr->mNodeProc.mProcId == bsPcId)
|
||||
fpc_ProcID id = i_procNode->base.id;
|
||||
request_node_class* req_node;
|
||||
node_create_request* create_req;
|
||||
|
||||
req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
|
||||
while (req_node != NULL) {
|
||||
create_req = req_node->node_create_req;
|
||||
if ((create_req->parameters == 2 || create_req->parameters == 4 ||
|
||||
create_req->parameters == 1) &&
|
||||
create_req->node_proc.id == id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
currentNode = (request_node_class*)NODE_GET_NEXT((¤tNode->mBase));
|
||||
req_node = (request_node_class*)NODE_GET_NEXT((&req_node->node));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80022C50-80022C9C 004C+00 s=2 e=0 z=0 None .text fpcNdRq_IsIng__FP18process_node_class */
|
||||
s32 fpcNdRq_IsIng(process_node_class* i_procNode) {
|
||||
request_node_class* currentNode;
|
||||
node_create_request* currentNodeReq;
|
||||
s32 bsPcId = i_procNode->mBase.mBsPcId;
|
||||
currentNode = (request_node_class*)l_fpcNdRq_Queue.mpHead;
|
||||
while (currentNode != NULL) {
|
||||
currentNodeReq = currentNode->mNodeCrReq;
|
||||
if (currentNodeReq->mCreatingID == bsPcId) {
|
||||
request_node_class* req_node;
|
||||
node_create_request* create_req;
|
||||
fpc_ProcID id = i_procNode->base.id;
|
||||
|
||||
req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
|
||||
while (req_node != NULL) {
|
||||
create_req = req_node->node_create_req;
|
||||
if (create_req->creating_id == id) {
|
||||
return 1;
|
||||
}
|
||||
currentNode = (request_node_class*)NODE_GET_NEXT((¤tNode->mBase));
|
||||
req_node = (request_node_class*)NODE_GET_NEXT((&req_node->node));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -199,12 +215,12 @@ node_create_request* fpcNdRq_Create(u32 i_requestSize) {
|
||||
|
||||
node_create_request* req = (node_create_request*)cMl::memalignB(-4, i_requestSize);
|
||||
if (req != NULL) {
|
||||
static int request_id = 0;
|
||||
static fpc_ProcID request_id = 0;
|
||||
sBs_ClearArea(req, i_requestSize);
|
||||
*req = clear;
|
||||
cTg_Create(&req->mCreateTag, req);
|
||||
fpcMtdTg_Init(&req->mProcMthCls, (process_method_tag_func)fpcNdRq_Cancel, req);
|
||||
req->mRequestId = request_id++;
|
||||
cTg_Create(&req->create_tag, req);
|
||||
fpcMtdTg_Init(&req->method_tag, (process_method_tag_func)fpcNdRq_Cancel, req);
|
||||
req->request_id = request_id++;
|
||||
}
|
||||
return req;
|
||||
}
|
||||
@@ -222,12 +238,12 @@ node_create_request* fpcNdRq_ChangeNode(u32 i_requestSize, process_node_class* i
|
||||
if (fpcNdRq_IsPossibleTarget(i_procNode) == 1 && fpcNdRq_IsIng(i_procNode) == 0) {
|
||||
node_create_request* req = fpcNdRq_Create(i_requestSize);
|
||||
if (req != NULL) {
|
||||
req->mpPhsHandler = methods;
|
||||
req->mNodeProc.mpNodeProc = i_procNode;
|
||||
req->mNodeProc.mProcId = i_procNode->mBase.mBsPcId;
|
||||
req->mpLayerClass = i_procNode->mBase.mLyTg.mpLayer;
|
||||
req->mProcName = i_procName;
|
||||
req->mpUserData = i_data;
|
||||
req->phase_handler = methods;
|
||||
req->node_proc.node = i_procNode;
|
||||
req->node_proc.id = i_procNode->base.id;
|
||||
req->layer = i_procNode->base.layer_tag.layer;
|
||||
req->name = i_procName;
|
||||
req->data = i_data;
|
||||
}
|
||||
return req;
|
||||
} else {
|
||||
@@ -248,10 +264,10 @@ node_create_request* fpcNdRq_DeleteNode(u32 i_requestSize, process_node_class* i
|
||||
if (fpcNdRq_IsPossibleTarget(i_procNode) == 1 && fpcNdRq_IsIng(i_procNode) == 0) {
|
||||
node_create_request* req = fpcNdRq_Create(i_requestSize);
|
||||
if (req != NULL) {
|
||||
req->mpPhsHandler = methods;
|
||||
req->mNodeProc.mpNodeProc = i_procNode;
|
||||
req->mNodeProc.mProcId = i_procNode->mBase.mBsPcId;
|
||||
req->mpLayerClass = i_procNode->mBase.mLyTg.mpLayer;
|
||||
req->phase_handler = methods;
|
||||
req->node_proc.node = i_procNode;
|
||||
req->node_proc.id = i_procNode->base.id;
|
||||
req->layer = i_procNode->base.layer_tag.layer;
|
||||
}
|
||||
return req;
|
||||
} else {
|
||||
@@ -268,29 +284,30 @@ node_create_request* fpcNdRq_CreateNode(u32 i_requestSize, s16 i_procName, void*
|
||||
};
|
||||
|
||||
layer_class* layer = fpcLy_CurrentLayer();
|
||||
if (layer->mLayerID != 0 && fpcNdRq_IsPossibleTarget(layer->mpPcNode) == 0) {
|
||||
if (layer->layer_id != fpcLy_ROOT_e && fpcNdRq_IsPossibleTarget(layer->process_node) == 0) {
|
||||
return NULL;
|
||||
} else {
|
||||
node_create_request* req = fpcNdRq_Create(i_requestSize);
|
||||
if (req != NULL) {
|
||||
req->mpPhsHandler = methods;
|
||||
if (layer->mLayerID != 0) {
|
||||
req->mNodeProc.mpNodeProc = layer->mpPcNode;
|
||||
req->mNodeProc.mProcId = layer->mpPcNode->mBase.mBsPcId;
|
||||
}
|
||||
req->mpLayerClass = layer;
|
||||
req->mProcName = i_procName;
|
||||
req->mpUserData = i_data;
|
||||
}
|
||||
return req;
|
||||
}
|
||||
|
||||
node_create_request* req = fpcNdRq_Create(i_requestSize);
|
||||
if (req != NULL) {
|
||||
req->phase_handler = methods;
|
||||
if (layer->layer_id != fpcLy_ROOT_e) {
|
||||
req->node_proc.node = layer->process_node;
|
||||
req->node_proc.id = layer->process_node->base.id;
|
||||
}
|
||||
req->layer = layer;
|
||||
req->name = i_procName;
|
||||
req->data = i_data;
|
||||
}
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
/* 80022FE8-80023098 00B0+00 s=0 e=1 z=0 None .text
|
||||
* fpcNdRq_Request__FUliP18process_node_classsPvP32node_create_request_method_class */
|
||||
node_create_request* fpcNdRq_Request(u32 i_requestSize, int i_reqType,
|
||||
process_node_class* i_procNode, s16 i_procName, void* i_data,
|
||||
node_create_request_method_class* i_nodeCtRqMtd) {
|
||||
node_create_request_method_class* i_create_req_methods) {
|
||||
node_create_request* req;
|
||||
switch (i_reqType) {
|
||||
case 0:
|
||||
@@ -307,8 +324,8 @@ node_create_request* fpcNdRq_Request(u32 i_requestSize, int i_reqType,
|
||||
}
|
||||
|
||||
if (req != NULL) {
|
||||
req->mParameter = i_reqType;
|
||||
req->mpNodeCrReqMthCls = i_nodeCtRqMtd;
|
||||
req->parameters = i_reqType;
|
||||
req->create_req_methods = i_create_req_methods;
|
||||
fpcNdRq_ToRequestQ(req);
|
||||
}
|
||||
|
||||
@@ -317,21 +334,23 @@ node_create_request* fpcNdRq_Request(u32 i_requestSize, int i_reqType,
|
||||
|
||||
/* 80023098-80023110 0078+00 s=1 e=0 z=0 None .text fpcNdRq_ReChangeNode__FUisPv */
|
||||
s32 fpcNdRq_ReChangeNode(fpc_ProcID i_requestID, s16 i_procName, void* i_data) {
|
||||
request_node_class* currentNode;
|
||||
request_node_class* req_node;
|
||||
node_create_request* found;
|
||||
currentNode = (request_node_class*)l_fpcNdRq_Queue.mpHead;
|
||||
while (currentNode != NULL) {
|
||||
found = currentNode->mNodeCrReq;
|
||||
if (found->mParameter == 2 && found->mRequestId == i_requestID) {
|
||||
if (found->mCreatingID == -2) {
|
||||
found->mProcName = i_procName;
|
||||
found->mpUserData = i_data;
|
||||
|
||||
req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
|
||||
while (req_node != NULL) {
|
||||
found = req_node->node_create_req;
|
||||
if (found->parameters == 2 && found->request_id == i_requestID) {
|
||||
if (found->creating_id == -2) {
|
||||
found->name = i_procName;
|
||||
found->data = i_data;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
currentNode = (request_node_class*)NODE_GET_NEXT((¤tNode->mBase));
|
||||
req_node = (request_node_class*)NODE_GET_NEXT((&req_node->node));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/* 80023844-80023868 0024+00 s=0 e=3 z=0 None .text fpcPause_IsEnable__FPvUc */
|
||||
s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) {
|
||||
base_process_class* pProc = (base_process_class*)i_proc;
|
||||
if ((pProc->mPauseFlag & i_flag) == i_flag) {
|
||||
if ((pProc->pause_flag & i_flag) == i_flag) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -20,11 +20,11 @@ s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) {
|
||||
/* 80023868-800238D4 006C+00 s=0 e=1 z=0 None .text fpcPause_Enable__FPvUc */
|
||||
s32 fpcPause_Enable(void* i_proc, u8 i_flag) {
|
||||
base_process_class* pProc = (base_process_class*)i_proc;
|
||||
pProc->mPauseFlag |= i_flag;
|
||||
pProc->pause_flag |= i_flag;
|
||||
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) {
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->subtype)) {
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
|
||||
fpcLyIt_OnlyHere(&pNode->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
|
||||
(void*)(i_flag & 0xFF));
|
||||
}
|
||||
return 1;
|
||||
@@ -33,11 +33,11 @@ s32 fpcPause_Enable(void* i_proc, u8 i_flag) {
|
||||
/* 800238D4-80023948 0074+00 s=0 e=1 z=0 None .text fpcPause_Disable__FPvUc */
|
||||
s32 fpcPause_Disable(void* i_proc, u8 i_flag) {
|
||||
base_process_class* pProc = (base_process_class*)i_proc;
|
||||
pProc->mPauseFlag &= (0xFF - i_flag) & 0xFF;
|
||||
pProc->pause_flag &= (0xFF - i_flag) & 0xFF;
|
||||
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) {
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->subtype)) {
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
|
||||
fpcLyIt_OnlyHere(&pNode->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -46,5 +46,5 @@ s32 fpcPause_Disable(void* i_proc, u8 i_flag) {
|
||||
/* 80023948-80023954 000C+00 s=0 e=1 z=0 None .text fpcPause_Init__FPv */
|
||||
void fpcPause_Init(void* i_proc) {
|
||||
base_process_class* pProc = (base_process_class*)i_proc;
|
||||
pProc->mPauseFlag = 0;
|
||||
}
|
||||
pProc->pause_flag = 0;
|
||||
}
|
||||
|
||||
+61
-63
@@ -10,36 +10,34 @@
|
||||
/* 80023130-80023150 0020+00 s=0 e=1 z=0 None .text fpcPi_IsInQueue__FP22process_priority_class
|
||||
*/
|
||||
s32 fpcPi_IsInQueue(process_priority_class* i_procPriority) {
|
||||
return cTg_IsUse(&i_procPriority->mBase);
|
||||
return cTg_IsUse(&i_procPriority->base);
|
||||
}
|
||||
|
||||
/* 80023150-80023188 0038+00 s=1 e=0 z=0 None .text fpcPi_QueueTo__FP22process_priority_class
|
||||
*/
|
||||
s32 fpcPi_QueueTo(process_priority_class* i_procPriority) {
|
||||
cTg_SingleCut(&i_procPriority->mBase);
|
||||
fpcLy_CancelQTo(&i_procPriority->mMtdTag);
|
||||
cTg_SingleCut(&i_procPriority->base);
|
||||
fpcLy_CancelQTo(&i_procPriority->method_tag);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803F4E58-803F4E68 000C+04 s=2 e=0 z=0 None .bss l_fpcPi_Queue */
|
||||
static node_list_class l_fpcPi_Queue;
|
||||
|
||||
/* 80023188-80023214 008C+00 s=1 e=0 z=0 None .text fpcPi_ToQueue__FP22process_priority_class
|
||||
*/
|
||||
s32 fpcPi_ToQueue(process_priority_class* i_procPriority) {
|
||||
u32 layer = i_procPriority->mInfoQ.mLayer;
|
||||
fpc_ProcID layer = i_procPriority->queue_info.layer_id;
|
||||
|
||||
if (cTg_Addition(&l_fpcPi_Queue, &i_procPriority->mBase)) {
|
||||
if (layer != 0xFFFFFFFD) {
|
||||
if (cTg_Addition(&l_fpcPi_Queue, &i_procPriority->base)) {
|
||||
if (layer != fpcLy_CURRENT_e) {
|
||||
layer_class* pLayer = fpcLy_Layer(layer);
|
||||
|
||||
if (!fpcLy_ToCancelQ(pLayer, &i_procPriority->mMtdTag)) {
|
||||
cTg_SingleCut(&i_procPriority->mBase);
|
||||
if (!fpcLy_ToCancelQ(pLayer, &i_procPriority->method_tag)) {
|
||||
cTg_SingleCut(&i_procPriority->base);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -51,10 +49,10 @@ process_priority_class* fpcPi_GetFromQueue() {
|
||||
process_priority_class* i_procPriority = (process_priority_class*)cTg_GetFirst(&l_fpcPi_Queue);
|
||||
|
||||
if (i_procPriority != NULL) {
|
||||
base_process_class* pProc = (base_process_class*)i_procPriority->mBase.mpTagData;
|
||||
process_priority_class* pProcPi = &pProc->mPi;
|
||||
fpcLy_CancelQTo(&pProcPi->mMtdTag);
|
||||
return pProcPi;
|
||||
base_process_class* process = (base_process_class*)i_procPriority->base.mpTagData;
|
||||
process_priority_class* ppriority = &process->priority;
|
||||
fpcLy_CancelQTo(&ppriority->method_tag);
|
||||
return ppriority;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -64,21 +62,21 @@ process_priority_class* fpcPi_GetFromQueue() {
|
||||
*/
|
||||
s32 fpcPi_Delete(process_priority_class* i_procPriority) {
|
||||
static process_priority_queue_info crear = {
|
||||
0xFFFFFFFF,
|
||||
0xFFFF,
|
||||
fpcLy_NONE_e,
|
||||
0xFFFF,
|
||||
fpcPi_NONE_e,
|
||||
};
|
||||
|
||||
fpcPi_QueueTo(i_procPriority);
|
||||
i_procPriority->mInfoQ.mLayer = crear.mLayer;
|
||||
i_procPriority->mInfoQ.mListID = crear.mListID;
|
||||
i_procPriority->mInfoQ.mListPrio = crear.mListPrio;
|
||||
i_procPriority->queue_info.layer_id = crear.layer_id;
|
||||
i_procPriority->queue_info.list_id = crear.list_id;
|
||||
i_procPriority->queue_info.list_priority = crear.list_priority;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 800232B4-800232E8 0034+00 s=2 e=0 z=0 None .text fpcPi_IsNormal__FUiUsUs */
|
||||
s32 fpcPi_IsNormal(fpc_ProcID i_layer, u16 i_listID, u16 i_priority) {
|
||||
if ((i_layer < 0xFFFFFFFE) && (i_listID < 0xFFFE) && (i_priority < 0xFFFE))
|
||||
s32 fpcPi_IsNormal(fpc_ProcID i_layerID, u16 i_listID, u16 i_priority) {
|
||||
if ((i_layerID < fpcLy_SPECIAL_e) && (i_listID < 0xFFFE) && (i_priority < fpcPi_SPECIAL_e))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
@@ -86,43 +84,43 @@ s32 fpcPi_IsNormal(fpc_ProcID i_layer, u16 i_listID, u16 i_priority) {
|
||||
|
||||
/* 800232E8-80023428 0140+00 s=0 e=3 z=0 None .text
|
||||
* fpcPi_Change__FP22process_priority_classUiUsUs */
|
||||
s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layer, u16 i_listID, u16 i_priority) {
|
||||
base_process_class* pProc = (base_process_class*)i_procPriority->mBase.mpTagData;
|
||||
BOOL changed = 0;
|
||||
s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layerID, u16 i_listID, u16 i_priority) {
|
||||
base_process_class* process = (base_process_class*)i_procPriority->base.mpTagData;
|
||||
BOOL changed = FALSE;
|
||||
|
||||
if (pProc->mInitState == 3)
|
||||
if (process->init_state == 3)
|
||||
return 0;
|
||||
|
||||
if (!fpcPi_IsNormal(i_layer, i_listID, i_priority))
|
||||
if (!fpcPi_IsNormal(i_layerID, i_listID, i_priority))
|
||||
return 0;
|
||||
|
||||
i_procPriority->mInfoQ.mLayer = i_procPriority->mInfoCurr.mLayer;
|
||||
i_procPriority->mInfoQ.mListID = i_procPriority->mInfoCurr.mListID;
|
||||
i_procPriority->mInfoQ.mListPrio = i_procPriority->mInfoCurr.mListPrio;
|
||||
i_procPriority->queue_info.layer_id = i_procPriority->current_info.layer_id;
|
||||
i_procPriority->queue_info.list_id = i_procPriority->current_info.list_id;
|
||||
i_procPriority->queue_info.list_priority = i_procPriority->current_info.list_priority;
|
||||
|
||||
if (i_layer != 0xFFFFFFFD && i_procPriority->mInfoCurr.mLayer != i_layer) {
|
||||
i_procPriority->mInfoQ.mLayer = i_layer;
|
||||
changed = 1;
|
||||
if (i_layerID != fpcLy_CURRENT_e && i_procPriority->current_info.layer_id != i_layerID) {
|
||||
i_procPriority->queue_info.layer_id = i_layerID;
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
if (i_listID != 0xFFFD && i_procPriority->mInfoCurr.mListID != i_listID) {
|
||||
i_procPriority->mInfoQ.mListID = i_listID;
|
||||
changed = 1;
|
||||
if (i_listID != 0xFFFD && i_procPriority->current_info.list_id != i_listID) {
|
||||
i_procPriority->queue_info.list_id = i_listID;
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
if (i_priority != 0xFFFD && i_procPriority->mInfoCurr.mListPrio != i_priority) {
|
||||
i_procPriority->mInfoQ.mListPrio = i_priority;
|
||||
changed = 1;
|
||||
if (i_priority != fpcPi_CURRENT_e && i_procPriority->current_info.list_priority != i_priority) {
|
||||
i_procPriority->queue_info.list_priority = i_priority;
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
if (pProc->mInitState == 0 || pProc->mInitState == 1) {
|
||||
i_procPriority->mInfoCurr.mLayer = i_procPriority->mInfoQ.mLayer;
|
||||
i_procPriority->mInfoCurr.mListID = i_procPriority->mInfoQ.mListID;
|
||||
i_procPriority->mInfoCurr.mListPrio = i_procPriority->mInfoQ.mListPrio;
|
||||
if (process->init_state == 0 || process->init_state == 1) {
|
||||
i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
|
||||
i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
|
||||
i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (changed == 1)
|
||||
if (changed == TRUE)
|
||||
return fpcPi_ToQueue(i_procPriority);
|
||||
else
|
||||
return 0;
|
||||
@@ -132,15 +130,16 @@ s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layer, u16
|
||||
s32 fpcPi_Handler() {
|
||||
process_priority_class* i_procPriority;
|
||||
while (i_procPriority = fpcPi_GetFromQueue()) {
|
||||
base_process_class* pProc = (base_process_class*)i_procPriority->mBase.mpTagData;
|
||||
layer_management_tag_class* pLayerTag = &pProc->mLyTg;
|
||||
line_tag* pLineTag = &pProc->mLnTg;
|
||||
if (fpcLyTg_Move(pLayerTag, i_procPriority->mInfoQ.mLayer, i_procPriority->mInfoQ.mListID,
|
||||
i_procPriority->mInfoQ.mListPrio) == 1) {
|
||||
fpcLnTg_Move(pLineTag, i_procPriority->mInfoCurr.mListID);
|
||||
i_procPriority->mInfoCurr.mLayer = i_procPriority->mInfoQ.mLayer;
|
||||
i_procPriority->mInfoCurr.mListID = i_procPriority->mInfoQ.mListID;
|
||||
i_procPriority->mInfoCurr.mListPrio = i_procPriority->mInfoQ.mListPrio;
|
||||
base_process_class* process = (base_process_class*)i_procPriority->base.mpTagData;
|
||||
layer_management_tag_class* pLayerTag = &process->layer_tag;
|
||||
line_tag* pLineTag = &process->line_tag_;
|
||||
|
||||
if (fpcLyTg_Move(pLayerTag, i_procPriority->queue_info.layer_id, i_procPriority->queue_info.list_id,
|
||||
i_procPriority->queue_info.list_priority) == 1) {
|
||||
fpcLnTg_Move(pLineTag, i_procPriority->current_info.list_id);
|
||||
i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
|
||||
i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
|
||||
i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -151,23 +150,22 @@ s32 fpcPi_Handler() {
|
||||
|
||||
/* 800234BC-80023564 00A8+00 s=0 e=1 z=0 None .text
|
||||
* fpcPi_Init__FP22process_priority_classPvUiUsUs */
|
||||
s32 fpcPi_Init(process_priority_class* i_procPriority, void* i_data, fpc_ProcID i_layer, u16 i_listID,
|
||||
s32 fpcPi_Init(process_priority_class* i_procPriority, void* i_data, fpc_ProcID i_layerID, u16 i_listID,
|
||||
u16 i_priority) {
|
||||
if (!fpcPi_IsNormal(i_layer, i_listID, i_priority))
|
||||
if (!fpcPi_IsNormal(i_layerID, i_listID, i_priority))
|
||||
return 0;
|
||||
|
||||
i_procPriority->mInfoQ.mLayer = i_layer;
|
||||
i_procPriority->mInfoQ.mListID = i_listID;
|
||||
i_procPriority->mInfoQ.mListPrio = i_priority;
|
||||
i_procPriority->queue_info.layer_id = i_layerID;
|
||||
i_procPriority->queue_info.list_id = i_listID;
|
||||
i_procPriority->queue_info.list_priority = i_priority;
|
||||
|
||||
i_procPriority->mInfoCurr.mLayer = i_procPriority->mInfoQ.mLayer;
|
||||
i_procPriority->mInfoCurr.mListID = i_procPriority->mInfoQ.mListID;
|
||||
i_procPriority->mInfoCurr.mListPrio = i_procPriority->mInfoQ.mListPrio;
|
||||
cTg_Create(&i_procPriority->mBase, i_data);
|
||||
fpcMtdTg_Init(&i_procPriority->mMtdTag, (process_method_tag_func)fpcPi_Delete, i_procPriority);
|
||||
i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
|
||||
i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
|
||||
i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
|
||||
cTg_Create(&i_procPriority->base, i_data);
|
||||
fpcMtdTg_Init(&i_procPriority->method_tag, (process_method_tag_func)fpcPi_Delete, i_procPriority);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804505F0-804505F8 0008+00 s=0 e=5 z=1 None .sdata None */
|
||||
s8 data_804505F0 = 0xFF;
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
|
||||
#include "f_pc/f_pc_profile.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450D50-80450D58 0004+04 s=1 e=0 z=2 None .sbss g_fpcPf_ProfileList_p */
|
||||
process_profile_definition** g_fpcPf_ProfileList_p;
|
||||
|
||||
/* 80023564-80023578 0014+00 s=0 e=1 z=0 None .text fpcPf_Get__Fs */
|
||||
process_profile_definition* fpcPf_Get(s16 i_profName) {
|
||||
return g_fpcPf_ProfileList_p[i_profName];
|
||||
}
|
||||
process_profile_definition* fpcPf_Get(s16 i_profname) {
|
||||
return g_fpcPf_ProfileList_p[i_profname];
|
||||
}
|
||||
|
||||
+796
-1594
File diff suppressed because it is too large
Load Diff
@@ -7,18 +7,18 @@
|
||||
|
||||
/* 80023578-80023590 0018+00 s=0 e=3 z=77 None .text fpcSch_JudgeForPName__FPvPv */
|
||||
void* fpcSch_JudgeForPName(void* i_proc, void* i_data) {
|
||||
s16 proc_name = *(s16*)i_data;
|
||||
|
||||
if (((base_process_class*)i_proc)->mProcName == proc_name)
|
||||
s16 name = *(s16*)i_data;
|
||||
if (((base_process_class*)i_proc)->name == name)
|
||||
return i_proc;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 80023590-800235A8 0018+00 s=0 e=44 z=270 None .text fpcSch_JudgeByID__FPvPv */
|
||||
void* fpcSch_JudgeByID(void* i_proc, void* i_data) {
|
||||
s32 process_id = *(s32*)i_data;
|
||||
|
||||
if (((base_process_class*)i_proc)->mBsPcId == process_id)
|
||||
fpc_ProcID process_id = *(fpc_ProcID*)i_data;
|
||||
if (((base_process_class*)i_proc)->id == process_id)
|
||||
return i_proc;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,16 +6,17 @@
|
||||
#include "f_pc/f_pc_stdcreate_req.h"
|
||||
#include "f_pc/f_pc_load.h"
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
/* 80023B70-80023BC4 0054+00 s=1 e=0 z=5 None .text
|
||||
* fpcSCtRq_phase_Load__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_Load(standard_create_request_class* i_SCtReq) {
|
||||
switch (fpcLd_Load(i_SCtReq->mLoadID)) {
|
||||
case 0:
|
||||
s32 fpcSCtRq_phase_Load(standard_create_request_class* i_request) {
|
||||
switch (fpcLd_Load(i_request->process_name)) {
|
||||
case cPhs_INIT_e:
|
||||
return cPhs_INIT_e;
|
||||
case 4:
|
||||
return 2;
|
||||
case 5:
|
||||
case cPhs_COMPLEATE_e:
|
||||
return cPhs_NEXT_e;
|
||||
case cPhs_ERROR_e:
|
||||
default:
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -23,64 +24,64 @@ s32 fpcSCtRq_phase_Load(standard_create_request_class* i_SCtReq) {
|
||||
|
||||
/* 80023BC4-80023C2C 0068+00 s=1 e=0 z=9 None .text
|
||||
* fpcSCtRq_phase_CreateProcess__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_SCtReq) {
|
||||
fpcLy_SetCurrentLayer(i_SCtReq->mBase.mpLayer);
|
||||
i_SCtReq->mBase.mpRes =
|
||||
fpcBs_Create(i_SCtReq->mLoadID, i_SCtReq->mBase.mBsPcId, i_SCtReq->unk_0x54);
|
||||
if (i_SCtReq->mBase.mpRes == NULL) {
|
||||
fpcLd_Free(i_SCtReq->mLoadID);
|
||||
s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_request) {
|
||||
fpcLy_SetCurrentLayer(i_request->base.layer);
|
||||
i_request->base.process =
|
||||
fpcBs_Create(i_request->process_name, i_request->base.id, i_request->process_append);
|
||||
if (i_request->base.process == NULL) {
|
||||
fpcLd_Free(i_request->process_name);
|
||||
return cPhs_ERROR_e;
|
||||
} else {
|
||||
i_SCtReq->mBase.mpRes->mpCtRq = (struct create_request*)i_SCtReq;
|
||||
return 2;
|
||||
i_request->base.process->create_req = &i_request->base;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80023C2C-80023C64 0038+00 s=1 e=0 z=3 None .text
|
||||
* fpcSCtRq_phase_SubCreateProcess__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_SCtReq) {
|
||||
fpcLy_SetCurrentLayer(i_SCtReq->mBase.mpLayer);
|
||||
return fpcBs_SubCreate(i_SCtReq->mBase.mpRes);
|
||||
s32 fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_request) {
|
||||
fpcLy_SetCurrentLayer(i_request->base.layer);
|
||||
return fpcBs_SubCreate(i_request->base.process);
|
||||
}
|
||||
|
||||
/* 80023C64-80023CBC 0058+00 s=1 e=0 z=14 None .text
|
||||
* fpcSCtRq_phase_IsComplete__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* i_SCtReq) {
|
||||
process_node_class* procNode = (process_node_class*)i_SCtReq->mBase.mpRes;
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, procNode->mBase.mSubType) == 1) {
|
||||
if (fpcLy_IsCreatingMesg(&procNode->mLayer) == 1) {
|
||||
s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* i_request) {
|
||||
process_node_class* procNode = (process_node_class*)i_request->base.process;
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, procNode->base.subtype) == TRUE) {
|
||||
if (fpcLy_IsCreatingMesg(&procNode->layer) == TRUE) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
}
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80023CBC-80023D0C 0050+00 s=1 e=0 z=5 None .text
|
||||
* fpcSCtRq_phase_PostMethod__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* i_SCtReq) {
|
||||
if (i_SCtReq->unk_0x58 != NULL &&
|
||||
i_SCtReq->unk_0x58(i_SCtReq->mBase.mpRes, i_SCtReq->unk_0x5C) == 0)
|
||||
s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* i_request) {
|
||||
if (i_request->create_post_method != NULL &&
|
||||
i_request->create_post_method(i_request->base.process, i_request->unk_0x5C) == 0)
|
||||
{
|
||||
return cPhs_INIT_e;
|
||||
} else {
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80023D0C-80023D14 0008+00 s=1 e=0 z=0 None .text
|
||||
* fpcSCtRq_phase_Done__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_Done(standard_create_request_class* i_SCtReq) {
|
||||
return 2;
|
||||
s32 fpcSCtRq_phase_Done(standard_create_request_class* i_request) {
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80023D14-80023D84 0070+00 s=1 e=0 z=2 None .text
|
||||
* fpcSCtRq_Handler__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_Handler(standard_create_request_class* i_SCtReq) {
|
||||
s32 phase_state = cPhs_Do(&i_SCtReq->unk_0x48, i_SCtReq);
|
||||
s32 fpcSCtRq_Handler(standard_create_request_class* i_request) {
|
||||
s32 phase_state = cPhs_Do(&i_request->phase_request, i_request);
|
||||
|
||||
switch (phase_state) {
|
||||
case cPhs_NEXT_e:
|
||||
return fpcSCtRq_Handler(i_SCtReq);
|
||||
return fpcSCtRq_Handler(i_request);
|
||||
case cPhs_COMPLEATE_e:
|
||||
return cPhs_COMPLEATE_e;
|
||||
case cPhs_LOADING_e:
|
||||
@@ -92,20 +93,20 @@ s32 fpcSCtRq_Handler(standard_create_request_class* i_SCtReq) {
|
||||
|
||||
/* 80023D84-80023D8C 0008+00 s=1 e=0 z=0 None .text
|
||||
* fpcSCtRq_Delete__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_Delete(standard_create_request_class* i_SCtReq) {
|
||||
s32 fpcSCtRq_Delete(standard_create_request_class* i_request) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80023D8C-80023D94 0008+00 s=1 e=0 z=1 None .text
|
||||
* fpcSCtRq_Cancel__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_Cancel(standard_create_request_class* i_SCtReq) {
|
||||
s32 fpcSCtRq_Cancel(standard_create_request_class* i_request) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80023D94-80023E28 0094+00 s=0 e=12 z=1 None .text
|
||||
* fpcSCtRq_Request__FP11layer_classsPFPvPv_iPvPv */
|
||||
s32 fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc i_createFunc,
|
||||
void* param_4, void* param_5) {
|
||||
fpc_ProcID fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc i_createFunc,
|
||||
void* param_4, void* i_append) {
|
||||
static create_request_method_class submethod = {
|
||||
(cPhs__Handler)fpcSCtRq_Handler,
|
||||
(process_method_func)fpcSCtRq_Cancel,
|
||||
@@ -123,19 +124,19 @@ s32 fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc i_creat
|
||||
};
|
||||
|
||||
if (i_procName >= 0x7FFF) {
|
||||
return -1;
|
||||
} else {
|
||||
standard_create_request_class* request =
|
||||
(standard_create_request_class*)fpcCtRq_Create(i_layer, 0x60, &submethod);
|
||||
if (request == NULL) {
|
||||
return -1;
|
||||
} else {
|
||||
cPhs_Set(&request->unk_0x48, method);
|
||||
request->mLoadID = i_procName;
|
||||
request->unk_0x58 = i_createFunc;
|
||||
request->unk_0x5C = param_4;
|
||||
request->unk_0x54 = param_5;
|
||||
return request->mBase.mBsPcId;
|
||||
}
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
|
||||
standard_create_request_class* request =
|
||||
(standard_create_request_class*)fpcCtRq_Create(i_layer, sizeof(standard_create_request_class), &submethod);
|
||||
if (request == NULL) {
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
cPhs_Set(&request->phase_request, method);
|
||||
request->process_name = i_procName;
|
||||
request->create_post_method = i_createFunc;
|
||||
request->unk_0x5C = param_4;
|
||||
request->process_append = i_append;
|
||||
return request->base.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user