diff options
| author | Pheenoh <pheenoh@gmail.com> | 2023-02-14 23:37:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-14 23:37:09 -0700 |
| commit | 82ff815386f2ab07481d11ecfe3730849eb4e2ec (patch) | |
| tree | f3c8981348f24684124d27e614b3d2c86a9f8bf5 /rel | |
| parent | 88cbbead876100fe4ea0e67e6f83487346534406 (diff) | |
d_a_tag_gra OK, d_a_suspend work (#286)
Diffstat (limited to 'rel')
| -rw-r--r-- | rel/d/a/d_a_suspend/d_a_suspend.cpp | 66 | ||||
| -rw-r--r-- | rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp | 106 |
2 files changed, 70 insertions, 102 deletions
diff --git a/rel/d/a/d_a_suspend/d_a_suspend.cpp b/rel/d/a/d_a_suspend/d_a_suspend.cpp index 009dd8f4cc..94ad1028e5 100644 --- a/rel/d/a/d_a_suspend/d_a_suspend.cpp +++ b/rel/d/a/d_a_suspend/d_a_suspend.cpp @@ -8,21 +8,6 @@ #include "dolphin/types.h" // -// Types: -// - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); -}; - -struct cXyz {}; - -struct daSus_c { - /* 80031248 */ void newData(s8, cXyz const&, cXyz const&, u8, u8, u8); - /* 804D5118 */ void create(); -}; - -// // Forward References: // @@ -36,12 +21,6 @@ extern "C" extern void* g_profile_SUSPEND[12]; extern "C" void __ct__10fopAc_ac_cFv(); extern "C" void newData__7daSus_cFScRC4cXyzRC4cXyzUcUcUc(); -extern "C" extern void* g_fopAc_Method[8]; -extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; - -// -// Declarations: -// /* ############################################################################################## */ /* 804D523C-804D5240 000000 0004+00 1/1 0/0 0/0 .rodata @3640 */ @@ -70,25 +49,52 @@ COMPILER_STRIP_GATE(0x804D5248, &lit_3643); #pragma pop /* 804D5118-804D51E0 000078 00C8+00 1/1 0/0 0/0 .text create__7daSus_cFv */ +#ifdef NONMATCHING +// missing mr instruction +int daSus_c::create() { + daSus_c* suspend = static_cast<daSus_c*>(this); + s8 roomNo = fopAcM_GetRoomNo(suspend); + + if (roomNo < 0) { + roomNo = suspend->getRoom(); + } + + u8 sw = suspend->getSw(); + u8 arg0 = suspend->getArg0(); + u8 arg1 = suspend->getArg1(); + + if (suspend->getScale() != 0) { + mScale.x *= 1250.0f; + mScale.y *= 2500.0f; + mScale.z *= 1250.0f; + } else { + mScale.x *= 125.0f; + mScale.y *= 250.0f; + mScale.z *= 125.0f; + } + + newData(roomNo,current.pos,mScale,sw,arg0,arg1); + return cPhs_COMPLEATE_e; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daSus_c::create() { +asm int daSus_c::create() { nofralloc #include "asm/rel/d/a/d_a_suspend/d_a_suspend/create__7daSus_cFv.s" } #pragma pop +#endif /* 804D51E0-804D5234 000140 0054+00 1/0 0/0 0/0 .text daSus_create__FP7daSus_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daSus_create(daSus_c* param_0) { - nofralloc -#include "asm/rel/d/a/d_a_suspend/d_a_suspend/daSus_create__FP7daSus_c.s" +static int daSus_create(daSus_c* i_this) { + if (!fopAcM_CheckCondition(i_this, 8)) { + new (i_this) daSus_c(); + fopAcM_OnCondition(i_this, 8); + } + return i_this->create(); } -#pragma pop - /* ############################################################################################## */ /* 804D524C-804D526C -00001 0020+00 1/0 0/0 0/0 .data daSus_METHODS */ SECTION_DATA static void* daSus_METHODS[8] = { diff --git a/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp b/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp index e14840fe59..0034779be2 100644 --- a/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp +++ b/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp @@ -1,89 +1,51 @@ -// -// Generated By: dol2asm -// Translation Unit: d_a_tag_gra -// +/** + * d_a_tag_gra.cpp + * + */ #include "rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.h" #include "dol2asm.h" #include "dolphin/types.h" - -// -// Types: -// - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); - /* 80018C8C */ ~fopAc_ac_c(); -}; - -struct daTagGra_c {}; - -struct dSv_info_c { - /* 80035360 */ void isSwitch(int, int) const; -}; - -// -// Forward References: -// - -extern "C" static void daTagGra_Create__FP10fopAc_ac_c(); -extern "C" static void daTagGra_Delete__FP10daTagGra_c(); -extern "C" extern void* g_profile_TAG_GRA[12]; - -// -// External References: -// - -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" extern void* g_fopAc_Method[8]; -extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; - -// -// Declarations: -// +#include "d/d_procname.h" /* 80D59658-80D596E8 000078 0090+00 1/0 0/0 0/0 .text daTagGra_Create__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagGra_Create(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra/daTagGra_Create__FP10fopAc_ac_c.s" +static int daTagGra_Create(fopAc_ac_c* i_this) { + daTagGra_c* gra_tag = (daTagGra_c*)i_this; + return gra_tag->create(); } -#pragma pop /* 80D596E8-80D59718 000108 0030+00 1/0 0/0 0/0 .text daTagGra_Delete__FP10daTagGra_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagGra_Delete(daTagGra_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra/daTagGra_Delete__FP10daTagGra_c.s" +static int daTagGra_Delete(daTagGra_c* i_this) { + i_this->~daTagGra_c(); + return 1; } -#pragma pop /* ############################################################################################## */ /* 80D59720-80D59740 -00001 0020+00 1/0 0/0 0/0 .data l_daTagGra_Method */ -SECTION_DATA static void* l_daTagGra_Method[8] = { - (void*)daTagGra_Create__FP10fopAc_ac_c, - (void*)daTagGra_Delete__FP10daTagGra_c, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class l_daTagGra_Method = { + (process_method_func)daTagGra_Create, + (process_method_func)daTagGra_Delete }; /* 80D59740-80D59770 -00001 0030+00 0/0 0/0 1/0 .data g_profile_TAG_GRA */ -SECTION_DATA extern void* g_profile_TAG_GRA[12] = { - (void*)0xFFFFFFFD, (void*)0x0003FFFD, - (void*)0x00220000, (void*)&g_fpcLf_Method, - (void*)0x00000568, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x00140000, (void*)&l_daTagGra_Method, - (void*)0x00040000, (void*)0x000E0000, +extern actor_process_profile_definition g_profile_TAG_GRA = { + -3, // mLayerID + 3, // mListID + -3, // mListPrio + PROC_TAG_GRA, // mProcName + 0, // padding + &g_fpcLf_Method.mBase, // mSubMtd + sizeof(daTagGra_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // mSubMtd + 0x0014, // mPriority + 0, // padding + 0, // padding + &l_daTagGra_Method, // mSubMtd + 0x00040000, // mStatus + 0, // mActorType + 0x0E, // mCullType + 0, // padding + 0 // padding }; |
