mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 21:21:57 -04:00
Match f_op_scene, fix profile structs
This commit is contained in:
@@ -1426,13 +1426,14 @@ SECTION_DATA static leafdraw_method_class l_dMeter2_Method = {
|
||||
};
|
||||
|
||||
/* 803BFA68-803BFA90 -00001 0028+00 0/0 0/0 1/0 .data g_profile_METER2 */
|
||||
SECTION_DATA extern process_profile_definition g_profile_METER2 = {
|
||||
SECTION_DATA extern msg_process_profile_definition g_profile_METER2 = {
|
||||
-3, 12,
|
||||
-3, 0x0316,
|
||||
0, (process_method_class*)&g_fpcLf_Method,
|
||||
0x4C0, 0,
|
||||
0, &g_fopMsg_Method,
|
||||
0x0301, 0,
|
||||
0, &l_dMeter2_Method};
|
||||
0, &l_dMeter2_Method
|
||||
};
|
||||
|
||||
/* 80399338-80399338 025998 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -91,6 +91,7 @@ public:
|
||||
/* 802590F8 */ void changeGameScene();
|
||||
|
||||
private:
|
||||
/* 0x1C4 */ request_of_phase_process_class field_0x1c4;
|
||||
/* 0x1CC */ JKRExpHeap* mHeap;
|
||||
/* 0x1D0 */ JKRExpHeap* field_0x1d0;
|
||||
/* 0x1D4 */ dScnName_camera_c mCamera;
|
||||
|
||||
@@ -271,7 +271,7 @@ static int fopAc_Create(void* actor) {
|
||||
fopAc_ac_c* ac = (fopAc_ac_c*)actor;
|
||||
|
||||
if (fpcM_IsFirstCreating(actor)) {
|
||||
leaf_process_profile_definition* profile = (leaf_process_profile_definition*) fpcM_GetProfile(actor);
|
||||
actor_process_profile_definition* profile = (actor_process_profile_definition*) fpcM_GetProfile(actor);
|
||||
ac->mAcType = fpcBs_MakeOfType(&g_fopAc_type);
|
||||
ac->mSubMtd = (profile_method_class*)profile->mBase.mMethods;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_draw_tag.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
|
||||
/* 8001E140-8001E180 018A80 0040+00 1/0 0/0 0/0 .text fopCam_Draw__FP12camera_class */
|
||||
@@ -59,8 +60,8 @@ static int fopCam_Create(void* i_actorP) {
|
||||
|
||||
if (fpcM_IsFirstCreating(i_actorP)) {
|
||||
// TODO: This should be camera_process_profile_definition
|
||||
leaf_process_profile_definition* profile = (leaf_process_profile_definition*) fpcM_GetProfile(i_actorP);
|
||||
camera->mpMtd = profile->mMethods;
|
||||
camera_process_profile_definition* profile = (camera_process_profile_definition*) fpcM_GetProfile(i_actorP);
|
||||
camera->mpMtd = profile->mSubMtd;
|
||||
|
||||
fopDwTg_Init(&camera->mCreateTag, camera);
|
||||
u32* append = (u32*)fpcM_GetAppend(camera);
|
||||
|
||||
@@ -91,8 +91,7 @@ int fopMsg_Create(void* data) {
|
||||
msg_class *msg = (msg_class*)data;
|
||||
|
||||
if (fpcM_IsFirstCreating(msg)) {
|
||||
// TODO: This should be msg_process_profile_definition
|
||||
leaf_process_profile_definition* profile = (leaf_process_profile_definition*) fpcM_GetProfile(msg);
|
||||
msg_process_profile_definition* profile = (msg_process_profile_definition*) fpcM_GetProfile(msg);
|
||||
msg->mMsgType = fpcBs_MakeOfType(&fopMsg_MSG_TYPE);
|
||||
msg->mSubMtd = profile->mMethods;
|
||||
fopDwTg_Init(&msg->mDwTg, msg);
|
||||
|
||||
+27
-49
@@ -4,80 +4,58 @@
|
||||
//
|
||||
|
||||
#include "f_op/f_op_scene.h"
|
||||
#include "f_op/f_op_scene_tag.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" static void fopScn_Draw__FP11scene_class();
|
||||
extern "C" static void fopScn_Execute__FP11scene_class();
|
||||
extern "C" static void fopScn_IsDelete__FPv();
|
||||
extern "C" static void fopScn_Delete__FPv();
|
||||
extern "C" static void fopScn_Create__FPv();
|
||||
extern "C" extern void* g_fopScn_Method[5 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void fopScnTg_QueueTo__FP15scene_tag_class();
|
||||
extern "C" void fopScnTg_ToQueue__FP15scene_tag_class();
|
||||
extern "C" void fopScnTg_Init__FP15scene_tag_classPv();
|
||||
extern "C" void fpcMtd_Execute__FP20process_method_classPv();
|
||||
extern "C" void fpcMtd_IsDelete__FP20process_method_classPv();
|
||||
extern "C" void fpcMtd_Delete__FP20process_method_classPv();
|
||||
extern "C" void fpcMtd_Create__FP20process_method_classPv();
|
||||
extern "C" void fpcNd_DrawMethod__FP21nodedraw_method_classPv();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 8001EB34-8001EB5C 019474 0028+00 1/0 0/0 0/0 .text fopScn_Draw__FP11scene_class */
|
||||
static void fopScn_Draw(scene_class* pScene) {
|
||||
fpcNd_DrawMethod((nodedraw_method_class*)pScene->mpProcessMtd, pScene);
|
||||
fpcNd_DrawMethod((nodedraw_method_class*)pScene->mpMtd, pScene);
|
||||
}
|
||||
|
||||
/* 8001EB5C-8001EB84 01949C 0028+00 1/0 0/0 0/0 .text fopScn_Execute__FP11scene_class */
|
||||
static void fopScn_Execute(scene_class* pScene) {
|
||||
fpcMtd_Execute(pScene->mpProcessMtd, pScene);
|
||||
fpcMtd_Execute(pScene->mpMtd, pScene);
|
||||
}
|
||||
|
||||
/* 8001EB84-8001EBAC 0194C4 0028+00 1/0 0/0 0/0 .text fopScn_IsDelete__FPv */
|
||||
static s32 fopScn_IsDelete(void* param_1) {
|
||||
return fpcMtd_IsDelete(((scene_class*)param_1)->mpProcessMtd, param_1);
|
||||
static s32 fopScn_IsDelete(scene_class* pScene) {
|
||||
return fpcMtd_IsDelete(pScene->mpMtd, pScene);
|
||||
}
|
||||
|
||||
/* 8001EBAC-8001EC00 0194EC 0054+00 1/0 0/0 0/0 .text fopScn_Delete__FPv */
|
||||
static s32 fopScn_Delete(void* param_1) {
|
||||
scene_class* pScene = (scene_class*)param_1;
|
||||
s32 ret = fpcMtd_Delete(pScene->mpProcessMtd, pScene);
|
||||
s32 ret = fpcMtd_Delete(pScene->mpMtd, pScene);
|
||||
if (ret == 1) {
|
||||
fopScnTg_QueueTo(&pScene->field_0x1b0);
|
||||
fopScnTg_QueueTo(&pScene->mScnTg);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 8001EC00-8001EC74 019540 0074+00 1/0 0/0 0/0 .text fopScn_Create__FPv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void fopScn_Create(void* param_0) {
|
||||
nofralloc
|
||||
#include "asm/f_op/f_op_scene/fopScn_Create__FPv.s"
|
||||
static s32 fopScn_Create(scene_class * pScene) {
|
||||
if (fpcM_IsFirstCreating(pScene)) {
|
||||
scene_process_profile_definition* profile = (scene_process_profile_definition*) fpcM_GetProfile(pScene);
|
||||
pScene->mpMtd = profile->mpMtd;
|
||||
fopScnTg_Init(&pScene->mScnTg, pScene);
|
||||
fopScnTg_ToQueue(&pScene->mScnTg);
|
||||
|
||||
if (pScene->mBase.mBase.mpUserData != NULL) {
|
||||
pScene->mBase.mBase.mParameters = *(u32*)pScene->mBase.mBase.mpUserData;
|
||||
}
|
||||
}
|
||||
|
||||
return fpcMtd_Create(pScene->mpMtd, pScene);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A38B0-803A38C8 -00001 0014+04 0/0 9/0 0/0 .data g_fopScn_Method */
|
||||
SECTION_DATA extern void* g_fopScn_Method[5 + 1 /* padding */] = {
|
||||
(void*)fopScn_Create,
|
||||
(void*)fopScn_Delete,
|
||||
(void*)fopScn_Execute,
|
||||
(void*)fopScn_IsDelete,
|
||||
(void*)fopScn_Draw,
|
||||
/* padding */
|
||||
NULL,
|
||||
nodedraw_method_class g_fopScn_Method = {
|
||||
(process_method_func)fopScn_Create,
|
||||
(process_method_func)fopScn_Delete,
|
||||
(process_method_func)fopScn_Execute,
|
||||
(process_method_func)fopScn_IsDelete,
|
||||
(process_method_func)fopScn_Draw,
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ int fopScnPause_Enable(scene_class* pScene) {
|
||||
/* 80020594-8002064C 01AED4 00B8+00 0/0 2/2 0/0 .text fopScnPause_Disable__FP11scene_class */
|
||||
int fopScnPause_Disable(scene_class* pScene) {
|
||||
if (pScene) {
|
||||
void* tmp = (void*)pScene->field_0x0.mLyTg.mpLayer->mpPcNode;
|
||||
void* tmp = (void*)pScene->mBase.mBase.mLyTg.mpLayer->mpPcNode;
|
||||
|
||||
if (!tmp) {
|
||||
fpcM_PauseDisable(pScene, 1);
|
||||
|
||||
@@ -78,7 +78,7 @@ static void fopScnRq_Execute(scene_request_class* pScnRq) {
|
||||
static int fopScnRq_PostMethod(void* param_1, scene_request_class* pScnRq) {
|
||||
if (pScnRq->mFadeRequest) {
|
||||
fopScnPause_Enable((scene_class*)param_1);
|
||||
fopOvlpM_ToldAboutID(((scene_class*)param_1)->field_0x0.mBsPcId);
|
||||
fopOvlpM_ToldAboutID(((scene_class*)param_1)->mBase.mBase.mBsPcId);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ base_process_class* fpcBs_Create(s16 pProcTypeID, unsigned int pProcID, void* pD
|
||||
procClass->mBsType = fpcBs_MakeOfType(&g_fpcBs_type);
|
||||
procClass->mProcName = procProfDef->mProcName;
|
||||
fpcPause_Init(procClass);
|
||||
procClass->mpPcMtd = procProfDef->mpPcMtd;
|
||||
procClass->mpPcMtd = procProfDef->mSubMtd;
|
||||
procClass->mpProf = procProfDef;
|
||||
procClass->mpUserData = pData;
|
||||
procClass->mParameters = procProfDef->mParameters;
|
||||
|
||||
@@ -22,9 +22,9 @@ s32 fpcDw_Execute(base_process_class* pProc) {
|
||||
process_method_func func;
|
||||
curLay = fpcLy_CurrentLayer();
|
||||
if (fpcBs_Is_JustOfType(g_fpcLf_type, pProc->mSubType)) {
|
||||
func = ((nodedraw_method_class*)pProc->mpPcMtd)->mNodedrawFunc;
|
||||
func = ((leafdraw_method_class*)pProc->mpPcMtd)->mpDrawFunc;
|
||||
} else {
|
||||
func = ((nodedraw_method_class*)pProc->mpPcMtd)->mNodedrawFunc;
|
||||
func = ((nodedraw_method_class*)pProc->mpPcMtd)->mpDrawFunc;
|
||||
}
|
||||
fpcLy_SetCurrentLayer(pProc->mLyTg.mpLayer);
|
||||
ret = func(pProc);
|
||||
|
||||
@@ -55,10 +55,10 @@ 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* pLeaf) {
|
||||
process_profile_definition* profDef;
|
||||
leaf_process_profile_definition* profDef;
|
||||
if (pLeaf->mBase.mInitState == 0) {
|
||||
profDef = (process_profile_definition*)pLeaf->mBase.mpProf;
|
||||
pLeaf->mpDrawMtd = profDef->mLfDrwMth;
|
||||
profDef = (leaf_process_profile_definition*)pLeaf->mBase.mpProf;
|
||||
pLeaf->mpDrawMtd = profDef->mSubMtd;
|
||||
pLeaf->mBase.mSubType = fpcBs_MakeOfType(&g_fpcLf_type);
|
||||
fpcDwPi_Init(&pLeaf->mDwPi, profDef->mPriority);
|
||||
pLeaf->mbUnk0 = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/* 800224F0-80022514 0024+00 s=1 e=1 z=0 None .text fpcNd_DrawMethod__FP21nodedraw_method_classPv
|
||||
*/
|
||||
s32 fpcNd_DrawMethod(nodedraw_method_class* pNodeMethod, void* pData) {
|
||||
return fpcMtd_Method(pNodeMethod->mNodedrawFunc, pData);
|
||||
return fpcMtd_Method(pNodeMethod->mpDrawFunc, pData);
|
||||
}
|
||||
|
||||
/* 80022514-80022580 006C+00 s=1 e=0 z=0 None .text fpcNd_Draw__FP18process_node_class */
|
||||
@@ -104,7 +104,7 @@ s32 fpcNd_Create(process_node_class* pProcNode1) {
|
||||
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->mBase.mLfDrwMth;
|
||||
pProcNode->mpNodeMtd = (nodedraw_method_class*)pProcProfileDef->mSubMtd;
|
||||
fpcLy_Create(&pProcNode->mLayer, pProcNode, pProcNode->mLayerNodeLists, 0x10);
|
||||
pProcNode->mUnk0 = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user