diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 414443df1..9b7ec3bc4 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -259,7 +259,7 @@ struct TVec3 { } void setLength(f32 len) { - f32 sq = squared(); + f32 sq = squared(); if (sq <= FLT_EPSILON * 32.0f) { return; } diff --git a/include/SSystem/SComponent/c_bg_s_gnd_chk.h b/include/SSystem/SComponent/c_bg_s_gnd_chk.h index 73ba74483..7a6dca240 100644 --- a/include/SSystem/SComponent/c_bg_s_gnd_chk.h +++ b/include/SSystem/SComponent/c_bg_s_gnd_chk.h @@ -8,10 +8,10 @@ class cBgS_GndChk : public cBgS_Chk, public cBgS_PolyInfo { public: cBgS_GndChk(); - void SetPos(cXyz const* pos) { + void SetPos(cXyz* pos) { m_pos = *pos; } - void SetPos(Vec const*); + void SetPos(Vec*); void PreCheck(); virtual ~cBgS_GndChk() {} @@ -19,7 +19,6 @@ public: f32 GetNowY() const { return mNowY; } void SetNowY(f32 y) { mNowY = y; } cXyz* GetPointP() { return &m_pos; } - void SetPos(cXyz* pos) { m_pos.set(*pos); } u32 GetWallPrecheck() const { return mWallPrecheck; } void OffWall() { mFlags &= ~2; } diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index 37ea1051e..165dc9b77 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -30,12 +30,18 @@ enum cCcD_ObjAtType { /* 0x00000100 */ AT_TYPE_WATER = (1 << 8), /* 0x00000200 */ AT_TYPE_FIRE = (1 << 9), /* 0x00000400 */ AT_TYPE_MACHETE = (1 << 10), + /* 0x00000800 */ AT_TYPE_UNK800 = (1 << 11), + /* 0x00001000 */ AT_TYPE_UNK1000 = (1 << 12), + /* 0x00002000 */ AT_TYPE_UNK2000 = (1 << 13), /* 0x00004000 */ AT_TYPE_NORMAL_ARROW = (1 << 14), /* 0x00010000 */ AT_TYPE_SKULL_HAMMER = (1 << 16), + /* 0x00020000 */ AT_TYPE_UNK20000 = (1 << 17), /* 0x00040000 */ AT_TYPE_FIRE_ARROW = (1 << 18), /* 0x00080000 */ AT_TYPE_ICE_ARROW = (1 << 19), /* 0x00100000 */ AT_TYPE_LIGHT_ARROW = (1 << 20), /* 0x00200000 */ AT_TYPE_LEAF_WIND = (1 << 21), + /* 0x00400000 */ AT_TYPE_UNK400000 = (1 << 22), + /* 0x00800000 */ AT_TYPE_UNK800000 = (1 << 23), /* 0x01000000 */ AT_TYPE_STALFOS_MACE = (1 << 24), /* 0x04000000 */ AT_TYPE_DARKNUT_SWORD = (1 << 26), /* 0x08000000 */ AT_TYPE_GRAPPLING_HOOK = (1 << 27), diff --git a/include/d/d_bg_s_roof_chk.h b/include/d/d_bg_s_roof_chk.h index 7007f409a..53d8a9702 100644 --- a/include/d/d_bg_s_roof_chk.h +++ b/include/d/d_bg_s_roof_chk.h @@ -20,7 +20,7 @@ public: virtual ~dBgS_RoofChk() {} - void SetPos(cXyz const& pos) { m_pos = pos; } + void SetPos(cXyz& pos) { m_pos = pos; } cXyz* GetPosP() { return &m_pos; } private: diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 2dcd4e315..f380a98e0 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -46,6 +46,22 @@ enum fopAc_Group_e { fopAc_NPC_e, }; +enum fopAc_AttentionFlag_e { + fopAc_Attn_LOCKON_MISC_e = 0x00000001, + fopAc_Attn_LOCKON_TALK_e = 0x00000002, + fopAc_Attn_LOCKON_ENEMY_e = 0x00000004, + fopAc_Attn_ACTION_TALK_e = 0x00000008, + fopAc_Attn_ACTION_CARRY_e = 0x00000010, + fopAc_Attn_ACTION_DOOR_e = 0x00000020, + fopAc_Attn_ACTION_TREASURE_e = 0x00000040, + fopAc_Attn_ACTION_SHIP_e = 0x00000080, + fopAc_Attn_TALKFLAG_NOTALK_e = 0x2000000, + fopAc_Attn_ENEMYFLAG_NOLOCKON_e = 0x4000000, + fopAc_Attn_TALKFLAG_LOOK_e = 0x8000000, + fopAc_Attn_TALKFLAG_CHECK_e = 0x20000000, + fopAc_Attn_TALKFLAG_READ_e = 0x40000000, +}; + enum fopAc_Cull_e { fopAc_CULLBOX_0_e, fopAc_CULLBOX_1_e, @@ -131,7 +147,7 @@ public: bool checkCommandTalk() { return mCommand == dEvtCmd_INTALK_e; } bool checkCommandItem() { return mCommand == dEvtCmd_INGETITEM_e; } - BOOL checkCommandDoor() { return mCommand == dEvtCmd_INDOOR_e; } + bool checkCommandDoor() { return mCommand == dEvtCmd_INDOOR_e; } bool checkCommandDemoAccrpt() { return mCommand == dEvtCmd_INDEMO_e; } bool checkCommandCatch() { return mCommand == dEvtCmd_INCATCH_e; } diff --git a/src/c/c_damagereaction.cpp b/src/c/c_damagereaction.cpp index 50215f694..bed1f696d 100644 --- a/src/c/c_damagereaction.cpp +++ b/src/c/c_damagereaction.cpp @@ -126,7 +126,7 @@ BOOL enemy_ice(enemyice* ei) { ac->mTevStr.mFogStartZ = 0.0f; ac->mTevStr.mFogEndZ = 2000.0f; fopAcM_seStart(ac, JA_SE_CM_L_ARROW_SHRINK, 0); - ac->mAttentionInfo.mFlags &= ~4; + ac->mAttentionInfo.mFlags &= ~fopAc_Attn_LOCKON_ENEMY_e; } else { ei->mLightShrinkTimer++; @@ -226,10 +226,10 @@ BOOL enemy_ice(enemyice* ei) { frozen = TRUE; moveAndCollide = TRUE; if (ei->m00C != 1) { - ac->mAttentionInfo.mFlags |= 0x10; + ac->mAttentionInfo.mFlags |= fopAc_Attn_ACTION_CARRY_e; ac->mAttentionInfo.mDistances[4] = 0x12; if (fopAcM_checkStatus(ac, fopAcStts_CARRY_e)) { - ac->mAttentionInfo.mFlags &= ~0x10; + ac->mAttentionInfo.mFlags &= ~fopAc_Attn_ACTION_CARRY_e; ei->mState = 3; if (ei->m00C == 2) { ei->m00C = 0; diff --git a/src/d/actor/d_a_agbsw0.cpp b/src/d/actor/d_a_agbsw0.cpp index 04d2cee92..3ad3ed0fb 100644 --- a/src/d/actor/d_a_agbsw0.cpp +++ b/src/d/actor/d_a_agbsw0.cpp @@ -56,31 +56,33 @@ struct agb_mail_struct { }; static dCcD_SrcCyl l_cyl_src = { - 0, - 0, - 0, - 0, - 0x00000020, // Tg damage types - 9, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 4, - 0, - - // Cylinder - 0.0, // X - 0.0, // Y - 0.0, // Z - 100.0, // Radius - 100.0, // Height + // dCcD_SrcGObjInf + { + /* Flags */ 0, + /* SrcObjAt Type */ 0, + /* SrcObjAt Atp */ 0, + /* SrcObjAt SPrm */ 0, + /* SrcObjTg Type */ AT_TYPE_BOMB, + /* SrcObjTg SPrm */ 0x09, + /* SrcObjCo SPrm */ 0, + /* SrcGObjAt Se */ 0, + /* SrcGObjAt HitMark */ 0, + /* SrcGObjAt Spl */ 0, + /* SrcGObjAt Mtrl */ 0, + /* SrcGObjAt GFlag */ 0, + /* SrcGObjTg Se */ 0, + /* SrcGObjTg HitMark */ 0, + /* SrcGObjTg Spl */ 0, + /* SrcGObjTg Mtrl */ 0, + /* SrcGObjTg GFlag */ 0x04, + /* SrcGObjCo GFlag */ 0, + }, + // cM3dGCylS + { + /* Center */ 0.0f, 0.0f, 0.0f, + /* Radius */ 100.0f, + /* Height */ 100.0f, + }, }; class daAgbsw0_c : public fopAc_ac_c { @@ -1039,7 +1041,7 @@ BOOL daAgbsw0_c::ExeSubMW() { mAttentionInfo.mPosition = current.pos; if(mEvtInfo.checkCommandDemoAccrpt()) { if(!se_flag) { - fopAcM_seStart(this, 0x484C, 0); + fopAcM_seStart(this, JA_SE_CV_CHI_MEGAHORN, 0); se_flag = 1; } @@ -1197,7 +1199,7 @@ BOOL daAgbsw0_c::ExeSubR() { } fopAcM_fastCreateItem(¤t.pos, itemID, fopAcM_GetHomeRoomNo(this), 0, 0, 0.0f, cM_rndF(10.0f) + 40.0f, -7.0f, -1, 0); - fopAcM_seStart(this, 0x484C, 0); + fopAcM_seStart(this, JA_SE_CV_CHI_MEGAHORN, 0); MailSend(-1, 0, 0xFF, 0xFF, 0); field_0x298 = 0; diff --git a/src/d/actor/d_a_am.cpp b/src/d/actor/d_a_am.cpp index e7e085a06..88619fdcc 100644 --- a/src/d/actor/d_a_am.cpp +++ b/src/d/actor/d_a_am.cpp @@ -239,14 +239,14 @@ static void body_atari_check(am_class* i_this) { switch (hitObj->GetAtType()) { case AT_TYPE_SWORD: case AT_TYPE_MACHETE: - case 0x00000800: + case AT_TYPE_UNK800: case AT_TYPE_DARKNUT_SWORD: case AT_TYPE_MOBLIN_SPEAR: fopAcM_seStart(i_this, JA_SE_LK_SW_HIT_S, 0x42); break; case AT_TYPE_BOOMERANG: case AT_TYPE_BOKO_STICK: - case 0x00002000: + case AT_TYPE_UNK2000: case AT_TYPE_STALFOS_MACE: fopAcM_seStart(i_this, JA_SE_LK_W_WEP_HIT, 0x42); break; @@ -322,14 +322,14 @@ static BOOL medama_atari_check(am_class* i_this) { break; case AT_TYPE_SWORD: case AT_TYPE_MACHETE: - case 0x00000800: + case AT_TYPE_UNK800: case AT_TYPE_DARKNUT_SWORD: case AT_TYPE_MOBLIN_SPEAR: fopAcM_seStart(i_this, JA_SE_LK_SW_HIT_S, 0x42); break; case AT_TYPE_BOOMERANG: case AT_TYPE_BOKO_STICK: - case 0x00002000: + case AT_TYPE_UNK2000: case AT_TYPE_STALFOS_MACE: fopAcM_seStart(i_this, JA_SE_LK_W_WEP_HIT, 0x42); break; @@ -349,7 +349,7 @@ static BOOL medama_atari_check(am_class* i_this) { ret = true; if (i_this->mCurrBckIdx == AM_BCK_SLEEP || i_this->mCurrBckIdx == AM_BCK_SLEEP_LOOP) { anm_init(i_this, AM_BCK_OKIRU, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); - i_this->mAttentionInfo.mFlags = 0x4; + i_this->mAttentionInfo.mFlags = fopAc_Attn_LOCKON_ENEMY_e; i_this->mNeedleCyl.OnAtSPrmBit(1); i_this->mNeedleCyl.OnAtHitBit(); i_this->mAction = ACTION_DOUSA; @@ -575,7 +575,7 @@ static void action_dousa(am_class* i_this) { if (Line_check(i_this, player->current.pos)) { anm_init(i_this, AM_BCK_OKIRU, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); fopAcM_monsSeStart(i_this, JA_SE_CV_AM_AWAKE, 0); - i_this->mAttentionInfo.mFlags = 0x4; + i_this->mAttentionInfo.mFlags = fopAc_Attn_LOCKON_ENEMY_e; i_this->mNeedleCyl.OnAtSetBit(); i_this->mNeedleCyl.OnAtHitBit(); i_this->mState += 1; @@ -1302,7 +1302,7 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) { // dCcD_SrcGObjInf { /* Flags */ 0, - /* SrcObjAt Type */ 0x1000, + /* SrcObjAt Type */ AT_TYPE_UNK1000, /* SrcObjAt Atp */ 0, /* SrcObjAt SPrm */ 0, /* SrcObjTg Type */ AT_TYPE_NORMAL_ARROW | AT_TYPE_FIRE_ARROW | AT_TYPE_ICE_ARROW | AT_TYPE_LIGHT_ARROW | AT_TYPE_GRAPPLING_HOOK, @@ -1333,7 +1333,7 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) { // dCcD_SrcGObjInf { /* Flags */ 0, - /* SrcObjAt Type */ 0x1000, + /* SrcObjAt Type */ AT_TYPE_UNK1000, /* SrcObjAt Atp */ 0, /* SrcObjAt SPrm */ 0, /* SrcObjTg Type */ 0, @@ -1364,10 +1364,10 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) { // dCcD_SrcGObjInf { /* Flags */ 0, - /* SrcObjAt Type */ 0x1000, + /* SrcObjAt Type */ AT_TYPE_UNK1000, /* SrcObjAt Atp */ 0, /* SrcObjAt SPrm */ 0, - /* SrcObjTg Type */ ~(0x100 | 0x20000 | AT_TYPE_LEAF_WIND | 0x400000 | 0x800000), + /* SrcObjTg Type */ ~(AT_TYPE_WATER | AT_TYPE_UNK20000 | AT_TYPE_LEAF_WIND | AT_TYPE_UNK400000 | AT_TYPE_UNK800000), /* SrcObjTg SPrm */ 0x03, /* SrcObjCo SPrm */ 0x75, /* SrcGObjAt Se */ 0, @@ -1396,7 +1396,7 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) { // dCcD_SrcGObjInf { /* Flags */ 0, - /* SrcObjAt Type */ 0x1000, + /* SrcObjAt Type */ AT_TYPE_UNK1000, /* SrcObjAt Atp */ 2, /* SrcObjAt SPrm */ 0x0F, /* SrcObjTg Type */ 0, diff --git a/src/d/actor/d_a_bomb.cpp b/src/d/actor/d_a_bomb.cpp index 227e5d79c..3e1993a41 100644 --- a/src/d/actor/d_a_bomb.cpp +++ b/src/d/actor/d_a_bomb.cpp @@ -216,10 +216,10 @@ bool daBomb_c::checkExplodeCc_norm() { if(mSph.ChkTgHit()) { cCcD_Obj* obj = mSph.GetTgHitObj(); if(obj) { - if(obj->ChkAtType(0x20)) { // bomb damage + if(obj->ChkAtType(AT_TYPE_BOMB)) { explode = true; } - else if(!obj->ChkAtType(0x200000)) { // not leaf wind "damage" + else if(!obj->ChkAtType(AT_TYPE_LEAF_WIND)) { explode = true; } } @@ -244,10 +244,10 @@ bool daBomb_c::checkExplodeCc_nut() { if(mSph.ChkTgHit()) { cCcD_Obj* obj = mSph.GetTgHitObj(); if(obj) { - if(obj->ChkAtType(0x20)) { // bomb damage + if(obj->ChkAtType(AT_TYPE_BOMB)) { explode = true; } - else if(!obj->ChkAtType(0x200000)) { // not leaf wind "damage" + else if(!obj->ChkAtType(AT_TYPE_LEAF_WIND)) { hit = true; } } @@ -286,7 +286,7 @@ bool daBomb_c::checkExplodeCc_cannon() { if(mSph.ChkTgHit()) { cCcD_Obj* obj = mSph.GetTgHitObj(); if(obj) { - if(!obj->ChkAtType(0x200000)) { // not leaf wind "damage" + if(!obj->ChkAtType(AT_TYPE_LEAF_WIND)) { explode = true; } } @@ -614,7 +614,7 @@ void daBomb_c::makeFireEffect(cXyz& pos, csXyz& rotation) { void daBomb_c::makeWaterEffect() { if(field_0x77D == 0) { - fopAcM_seStart(this, 0x6982, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_WATER, 0); fopKyM_createWpillar(¤t.pos, 1.0f, 1.0f, 1); mSph.GetObjTg().OffSPrmBit(cCcD_ObjCommonBase::CO_SPRM_SET); mSph.GetObjCo().OffSPrmBit(cCcD_ObjCommonBase::CO_SPRM_SET); @@ -765,7 +765,7 @@ int daBomb_c::procExplode_init() { change_state(STATE_0); } - mAttentionInfo.mFlags &= ~0x10; + mAttentionInfo.mFlags &= ~fopAc_Attn_ACTION_CARRY_e; if(field_0x6F0) { if(daPy_getPlayerLinkActorClass()->mActivePlayerBombs != 0) { @@ -790,10 +790,10 @@ int daBomb_c::procExplode_init() { } if(temp) { - fopAcM_seStart(this, 0x6982, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_WATER, 0); } else { - fopAcM_seStart(this, 0x6901, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_EXPLODE, 0); } fopAcM_cancelCarryNow(this); @@ -872,7 +872,7 @@ bool daBomb_c::procCarry_init() { change_state(STATE_2); speedF = 0.0f; speed.set(cXyz::Zero); - mAttentionInfo.mFlags &= ~0x10; + mAttentionInfo.mFlags &= ~fopAc_Attn_ACTION_CARRY_e; mSph.GetObjCo().OffSPrmBit(cCcD_ObjCommonBase::CO_SPRM_SET); return true; @@ -943,10 +943,10 @@ bool daBomb_c::procWait() { if(!temp && !field_0x781) { bound(y_vel); if((mAcch.ChkGroundHit() || chk_state(STATE_5)) && !mAcch.ChkGroundLanding()) { - mAttentionInfo.setFlag(0x10); + mAttentionInfo.setFlag(fopAc_Attn_ACTION_CARRY_e); } else { - mAttentionInfo.mFlags &= ~0x10; + mAttentionInfo.mFlags &= ~fopAc_Attn_ACTION_CARRY_e; } } @@ -1030,7 +1030,7 @@ BOOL daBomb_c::execute() { } if(chk_attrState(this, ATTR_STATE_10) || field_0x6F4 == 1) { - fopAcM_seStart(this, 0x6100, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_IGNITION, 0); } } @@ -1082,7 +1082,7 @@ void daBomb_c::init_mtx() { } void daBomb_c::se_cannon_fly_set() { - mDoAud_seStart(0x381F, ¤t.pos, 0, 0); + mDoAud_seStart(JA_SE_LK_SHIP_CANNON_FLY, ¤t.pos, 0, 0); field_0x77F = 1; } @@ -1103,7 +1103,7 @@ void daBomb_c::eff_water_splash() { //what u32 soundId = 0x13; - fopAcM_seStart(this, 0x6918, soundId); + fopAcM_seStart(this, JA_SE_OBJ_FALL_WATER_S, soundId); } bool daBomb_IsDelete(daBomb_c*) { @@ -1223,7 +1223,7 @@ void daBomb_c::create_init() { mRestTime = 0x96; mInitialState = prm_get_state(); if(!chk_state(STATE_4)) { - mAttentionInfo.setFlag(0x10); + mAttentionInfo.setFlag(fopAc_Attn_ACTION_CARRY_e); } field_0x77C = 0; @@ -1320,7 +1320,7 @@ actor_process_profile_definition g_profile_BOMB = { &g_fopAc_Method.base, 0x0115, &l_daBomb_Method, - 0x00040100, + fopAcStts_CULL_e | fopAcStts_UNK40000_e, fopAc_ACTOR_e, fopAc_CULLBOX_CUSTOM_e, }; diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp index d38533968..3c4c8af39 100644 --- a/src/d/actor/d_a_bomb2.cpp +++ b/src/d/actor/d_a_bomb2.cpp @@ -551,15 +551,15 @@ namespace daBomb2 { } void Act_c::se_explode() { - fopAcM_seStart(this, 0x6901, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_EXPLODE, 0); } void Act_c::se_explode_water() { - fopAcM_seStart(this, 0x6982, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_WATER, 0); } void Act_c::se_ignition() { - fopAcM_seStart(this, 0x6100, 0); + fopAcM_seStart(this, JA_SE_OBJ_BOMB_IGNITION, 0); } void Act_c::set_sound_env(int param_1, int param_2) { @@ -567,16 +567,16 @@ namespace daBomb2 { } bool Act_c::chk_exp_cc_nut() { - bool explode = false; bool fuse = false; + bool explode = false; if(mSph.ChkTgHit()) { cCcD_Obj* obj = mSph.GetTgHitObj(); if(obj) { - if(obj->ChkAtType(0x20)) { // bomb damage + if(obj->ChkAtType(AT_TYPE_BOMB)) { fuse = true; } - else if(!obj->ChkAtType(0x200000)) { // not leaf wind "damage" + else if(!obj->ChkAtType(AT_TYPE_LEAF_WIND)) { explode = true; } } @@ -601,7 +601,7 @@ namespace daBomb2 { eff_explode(); } - return explode; + return fuse; } bool Act_c::chk_exp_cc() { @@ -703,11 +703,11 @@ namespace daBomb2 { } void Act_c::on_carry() { - mAttentionInfo.setFlag(0x10); + mAttentionInfo.setFlag(fopAc_Attn_ACTION_CARRY_e); } void Act_c::off_carry() { - mAttentionInfo.mFlags &= ~0x10; + mAttentionInfo.mFlags &= ~fopAc_Attn_ACTION_CARRY_e; } void Act_c::mode_wait_init() { @@ -1086,7 +1086,7 @@ actor_process_profile_definition g_profile_Bomb2 = { &g_fopAc_Method.base, 0x0115, &daBomb2::Mthd_Table, - 0x00040100, + fopAcStts_CULL_e | fopAcStts_UNK40000_e, fopAc_ACTOR_e, fopAc_CULLBOX_CUSTOM_e, }; diff --git a/src/d/actor/d_a_disappear.cpp b/src/d/actor/d_a_disappear.cpp index f67708150..b016c4db6 100644 --- a/src/d/actor/d_a_disappear.cpp +++ b/src/d/actor/d_a_disappear.cpp @@ -72,7 +72,7 @@ s32 daDisappear_Delete(disappear_class*) { /* 800E7AD0-800E7DBC .text set_disappear__FP15disappear_classf */ void set_disappear(disappear_class* i_this, float scale) { s8 rev = dComIfGp_getReverb(i_this->getRoomNo()); - mDoAud_seStart(0x5801, &i_this->mEyePos, 0, rev); + mDoAud_seStart(JA_SE_CM_MONS_EXPLODE, &i_this->mEyePos, 0, rev); cXyz particleScale(scale, scale, scale); i_this->mTimer = g_regHIO.mChild[8].mShortRegs[0] + 0x3A; diff --git a/src/d/actor/d_a_item.cpp b/src/d/actor/d_a_item.cpp index 37fc302a2..e251ff0d0 100644 --- a/src/d/actor/d_a_item.cpp +++ b/src/d/actor/d_a_item.cpp @@ -1040,7 +1040,7 @@ dCcD_SrcCyl daItem_c::m_cyl_src = { /* SrcObjAt Type */ 0, /* SrcObjAt Atp */ 0, /* SrcObjAt SPrm */ 0, - /* SrcObjTg Type */ 0xFFFFFFFF, + /* SrcObjTg Type */ AT_TYPE_ALL, /* SrcObjTg SPrm */ 0x09, /* SrcObjCo SPrm */ 0x59, /* SrcGObjAt Se */ 0, diff --git a/src/d/actor/d_a_kytag05.cpp b/src/d/actor/d_a_kytag05.cpp index 5765d20bd..a951e5bb2 100644 --- a/src/d/actor/d_a_kytag05.cpp +++ b/src/d/actor/d_a_kytag05.cpp @@ -111,7 +111,7 @@ static BOOL daKytag05_Execute(kytag05_class* a_this) { dKyw_evt_wind_set(0, -0x32C8); } - mDoAud_seStart(0x106A, 0, windPow * 100.0f, 0); + mDoAud_seStart(JA_SE_ATM_WIND_VAR, 0, windPow * 100.0f, 0); return TRUE; } diff --git a/src/d/actor/d_a_nh.cpp b/src/d/actor/d_a_nh.cpp index 1250ee942..a6edef3a9 100644 --- a/src/d/actor/d_a_nh.cpp +++ b/src/d/actor/d_a_nh.cpp @@ -58,7 +58,7 @@ static dCcD_SrcCyl l_cyl_src = { /* SrcObjAt Type */ 0, /* SrcObjAt Atp */ 0, /* SrcObjAt SPrm */ 0, - /* SrcObjTg Type */ 0xFFFFFFFF, + /* SrcObjTg Type */ AT_TYPE_ALL, /* SrcObjTg SPrm */ 0x03, /* SrcObjCo SPrm */ 0x19, /* SrcGObjAt Se */ 0, diff --git a/src/d/actor/d_a_obj_barrier.cpp b/src/d/actor/d_a_obj_barrier.cpp index 0f85bb637..fda774cc2 100644 --- a/src/d/actor/d_a_obj_barrier.cpp +++ b/src/d/actor/d_a_obj_barrier.cpp @@ -106,7 +106,7 @@ static const dCcD_SrcCyl l_cyl_at_src = { // dCcD_SrcGObjInf { /* Flags */ 0, - /* SrcObjAt Type */ 0x800, + /* SrcObjAt Type */ AT_TYPE_UNK800, /* SrcObjAt Atp */ 1, /* SrcObjAt SPrm */ 5, /* SrcObjTg Type */ 0, @@ -126,9 +126,7 @@ static const dCcD_SrcCyl l_cyl_at_src = { }, // cM3dGCylS { - /* Center */ 0.0f, - 0.0f, - 0.0f, + /* Center */ 0.0f, 0.0f, 0.0f, /* Radius */ 1000.0f, /* Height */ 10000.0f, }, @@ -141,7 +139,7 @@ static const dCcD_SrcCyl l_cyl_tg_src = { /* SrcObjAt Type */ 0, /* SrcObjAt Atp */ 0, /* SrcObjAt SPrm */ 0, - /* SrcObjTg Type */ 0xFF3DFEFF, + /* SrcObjTg Type */ ~(AT_TYPE_WATER | AT_TYPE_UNK20000 | AT_TYPE_UNK400000 | AT_TYPE_UNK800000), /* SrcObjTg SPrm */ 9, /* SrcObjCo SPrm */ 0, /* SrcGObjAt Se */ 0, @@ -158,9 +156,7 @@ static const dCcD_SrcCyl l_cyl_tg_src = { }, // cM3dGCylS { - /* Center */ 0.0f, - 0.0f, - 0.0f, + /* Center */ 0.0f, 0.0f, 0.0f, /* Radius */ 1000.0f, /* Height */ 10000.0f, }, diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index 7d5edd472..4a2be9574 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -224,31 +224,33 @@ namespace daObjMovebox { }; const dCcD_SrcCyl Act_c::M_cyl_src = { - 0, - 0, - 0, - 0, - AT_TYPE_BOMB, // Tg damage types - 0x09, - 0x79, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - - // Cylinder - 0.0, // X - 0.0, // Y - 0.0, // Z - 75.0, // Radius - 150.0, // Height + // dCcD_SrcGObjInf + { + /* Flags */ 0, + /* SrcObjAt Type */ 0, + /* SrcObjAt Atp */ 0, + /* SrcObjAt SPrm */ 0, + /* SrcObjTg Type */ AT_TYPE_BOMB, + /* SrcObjTg SPrm */ 0x09, + /* SrcObjCo SPrm */ 0x79, + /* SrcGObjAt Se */ 0, + /* SrcGObjAt HitMark */ 0, + /* SrcGObjAt Spl */ 0, + /* SrcGObjAt Mtrl */ 0, + /* SrcGObjAt GFlag */ 0, + /* SrcGObjTg Se */ 0, + /* SrcGObjTg HitMark */ 0, + /* SrcGObjTg Spl */ 0, + /* SrcGObjTg Mtrl */ 0, + /* SrcGObjTg GFlag */ 0, + /* SrcGObjCo GFlag */ 0, + }, + // cM3dGCylS + { + /* Center */ 0.0f, 0.0f, 0.0f, + /* Radius */ 75.0f, + /* Height */ 150.0f, + }, }; const Type_Attr Act_c::M_attr[13] = { diff --git a/src/d/actor/d_a_obj_paper.cpp b/src/d/actor/d_a_obj_paper.cpp index a3328e996..33b8ef1d8 100644 --- a/src/d/actor/d_a_obj_paper.cpp +++ b/src/d/actor/d_a_obj_paper.cpp @@ -56,31 +56,33 @@ namespace daObjPaper { } static const dCcD_SrcCyl M_cyl_src = { - 0, - 0, - 0, - 0, - 0xFF1DFEFF, - 0xF, - 0x79, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 3, - 0, - - // Cylinder - 0.0f, // X - 0.0f, // Y - 0.0f, // Z - 0.0f, // Radius - 0.0f, // Height + // dCcD_SrcGObjInf + { + /* Flags */ 0, + /* SrcObjAt Type */ 0, + /* SrcObjAt Atp */ 0, + /* SrcObjAt SPrm */ 0, + /* SrcObjTg Type */ ~(AT_TYPE_WATER | AT_TYPE_UNK20000 | AT_TYPE_LEAF_WIND | AT_TYPE_UNK400000 | AT_TYPE_UNK800000), + /* SrcObjTg SPrm */ 0x0F, + /* SrcObjCo SPrm */ 0x79, + /* SrcGObjAt Se */ 0, + /* SrcGObjAt HitMark */ 0, + /* SrcGObjAt Spl */ 0, + /* SrcGObjAt Mtrl */ 0, + /* SrcGObjAt GFlag */ 0, + /* SrcGObjTg Se */ 0, + /* SrcGObjTg HitMark */ 0, + /* SrcGObjTg Spl */ 0, + /* SrcGObjTg Mtrl */ 0, + /* SrcGObjTg GFlag */ 0x03, + /* SrcGObjCo GFlag */ 0, + }, + // cM3dGCylS + { + /* Center */ 0.0f, 0.0f, 0.0f, + /* Radius */ 0.0f, + /* Height */ 0.0f, + }, }; enum Act_Mode_e { @@ -184,7 +186,7 @@ namespace daObjPaper { mAttentionInfo.mPosition.y += attributes[mType].mAttentionOffset; mAttentionInfo.mDistances[1] = attributes[mType].mAttentionDist1; mAttentionInfo.mDistances[3] = attributes[mType].mAttentionDist2; - mAttentionInfo.setFlag(0x4000000A); + mAttentionInfo.setFlag(fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_READ_e); mMsgId = -1; diff --git a/src/d/actor/d_a_obj_toripost.cpp b/src/d/actor/d_a_obj_toripost.cpp index 3d68bf9a9..b1558f00f 100644 --- a/src/d/actor/d_a_obj_toripost.cpp +++ b/src/d/actor/d_a_obj_toripost.cpp @@ -124,31 +124,33 @@ const daObjTpost_c__letter_data daObjTpost_c::m_letter[] = { {true, 0x0F77, 0x9E, 0xAF03} }; const dCcD_SrcCyl daObjTpost_c::m_cyl_src = { - 0, - 0, - 0, - 0, - 0xFFFFFFBF, // Tg damage types - 0xF, - 0x79, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 7, - 0, - - // Cylinder - 0.0, // X - 0.0, // Y - 0.0, // Z - 0.0, // Radius - 0.0, // Height + // dCcD_SrcGObjInf + { + /* Flags */ 0, + /* SrcObjAt Type */ 0, + /* SrcObjAt Atp */ 0, + /* SrcObjAt SPrm */ 0, + /* SrcObjTg Type */ ~(AT_TYPE_BOOMERANG), + /* SrcObjTg SPrm */ 0x0F, + /* SrcObjCo SPrm */ 0x79, + /* SrcGObjAt Se */ 0, + /* SrcGObjAt HitMark */ 0, + /* SrcGObjAt Spl */ 0, + /* SrcGObjAt Mtrl */ 0, + /* SrcGObjAt GFlag */ 0, + /* SrcGObjTg Se */ 0, + /* SrcGObjTg HitMark */ 0, + /* SrcGObjTg Spl */ 0, + /* SrcGObjTg Mtrl */ 0, + /* SrcGObjTg GFlag */ 0x07, + /* SrcGObjCo GFlag */ 0, + }, + // cM3dGCylS + { + /* Center */ 0.0f, 0.0f, 0.0f, + /* Radius */ 0.0f, + /* Height */ 0.0f, + }, }; const s32 daObjTpost_c::m_send_price[] = { 0x05, @@ -719,7 +721,7 @@ void daObjTpost_c::setAnm(s8 param_1, bool param_2) { } if(field_0x6C8 == 0 && mMorf->getFrame() == 1.0f) { - mDoAud_seStart(0x6973, 0, 0, 0); + mDoAud_seStart(JA_SE_OBJ_POST_EAT_LUGGAGE, 0, 0, 0); } if(field_0x6C8 == 1) { @@ -727,7 +729,7 @@ void daObjTpost_c::setAnm(s8 param_1, bool param_2) { scale.setAll(1.0f); if(mMorf->getFrame() == 1.0f) { dComIfGp_particle_set(0x8190, ¤t.pos, ¤t.angle, &scale); - mDoAud_seStart(0x6974, 0, 0, 0); + mDoAud_seStart(JA_SE_OBJ_POST_LUGGAGE_OUT, 0, 0, 0); } } @@ -1013,7 +1015,7 @@ void daObjTpost_c::createInit() { mAttentionInfo.mDistances[1] = 5; mAttentionInfo.mDistances[3] = 6; - mAttentionInfo.mFlags = 0x2000000A; + mAttentionInfo.mFlags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_CHECK_e; setAnm(1, false); setMtx(); diff --git a/src/d/actor/d_a_player_npc.cpp b/src/d/actor/d_a_player_npc.cpp index c6a237a61..9fac0da0d 100644 --- a/src/d/actor/d_a_player_npc.cpp +++ b/src/d/actor/d_a_player_npc.cpp @@ -16,7 +16,7 @@ int daPy_npc_c::check_initialRoom() { if (mAcch.GetGroundH() == -1000000000.0f || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) { return 0; } else { - int roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd); + int roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd); if (roomNo < 0 || !dComIfGp_roomControl_checkStatusFlag(roomNo, 0x10)) { return 0; } else { diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index 5fc89daf0..7b8b49a03 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -275,7 +275,7 @@ s32 daTag_Msg_c::create() { shape_angle.x = 0; current.angle.z = 0; current.angle.x = 0; - mAttentionInfo.mFlags = 0x20000008; + mAttentionInfo.mFlags = fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_CHECK_e; if (getMessage() != 0x836) { mAttentionInfo.mPosition.y += 150; mEyePos.y += 150.0f; diff --git a/src/d/actor/d_a_tag_ret.cpp b/src/d/actor/d_a_tag_ret.cpp index 1dad18054..b5f3ff82c 100644 --- a/src/d/actor/d_a_tag_ret.cpp +++ b/src/d/actor/d_a_tag_ret.cpp @@ -14,31 +14,33 @@ #include "dolphin/types.h" static dCcD_SrcCyl cyl_check_src = { - 0, - 0, - 0, - 0, - 0, - 0, - 0x119, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - - // Cylinder - 0.0, // X - 0.0, // Y - 0.0, // Z - 1000.0, // Radius - 100.0, // Height + // dCcD_SrcGObjInf + { + /* Flags */ 0, + /* SrcObjAt Type */ 0, + /* SrcObjAt Atp */ 0, + /* SrcObjAt SPrm */ 0, + /* SrcObjTg Type */ 0, + /* SrcObjTg SPrm */ 0, + /* SrcObjCo SPrm */ 0x119, + /* SrcGObjAt Se */ 0, + /* SrcGObjAt HitMark */ 0, + /* SrcGObjAt Spl */ 0, + /* SrcGObjAt Mtrl */ 0, + /* SrcGObjAt GFlag */ 0, + /* SrcGObjTg Se */ 0, + /* SrcGObjTg HitMark */ 0, + /* SrcGObjTg Spl */ 0, + /* SrcGObjTg Mtrl */ 0, + /* SrcGObjTg GFlag */ 0, + /* SrcGObjCo GFlag */ 0, + }, + // cM3dGCylS + { + /* Center */ 0.0f, 0.0f, 0.0f, + /* Radius */ 1000.0f, + /* Height */ 100.0f, + }, }; namespace daTagRet { diff --git a/src/d/d_ky_thunder.cpp b/src/d/d_ky_thunder.cpp index 995977ffd..4cc25c03c 100644 --- a/src/d/d_ky_thunder.cpp +++ b/src/d/d_ky_thunder.cpp @@ -47,7 +47,7 @@ dThunder_c::~dThunder_c() { BOOL dThunder_c::execute() { mBrk.setPlaySpeed(1.0f); if (mBrk.play()) { - mDoAud_seStart(0x69f6, &mPos, 0, 0); + mDoAud_seStart(JA_SE_OBJ_THUNDER_FAR, &mPos, 0, 0); fopKyM_Delete(this); } return TRUE; @@ -189,7 +189,7 @@ s32 dThunder_c::create() { mPosNeg.x = -mPos.x; mPosNeg.y = -mPos.y; mPosNeg.z = -mPos.z; - mDoAud_seStart(0x69f6, &mPosNeg, 0, 0); + mDoAud_seStart(JA_SE_OBJ_THUNDER_FAR, &mPosNeg, 0, 0); } return cPhs_COMPLEATE_e; diff --git a/src/d/d_npc.cpp b/src/d/d_npc.cpp index af6ab7369..54dc4d51f 100644 --- a/src/d/d_npc.cpp +++ b/src/d/d_npc.cpp @@ -1292,29 +1292,31 @@ void dNpc_EventCut_c::cutTalkMsgProc() { } dCcD_SrcCyl dNpc_cyl_src = { - 0, - 0, - 0, - 0, - 0xFFFFFFBF, // Tg damage types - 3, - 0x75, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 4, - 0, - - // Cylinder - 0.0, // X - 0.0, // Y - 0.0, // Z - 0.0, // Radius - 0.0, // Height + // dCcD_SrcGObjInf + { + /* Flags */ 0, + /* SrcObjAt Type */ 0, + /* SrcObjAt Atp */ 0, + /* SrcObjAt SPrm */ 0, + /* SrcObjTg Type */ ~(AT_TYPE_BOOMERANG), + /* SrcObjTg SPrm */ 0x03, + /* SrcObjCo SPrm */ 0x75, + /* SrcGObjAt Se */ 0, + /* SrcGObjAt HitMark */ 0, + /* SrcGObjAt Spl */ 0, + /* SrcGObjAt Mtrl */ 0, + /* SrcGObjAt GFlag */ 0, + /* SrcGObjTg Se */ 0, + /* SrcGObjTg HitMark */ 0, + /* SrcGObjTg Spl */ 0, + /* SrcGObjTg Mtrl */ 0, + /* SrcGObjTg GFlag */ 0x04, + /* SrcGObjCo GFlag */ 0, + }, + // cM3dGCylS + { + /* Center */ 0.0f, 0.0f, 0.0f, + /* Radius */ 0.0f, + /* Height */ 0.0f, + }, }; diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index bc2c7edfc..201af475d 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -211,7 +211,7 @@ BOOL progSelDraw(dScnLogo_c* i_this) { if (i_this->field_0x1eb == 0) { if (i_this->mInterFlag == 0) { if (CPad_CHECK_HOLD_RIGHT(0) || g_mDoCPd_cpadInfo[0].mMainStickPosX > 0.5f) { - mDoAud_seStart(0x83d, NULL, 0, 0); + mDoAud_seStart(JA_SE_TALK_CURSOR, NULL, 0, 0); i_this->mInterFlag = 1; i_this->field_0x1ee = 30; i_this->field_0x1f0 = i_this->field_0x1ee; @@ -219,7 +219,7 @@ BOOL progSelDraw(dScnLogo_c* i_this) { } } else { if (CPad_CHECK_HOLD_LEFT(0) || g_mDoCPd_cpadInfo[0].mMainStickPosX < 0.5f) { - mDoAud_seStart(0x83d, NULL, 0, 0); + mDoAud_seStart(JA_SE_TALK_CURSOR, NULL, 0, 0); i_this->mInterFlag = 0; i_this->field_0x1ee = 30; i_this->field_0x1f0 = i_this->field_0x1ee; @@ -229,9 +229,9 @@ BOOL progSelDraw(dScnLogo_c* i_this) { if (CPad_CHECK_TRIG_A(0) || i_this->mTimer == 0) { if (i_this->mInterFlag == 0) - mDoAud_seStart(0x80d, NULL, 0, 0); + mDoAud_seStart(JA_SE_TALK_WIN_CLOSE, NULL, 0, 0); else - mDoAud_seStart(0x880, NULL, 0, 0); + mDoAud_seStart(JA_SE_TALK_SEL_CANCEL, NULL, 0, 0); if (i_this->mTimer > 540) { i_this->field_0x1eb = 1;