mirror of https://github.com/zeldaret/tp.git
f_op_view OK, f_op_kankyo documentation
This commit is contained in:
parent
8f1130471a
commit
501c7dda22
|
@ -1,16 +0,0 @@
|
|||
lbl_8001F248:
|
||||
/* 8001F248 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||
/* 8001F24C 7C 08 02 A6 */ mflr r0
|
||||
/* 8001F250 90 01 00 14 */ stw r0, 0x14(r1)
|
||||
/* 8001F254 7C 64 1B 78 */ mr r4, r3
|
||||
/* 8001F258 80 63 00 10 */ lwz r3, 0x10(r3)
|
||||
/* 8001F25C 80 03 00 24 */ lwz r0, 0x24(r3)
|
||||
/* 8001F260 90 04 00 C0 */ stw r0, 0xc0(r4)
|
||||
/* 8001F264 88 03 00 28 */ lbz r0, 0x28(r3)
|
||||
/* 8001F268 98 04 00 C4 */ stb r0, 0xc4(r4)
|
||||
/* 8001F26C 80 64 00 C0 */ lwz r3, 0xc0(r4)
|
||||
/* 8001F270 48 00 32 5D */ bl fpcMtd_Create__FP20process_method_classPv
|
||||
/* 8001F274 80 01 00 14 */ lwz r0, 0x14(r1)
|
||||
/* 8001F278 7C 08 03 A6 */ mtlr r0
|
||||
/* 8001F27C 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 8001F280 4E 80 00 20 */ blr
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
class kankyo_class : public leafdraw_class {
|
||||
public:
|
||||
/* 0xC0 */ int field_0xc0;
|
||||
/* 0xC4 */ create_tag_class field_0xc4;
|
||||
/* 0xD8 */ leafdraw_method_class* field_0xd8;
|
||||
/* 0xDC */ cXyz field_0xdc;
|
||||
/* 0xE8 */ cXyz field_0xe8;
|
||||
/* 0xF4 */ u32 field_0xf4;
|
||||
/* 0xC0 */ int mBsType;
|
||||
/* 0xC4 */ create_tag_class mDwTg;
|
||||
/* 0xD8 */ leafdraw_method_class* mSubMtd;
|
||||
/* 0xDC */ cXyz mPos;
|
||||
/* 0xE8 */ cXyz mScale;
|
||||
/* 0xF4 */ u32 mParam;
|
||||
};
|
||||
|
||||
#endif /* F_OP_F_OP_KANKYO_H */
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
struct fopKyM_prm_class {
|
||||
/* 0x00 */ cXyz field_0x0;
|
||||
/* 0x0C */ cXyz field_0xc;
|
||||
/* 0x18 */ int field_0x18;
|
||||
/* 0x00 */ cXyz mPos;
|
||||
/* 0x0C */ cXyz mScale;
|
||||
/* 0x18 */ int mParam;
|
||||
}; // Size: 0x1C
|
||||
|
||||
typedef int (*fopKyM_CreateFunc)(void*);
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
struct view_process_profile_definition {
|
||||
/* 0x00 */ leaf_process_profile_definition mBase;
|
||||
/* 0x24 */ leafdraw_method_class* mSubMtd; // Subclass methods
|
||||
/* 0x28 */ u32 unk28;
|
||||
/* 0x28 */ u8 unk28;
|
||||
/* 0x29 */ u8 unk29[3]; // pad
|
||||
/* 0x2C */ u32 unk2C;
|
||||
/* 0x30 */ u32 unk30;
|
||||
/* 0x34 */ u32 unk34;
|
||||
|
@ -37,8 +38,8 @@ struct view_port_class {
|
|||
};
|
||||
|
||||
struct view_class : public leafdraw_class {
|
||||
/* 0x0C0 */ leafdraw_method_class* mpLeafdrawMtd;
|
||||
/* 0x0C4 */ u8 field_0xc4[4];
|
||||
/* 0x0C0 */ leafdraw_method_class* mSubMtd;
|
||||
/* 0x0C4 */ u8 field_0xc4;
|
||||
/* 0x0C8 */ f32 mNear;
|
||||
/* 0x0CC */ f32 mFar;
|
||||
/* 0x0D0 */ f32 mFovy;
|
||||
|
|
|
@ -36,7 +36,7 @@ static int fopKy_Draw(void* param_0) {
|
|||
kankyo_class* env = (kankyo_class*)param_0;
|
||||
|
||||
if (!dComIfGp_isPauseFlag()) {
|
||||
ret = fpcLf_DrawMethod(env->field_0xd8, param_0);
|
||||
ret = fpcLf_DrawMethod(env->mSubMtd, param_0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -48,7 +48,7 @@ static int fopKy_Execute(void* param_0) {
|
|||
kankyo_class* env = (kankyo_class*)param_0;
|
||||
|
||||
if (dScnPly_c::isPause() && (!dComIfGp_isPauseFlag() || fpcM_GetName(param_0) == PROC_ENVSE)) {
|
||||
ret = fpcMtd_Execute((process_method_class*)env->field_0xd8,param_0);
|
||||
ret = fpcMtd_Execute(&env->mSubMtd->mBase,param_0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -59,9 +59,9 @@ static int fopKy_IsDelete(void* param_0) {
|
|||
int ret;
|
||||
kankyo_class* env = (kankyo_class*)param_0;
|
||||
|
||||
ret = fpcMtd_IsDelete((process_method_class*)env->field_0xd8,env);
|
||||
ret = fpcMtd_IsDelete(&env->mSubMtd->mBase,env);
|
||||
if (ret == 1) {
|
||||
fopDwTg_DrawQTo(&env->field_0xc4);
|
||||
fopDwTg_DrawQTo(&env->mDwTg);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -71,8 +71,8 @@ static int fopKy_IsDelete(void* param_0) {
|
|||
static int fopKy_Delete(void* param_0) {
|
||||
kankyo_class* env = (kankyo_class*)param_0;
|
||||
|
||||
int ret = fpcMtd_Delete((process_method_class*)env->field_0xd8,env);
|
||||
fopDwTg_DrawQTo(&env->field_0xc4);
|
||||
int ret = fpcMtd_Delete(&env->mSubMtd->mBase,env);
|
||||
fopDwTg_DrawQTo(&env->mDwTg);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -91,23 +91,23 @@ static int fopKy_Create(void* param_0) {
|
|||
// TODO: This should be kankyo_process_profile_definition
|
||||
leaf_process_profile_definition* profile = (leaf_process_profile_definition*) fpcM_GetProfile(param_0);
|
||||
|
||||
env->field_0xc0 = fpcBs_MakeOfType(&fopKy_KANKYO_TYPE);
|
||||
env->field_0xd8 = profile->mBase.mMethods;
|
||||
env->mBsType = fpcBs_MakeOfType(&fopKy_KANKYO_TYPE);
|
||||
env->mSubMtd = profile->mBase.mMethods;
|
||||
|
||||
fopDwTg_Init((create_tag_class*)&env->field_0xc4, env);
|
||||
fopDwTg_Init((create_tag_class*)&env->mDwTg, env);
|
||||
fopKyM_prm_class* append = (fopKyM_prm_class*)fopKyM_GetAppend(env);
|
||||
|
||||
if (append) {
|
||||
env->field_0xdc = append->field_0x0;
|
||||
env->field_0xe8 = append->field_0xc;
|
||||
env->field_0xf4 = append->field_0x18;
|
||||
env->mPos = append->mPos;
|
||||
env->mScale = append->mScale;
|
||||
env->mParam = append->mParam;
|
||||
}
|
||||
}
|
||||
|
||||
int ret = fpcMtd_Create((process_method_class*)env->field_0xd8, env);
|
||||
if (ret == 4) {
|
||||
int ret = fpcMtd_Create(&env->mSubMtd->mBase, env);
|
||||
if (ret == cPhs_COMPLEATE_e) {
|
||||
s16 priority = fpcM_DrawPriority(env);
|
||||
fopDwTg_ToDrawQ((create_tag_class*)&env->field_0xc4,priority);
|
||||
fopDwTg_ToDrawQ((create_tag_class*)&env->mDwTg,priority);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -24,21 +24,21 @@ static fopKyM_prm_class* fopKyM_CreateAppend() {
|
|||
}
|
||||
|
||||
/* 8001F6B8-8001F748 019FF8 0090+00 2/2 0/0 0/0 .text createAppend__FiP4cXyzP4cXyz */
|
||||
static fopKyM_prm_class* createAppend(int param_0, cXyz* param_1, cXyz* param_2) {
|
||||
static fopKyM_prm_class* createAppend(int param, cXyz* pPos, cXyz* pScale) {
|
||||
fopKyM_prm_class* params = fopKyM_CreateAppend();
|
||||
|
||||
if (params == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (param_1 != NULL) {
|
||||
params->field_0x0 = *param_1;
|
||||
if (pPos != NULL) {
|
||||
params->mPos = *pPos;
|
||||
}
|
||||
|
||||
if (param_2 != NULL) {
|
||||
params->field_0xc = *param_2;
|
||||
if (pScale != NULL) {
|
||||
params->mScale = *param;
|
||||
}
|
||||
params->field_0x18 = param_0;
|
||||
params->mParam = param;
|
||||
|
||||
return params;
|
||||
}
|
||||
|
@ -54,9 +54,9 @@ static int fopKyM_Create(s16 procName, fopKyM_CreateFunc createFunc, void* proce
|
|||
}
|
||||
|
||||
/* 8001F7B8-8001F818 01A0F8 0060+00 0/0 3/3 1/1 .text fopKyM_create__FsiP4cXyzP4cXyzPFPv_i */
|
||||
int fopKyM_create(s16 procName, int param_1, cXyz* param_2, cXyz* param_3,
|
||||
int fopKyM_create(s16 procName, int param, cXyz* pPos, cXyz* pScale,
|
||||
fopKyM_CreateFunc createFunc) {
|
||||
fopKyM_prm_class* params = createAppend(param_1, param_2, param_3);
|
||||
fopKyM_prm_class* params = createAppend(param, pPos, pScale);
|
||||
|
||||
if (params == NULL) {
|
||||
return -1;
|
||||
|
@ -66,9 +66,9 @@ int fopKyM_create(s16 procName, int param_1, cXyz* param_2, cXyz* param_3,
|
|||
}
|
||||
|
||||
/* 8001F818-8001F87C 01A158 0064+00 0/0 1/1 0/0 .text fopKyM_fastCreate__FsiP4cXyzP4cXyzPFPv_i */
|
||||
base_process_class* fopKyM_fastCreate(s16 procName, int param_1, cXyz* param_2, cXyz* param_3,
|
||||
base_process_class* fopKyM_fastCreate(s16 procName, int param, cXyz* pPos, cXyz* pScale,
|
||||
fopKyM_CreateFunc createFunc) {
|
||||
fopKyM_prm_class* params = createAppend(param_1, param_2, param_3);
|
||||
fopKyM_prm_class* params = createAppend(param, pPos, pScale);
|
||||
|
||||
if (params == NULL) {
|
||||
return NULL;
|
||||
|
@ -79,18 +79,18 @@ base_process_class* fopKyM_fastCreate(s16 procName, int param_1, cXyz* param_2,
|
|||
|
||||
/* 8001F87C-8001F90C 01A1BC 0090+00 0/0 6/6 37/37 .text fopKyM_createWpillar__FPC4cXyzfi
|
||||
*/
|
||||
int fopKyM_createWpillar(cXyz const* param_0, f32 param_1, int param_2) {
|
||||
int fopKyM_createWpillar(cXyz const* pPos, f32 scale, int param) {
|
||||
fopKyM_prm_class* params = fopKyM_CreateAppend();
|
||||
|
||||
if (params == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
params->field_0x0 = *param_0;
|
||||
params->field_0xc.x = param_1;
|
||||
params->field_0xc.y = param_1;
|
||||
params->field_0xc.z = param_1;
|
||||
params->field_0x18 = param_2;
|
||||
params->mPos = *pPos;
|
||||
params->mScale.x = scale;
|
||||
params->mScale.y = scale;
|
||||
params->mScale.z = scale;
|
||||
params->mParam = param;
|
||||
|
||||
return fopKyM_Create(PROC_WPILLAR, NULL, params);
|
||||
}
|
||||
|
|
|
@ -4,73 +4,48 @@
|
|||
//
|
||||
|
||||
#include "f_op/f_op_view.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" static void fopVw_Draw__FP10view_class();
|
||||
extern "C" static void fopVw_Execute__FP10view_class();
|
||||
extern "C" static void fopVw_IsDelete__FPv();
|
||||
extern "C" static void fopVw_Delete__FP10view_class();
|
||||
extern "C" static void fopVw_Create__FPv();
|
||||
extern "C" extern void* g_fopVw_Method[5 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void fpcLf_DrawMethod__FP21leafdraw_method_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();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 8001F1A8-8001F1D0 019AE8 0028+00 1/0 0/0 0/0 .text fopVw_Draw__FP10view_class */
|
||||
void fopVw_Draw(view_class* pView) {
|
||||
fpcLf_DrawMethod(pView->mpLeafdrawMtd, pView);
|
||||
fpcLf_DrawMethod(pView->mSubMtd, pView);
|
||||
}
|
||||
|
||||
/* 8001F1D0-8001F1F8 019B10 0028+00 1/0 0/0 0/0 .text fopVw_Execute__FP10view_class */
|
||||
void fopVw_Execute(view_class* pView) {
|
||||
fpcMtd_Execute((process_method_class*)pView->mpLeafdrawMtd, pView);
|
||||
fpcMtd_Execute(&pView->mSubMtd->mBase, pView);
|
||||
}
|
||||
|
||||
/* 8001F1F8-8001F220 019B38 0028+00 1/0 0/0 0/0 .text fopVw_IsDelete__FPv */
|
||||
s32 fopVw_IsDelete(void* param_1) {
|
||||
view_class* pView = (view_class*)param_1;
|
||||
return fpcMtd_IsDelete((process_method_class*)pView->mpLeafdrawMtd, pView);
|
||||
s32 fopVw_IsDelete(void* data) {
|
||||
view_class* pView = (view_class*)data;
|
||||
return fpcMtd_IsDelete(&pView->mSubMtd->mBase, pView);
|
||||
}
|
||||
|
||||
/* 8001F220-8001F248 019B60 0028+00 1/0 0/0 0/0 .text fopVw_Delete__FP10view_class */
|
||||
s32 fopVw_Delete(view_class* pView) {
|
||||
return fpcMtd_Delete((process_method_class*)pView->mpLeafdrawMtd, pView);
|
||||
return fpcMtd_Delete(&pView->mSubMtd->mBase, pView);
|
||||
}
|
||||
|
||||
/* 8001F248-8001F284 019B88 003C+00 1/0 0/0 0/0 .text fopVw_Create__FPv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void fopVw_Create(void* param_0) {
|
||||
nofralloc
|
||||
#include "asm/f_op/f_op_view/fopVw_Create__FPv.s"
|
||||
s32 fopVw_Create(void* data) {
|
||||
view_class* pView = (view_class*)data;
|
||||
|
||||
view_process_profile_definition* pProf = (view_process_profile_definition*)fpcM_GetProfile(pView);
|
||||
pView->mSubMtd = pProf->mSubMtd;
|
||||
pView->field_0xc4 = pProf->unk28;
|
||||
|
||||
return fpcMtd_Create(&pView->mSubMtd->mBase, pView);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A3928-803A3940 -00001 0014+04 0/0 2/0 0/0 .data g_fopVw_Method */
|
||||
SECTION_DATA extern void* g_fopVw_Method[5 + 1 /* padding */] = {
|
||||
(void*)fopVw_Create,
|
||||
(void*)fopVw_Delete,
|
||||
(void*)fopVw_Execute,
|
||||
(void*)fopVw_IsDelete,
|
||||
(void*)fopVw_Draw,
|
||||
/* padding */
|
||||
NULL,
|
||||
leafdraw_method_class g_fopVw_Method = {
|
||||
(process_method_func)fopVw_Create,
|
||||
(process_method_func)fopVw_Delete,
|
||||
(process_method_func)fopVw_Execute,
|
||||
(process_method_func)fopVw_IsDelete,
|
||||
(process_method_func)fopVw_Draw,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue