mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-13 19:44:32 -04:00
Match f_op_scene, fix profile structs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user