mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-26 08:24:31 -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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user