daObjNAN_c equivalent (#2320)

* daObjNAN_c equivalent

* Remove padding
This commit is contained in:
hatal175 2025-03-10 01:05:03 +02:00 committed by GitHub
parent 800049a811
commit 763400c4c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 802 additions and 955 deletions

View File

@ -5,10 +5,10 @@ __register_global_object = .text:0x00000078; // type:function size:0x1C scope:gl
__destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global
__ct__14daObj_NanHIO_cFv = .text:0x000000EC; // type:function size:0x28 scope:global
setAction__10daObjNAN_cFM10daObjNAN_cFPCvPv_v = .text:0x00000114; // type:function size:0xA4 scope:global
useHeapInit__FP10fopAc_ac_c = .text:0x000001B8; // type:function size:0x274 scope:global
useHeapInit__FP10fopAc_ac_c = .text:0x000001B8; // type:function size:0x274 scope:local
__dt__12J3DFrameCtrlFv = .text:0x0000042C; // type:function size:0x48 scope:global
daObjNAN_Create__FP10fopAc_ac_c = .text:0x00000474; // type:function size:0x20 scope:global
daObjNAN_Delete__FP10daObjNAN_c = .text:0x00000494; // type:function size:0x24 scope:global
daObjNAN_Create__FP10fopAc_ac_c = .text:0x00000474; // type:function size:0x20 scope:local
daObjNAN_Delete__FP10daObjNAN_c = .text:0x00000494; // type:function size:0x24 scope:local
nan_posMove__10daObjNAN_cFv = .text:0x000004B8; // type:function size:0xB4 scope:global
turn__10daObjNAN_cFv = .text:0x0000056C; // type:function size:0x328 scope:global
__dt__8cM3dGPlaFv = .text:0x00000894; // type:function size:0x48 scope:global
@ -26,13 +26,13 @@ action__10daObjNAN_cFv = .text:0x0000224C; // type:function size:0x60 scope:glob
execute__10daObjNAN_cFv = .text:0x000022AC; // type:function size:0x198 scope:global
_delete__10daObjNAN_cFv = .text:0x00002444; // type:function size:0x68 scope:global
setBaseMtx__10daObjNAN_cFv = .text:0x000024AC; // type:function size:0x80 scope:global
daObjNAN_Draw__FP10daObjNAN_c = .text:0x0000252C; // type:function size:0x15C scope:global
daObjNAN_Execute__FP10daObjNAN_c = .text:0x00002688; // type:function size:0x20 scope:global
daObjNAN_Draw__FP10daObjNAN_c = .text:0x0000252C; // type:function size:0x15C scope:local
daObjNAN_Execute__FP10daObjNAN_c = .text:0x00002688; // type:function size:0x20 scope:local
create__10daObjNAN_cFv = .text:0x000026A8; // type:function size:0x474 scope:global
__dt__8cM3dGSphFv = .text:0x00002B1C; // type:function size:0x48 scope:global
__dt__8cM3dGAabFv = .text:0x00002B64; // type:function size:0x48 scope:global
__dt__10dCcD_GSttsFv = .text:0x00002BAC; // type:function size:0x5C scope:global
daObjNAN_IsDelete__FP10daObjNAN_c = .text:0x00002C08; // type:function size:0x8 scope:global
daObjNAN_IsDelete__FP10daObjNAN_c = .text:0x00002C08; // type:function size:0x8 scope:local
__dt__14daObj_NanHIO_cFv = .text:0x00002C10; // type:function size:0x48 scope:global
__sinit_d_a_obj_nan_cpp = .text:0x00002C58; // type:function size:0x3C scope:local
Insect_Release__9dInsect_cFv = .text:0x00002C94; // type:function size:0xC scope:global
@ -42,8 +42,8 @@ __destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 sc
_dtors = .dtors:0x00000000; // type:label scope:global
...rodata.0 = .rodata:0x00000000; // type:label scope:local
@3774 = .rodata:0x00000000; // type:object size:0x4 scope:local
l_nan_brk_index = .rodata:0x00000004; // type:object size:0x8 scope:global
l_nan_btk_index = .rodata:0x0000000C; // type:object size:0x8 scope:global
l_nan_brk_index = .rodata:0x00000004; // type:object size:0x8 scope:local
l_nan_btk_index = .rodata:0x0000000C; // type:object size:0x8 scope:local
@3868 = .rodata:0x00000014; // type:object size:0x4 scope:local data:float
@3869 = .rodata:0x00000018; // type:object size:0x4 scope:local
@3870 = .rodata:0x0000001C; // type:object size:0x4 scope:local data:float
@ -78,21 +78,21 @@ l_nan_btk_index = .rodata:0x0000000C; // type:object size:0x8 scope:global
@4491 = .rodata:0x000000A8; // type:object size:0x4 scope:local
@4601 = .rodata:0x000000AC; // type:object size:0x4 scope:local
@4672 = .rodata:0x000000B0; // type:object size:0x4 scope:local
l_nan_itemno = .rodata:0x000000B4; // type:object size:0x2 scope:global
l_nan_itemno = .rodata:0x000000B4; // type:object size:0x2 scope:local
@4742 = .rodata:0x000000B8; // type:object size:0x4 scope:local data:float
@4744 = .rodata:0x000000C0; // type:object size:0x8 scope:local data:double
@4823 = .rodata:0x000000C8; // type:object size:0x4 scope:local
@4824 = .rodata:0x000000CC; // type:object size:0x4 scope:local data:string
@4825 = .rodata:0x000000D0; // type:object size:0x4 scope:local
@4826 = .rodata:0x000000D4; // type:object size:0x4 scope:local
l_musiya_num = .rodata:0x000000D8; // type:object size:0x4 scope:global
l_heapsize = .rodata:0x000000DC; // type:object size:0x4 scope:global
l_musiya_num = .rodata:0x000000D8; // type:object size:0x4 scope:local
l_heapsize = .rodata:0x000000DC; // type:object size:0x4 scope:local
@5034 = .rodata:0x000000E0; // type:object size:0x4 scope:local
@stringBase0 = .rodata:0x000000E4; // type:object size:0xE scope:local data:string_table
...data.0 = .data:0x00000000; // type:label scope:local
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
cc_sph_src__25@unnamed@d_a_obj_nan_cpp@ = .data:0x00000020; // type:object size:0x40 scope:global
cc_sph_src__25@unnamed@d_a_obj_nan_cpp@ = .data:0x00000020; // type:object size:0x40 scope:local
@3924 = .data:0x00000060; // type:object size:0xC scope:local data:4byte
@4034 = .data:0x0000006C; // type:object size:0xC scope:local data:4byte
@4126 = .data:0x00000078; // type:object size:0xC scope:local
@ -109,7 +109,7 @@ cc_sph_src__25@unnamed@d_a_obj_nan_cpp@ = .data:0x00000020; // type:object size:
@4683 = .data:0x000000FC; // type:object size:0xC scope:local data:4byte
@4938 = .data:0x00000108; // type:object size:0xC scope:local
@4941 = .data:0x00000114; // type:object size:0xC scope:local
l_daObjNAN_Method = .data:0x00000120; // type:object size:0x20 scope:global
l_daObjNAN_Method = .data:0x00000120; // type:object size:0x20 scope:local
g_profile_Obj_Nan = .data:0x00000140; // type:object size:0x30 scope:global
__vt__9dInsect_c = .data:0x00000170; // type:object size:0xC scope:global
__vt__10cCcD_GStts = .data:0x0000017C; // type:object size:0xC scope:global
@ -121,6 +121,6 @@ __vt__8cM3dGPla = .data:0x000001B8; // type:object size:0xC scope:global
__vt__12J3DFrameCtrl = .data:0x000001C4; // type:object size:0xC scope:global
__vt__14daObj_NanHIO_c = .data:0x000001D0; // type:object size:0xC scope:global
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
lbl_581_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
l_hio_init = .bss:0x00000008; // type:object size:0x1 scope:local data:byte
@3769 = .bss:0x0000000C; // type:object size:0xC scope:local
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:global data:float
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:local data:float

View File

@ -2013,7 +2013,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_obj_mvstair"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_myogan"),
ActorRel(NonMatching, "d_a_obj_nagaisu"),
ActorRel(NonMatching, "d_a_obj_nan"),
ActorRel(Equivalent, "d_a_obj_nan"),
ActorRel(NonMatching, "d_a_obj_ndoor"),
ActorRel(NonMatching, "d_a_obj_nougu"),
ActorRel(Equivalent, "d_a_obj_octhashi"),

View File

@ -1,7 +1,12 @@
#ifndef D_A_OBJ_NAN_H
#define D_A_OBJ_NAN_H
#include "SSystem/SComponent/c_phase.h"
#include "d/d_insect.h"
#include "d/actor/d_a_player.h"
#include "d/d_cc_d.h"
class daPy_boomerangMove_c;
/**
* @ingroup actors-objects
@ -13,10 +18,12 @@
*/
class daObjNAN_c : public dInsect_c {
public:
/* 80CA05D4 */ void setAction(void (daObjNAN_c::*)());
typedef void (daObjNAN_c::*actionFunc)();
/* 80CA05D4 */ void setAction(actionFunc);
/* 80CA0978 */ void nan_posMove();
/* 80CA0A2C */ void turn();
/* 80CA0D9C */ void nan_WalkAnm();
/* 80CA0D9C */ u8 nan_WalkAnm();
/* 80CA0E7C */ void wait();
/* 80CA1184 */ void walk();
/* 80CA1904 */ void bin_wait();
@ -27,13 +34,39 @@ public:
/* 80CA2368 */ void drop();
/* 80CA2658 */ void hit_check();
/* 80CA270C */ void action();
/* 80CA276C */ void execute();
/* 80CA2904 */ void _delete();
/* 80CA276C */ int execute();
/* 80CA2904 */ int _delete();
/* 80CA296C */ void setBaseMtx();
/* 80CA2B68 */ void create();
/* 80CA2B68 */ int create();
inline int CreateHeap();
inline int draw();
private:
/* 0x590 */ u8 field_0x568[0x800 - 0x590];
/* 0x590 */ request_of_phase_process_class mPhase;
/* 0x598 */ Z2Creature mCreatureSound;
/* 0x628 */ mDoExt_McaMorfSO* mMorf;
/* 0x62C */ mDoExt_brkAnm* mBrk;
/* 0x630 */ mDoExt_btkAnm* mBtk;
/* 0x634 */ dCcD_Stts mStts;
/* 0x670 */ dCcD_Sph mSph;
/* 0x7A8 */ daPy_boomerangMove_c mBoomerangMove;
/* 0x7B4 */ int field_0x7b4;
/* 0x7B8 */ actionFunc mAction;
/* 0x7C4 */ actionFunc mPrevAction;
/* 0x7D0 */ int field_0x7d0;
/* 0x7D4 */ csXyz field_0x7d4;
/* 0x7DA */ csXyz field_0x7da;
/* 0x7E0 */ s16 field_0x7e0;
/* 0x7E2 */ s16 field_0x7e2;
/* 0x7E4 */ s16 field_0x7e4;
/* 0x7E8 */ f32 field_0x7e8;
/* 0x7E6 */ u8 field_0x7e6[0x7f8 - 0x7ec];
/* 0x7F8 */ u16 field_0x7f8;
/* 0x7FA */ u8 field_0x7fa;
/* 0x7FB */ u8 field_0x7fb;
/* 0x7FC */ u8 field_0x7fc;
/* 0x7FC */ u8 field_0x7fd;
};
STATIC_ASSERT(sizeof(daObjNAN_c) == 0x800);
@ -41,7 +74,11 @@ STATIC_ASSERT(sizeof(daObjNAN_c) == 0x800);
class daObj_NanHIO_c {
public:
/* 80CA05AC */ daObj_NanHIO_c();
/* 80CA30D0 */ ~daObj_NanHIO_c();
/* 80CA30D0 */ virtual ~daObj_NanHIO_c() {}
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
};

View File

@ -1,6 +1,7 @@
#ifndef D_CC_D_CC_UTY_H
#define D_CC_D_CC_UTY_H
#include "SSystem/SComponent/c_sxyz.h"
#include "dolphin/types.h"
class cCcD_Obj;
@ -20,9 +21,7 @@ struct dCcU_AtInfo {
/* 0x00 */ cCcD_Obj* mpCollider;
/* 0x04 */ fopAc_ac_c* mpActor;
/* 0x08 */ Z2Creature* mpSound;
/* 0x0C */ u8 field_0xc[2];
/* 0x0E */ s16 mHitDirection;
/* 0x10 */ u8 field_0x10[4];
/* 0x0C */ csXyz mHitDirection;
/* 0x14 */ u32 mHitBit;
/* 0x18 */ u32 field_0x18;
/* 0x1C */ u16 mAttackPower;

View File

@ -25,6 +25,7 @@ public:
bool ChkGetDemo() { return m_mode > 0; }
void setItemNo(u8 i_itemNo) { m_itemNo = i_itemNo; }
void setSaveBitNo(s16 i_saveBitNo) { m_saveBitNo = i_saveBitNo; }
bool CheckZ() { return (u32)field_0x57C > field_0x578; }
public:
/* 0x56C */ u8 field_0x56C;

View File

@ -146,7 +146,7 @@ static void damage_check(e_ba_class* i_this) {
i_this->mIFrames = 10;
}
i_this->mKnockbackSpeed = 80.0f;
i_this->mKnockbackAngle = i_this->mAtInfo.mHitDirection;
i_this->mKnockbackAngle = i_this->mAtInfo.mHitDirection.y;
if (i_this->health <= 0) {
i_this->mCreatureSound.startCreatureVoice(Z2SE_EN_BA_V_DEATH, -1);
i_this->mpMorf->setPlaySpeed(0.2f);

View File

@ -438,7 +438,7 @@ static void damage_check(e_fs_class* i_this) {
} else {
i_this->mIFrameTimer = 10;
}
i_this->current.angle.y = i_this->mAtInfo.mHitDirection;
i_this->current.angle.y = i_this->mAtInfo.mHitDirection.y;
if (i_this->health <= 0) {
i_this->mAction = e_fs_class::ACT_END;

View File

@ -253,7 +253,7 @@ void daE_FZ_c::damage_check() {
dComIfGp_setHitMark(3,this,&pos3,&s_pos,0,AT_TYPE_0);
}
mLastWallHitAngle = mAtInfo.mHitDirection;
mLastWallHitAngle = mAtInfo.mHitDirection.y;
setReflectAngle();
current.angle.y += -32768;
field_0x712 = 10;

View File

@ -740,7 +740,7 @@ void daE_OctBg_c::damage() {
field_0x8c0.OffTgSetBit();
field_0x9f8.OffAtSetBit();
attention_info.flags = 0;
current.angle.y = field_0xb30.mHitDirection + 0x8000;
current.angle.y = field_0xb30.mHitDirection.y + 0x8000;
speedF = 10.0f;
field_0xb96 = 0x1000;
speed.y = 0.0f;

View File

@ -550,7 +550,7 @@ void daE_OT_c::executeDamage() {
mMode = 1;
mAnmSpeed = 1.0f;
gravity = -5.0f;
current.angle.y = mAtInfo.mHitDirection + 0x8000 + cM_rndFX(0x2000);
current.angle.y = mAtInfo.mHitDirection.y + 0x8000 + cM_rndFX(0x2000);
break;
case 1:

View File

@ -175,7 +175,7 @@ static void damage_check(e_yk_class* i_this) {
}
i_this->field_0x694 = cM_rndF(10.0f) + 70.0f;
i_this->field_0x698 = i_this->mAtColliderInfo.mHitDirection;
i_this->field_0x698 = i_this->mAtColliderInfo.mHitDirection.y;
// If keese is dead, play death sound
if (i_this->health <= 0) {

View File

@ -964,7 +964,7 @@ void daE_YM_c::executeDown() {
field_0x668.set(0, 0, 0);
speedF = cM_rndF(5.0f) + 15.0f;
speed.y = cM_rndF(5.0f) + 40.0f;
shape_angle.y = mAtInfo.mHitDirection + 0x8000;
shape_angle.y = mAtInfo.mHitDirection.y + 0x8000;
shape_angle.x = 0;
mAcch.ClrGroundHit();
mAcchCir.SetWall(40.0f, 60.0f);

File diff suppressed because it is too large Load Diff

View File

@ -390,23 +390,23 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* i_enemy, dCcU_AtInfo* i_AtInfo) {
if (tmp.abs() > 100.0f) {
f32 x = i_AtInfo->mpActor->speed.x;
f32 z = i_AtInfo->mpActor->speed.z;
i_AtInfo->mHitDirection = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
i_AtInfo->mHitDirection.y = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
} else {
if (fopAcM_GetName(i_AtInfo->mpActor) == PROC_BOOMERANG) {
x_diff = i_enemy->current.pos.x - player_p->current.pos.x;
z_diff = i_enemy->current.pos.z - player_p->current.pos.z;
i_AtInfo->mHitDirection = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
i_AtInfo->mHitDirection.y = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
} else {
x_diff = i_enemy->current.pos.x - i_AtInfo->mpActor->current.pos.x;
z_diff = i_enemy->current.pos.z - i_AtInfo->mpActor->current.pos.z;
i_AtInfo->mHitDirection = cM_atan2s(-x_diff, -z_diff);
i_AtInfo->mHitDirection.y = cM_atan2s(-x_diff, -z_diff);
}
}
if (i_AtInfo->mHitType == HIT_TYPE_LINK_NORMAL_ATTACK &&
player_p->getCutType() == daPy_py_c::CUT_TYPE_HEAD_JUMP)
{
i_AtInfo->mHitDirection = player_p->shape_angle.y;
i_AtInfo->mHitDirection.y = player_p->shape_angle.y;
}
if (i_AtInfo->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) &&