diff --git a/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt b/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt index 287711d0..b7c6167b 100644 --- a/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt @@ -10,7 +10,7 @@ draw__16dAcOTarzanPole_cFv = .text:0x00000560; // type:function size:0x28 __dt__16dAcOTarzanPole_cFv = .text:0x00000590; // type:function size:0x80 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_288_rodata_0 = .rodata:0x00000000; // type:object size:0x4C data:float +lbl_288_rodata_0 = .rodata:0x00000000; // type:object size:0x4C scope:local data:float g_profile_OBJ_TARZAN_POLE = .data:0x00000000; // type:object size:0x10 sCcSrc__16dAcOTarzanPole_c = .data:0x00000010; // type:object size:0x30 @23333 = .data:0x00000040; // type:object size:0x8 scope:local data:string diff --git a/configure.py b/configure.py index b3fae83d..566db45b 100644 --- a/configure.py +++ b/configure.py @@ -2293,7 +2293,7 @@ config.libs = [ Rel(NonMatching, "d_a_obj_syako_shutter", "REL/d/a/obj/d_a_obj_syako_shutter.cpp"), Rel(NonMatching, "d_a_obj_tableware", "REL/d/a/obj/d_a_obj_tableware.cpp"), Rel(NonMatching, "d_a_obj_tackle", "REL/d/a/obj/d_a_obj_tackle.cpp"), - Rel(NonMatching, "d_a_obj_tarzan_pole", "REL/d/a/obj/d_a_obj_tarzan_pole.cpp"), + Rel(Matching, "d_a_obj_tarzan_pole", "REL/d/a/obj/d_a_obj_tarzan_pole.cpp"), Rel(NonMatching, "d_a_obj_tenijima", "REL/d/a/obj/d_a_obj_tenijima.cpp"), Rel(NonMatching, "d_a_obj_teni_rail", "REL/d/a/obj/d_a_obj_teni_rail.cpp"), Rel( diff --git a/include/d/a/obj/d_a_obj_tarzan_pole.h b/include/d/a/obj/d_a_obj_tarzan_pole.h index 56ba0607..f37d8e5d 100644 --- a/include/d/a/obj/d_a_obj_tarzan_pole.h +++ b/include/d/a/obj/d_a_obj_tarzan_pole.h @@ -21,8 +21,9 @@ public: private: static dCcD_SrcSph sCcSrc; - static const f32 sUnusedFloat; - static const f32 sUnusedFloat2; + + static const f32 sXOffset; + static const f32 sYOffset; /* 0x330 */ nw4r::g3d::ResFile mBrres; /* 0x334 */ m3d::smdl_c mMdl; diff --git a/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp b/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp index d642ecd5..e3c040ae 100644 --- a/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp +++ b/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp @@ -23,8 +23,10 @@ dCcD_SrcSph dAcOTarzanPole_c::sCcSrc = { }; // clang-format on +const f32 dAcOTarzanPole_c::sXOffset = 320.0f; +const f32 dAcOTarzanPole_c::sYOffset = 0.0f; + bool dAcOTarzanPole_c::createHeap() { - 320.0f; // To fix .rodata // Get Res File void *resFile = getOarcResFile("WhipBar"); mBrres = nw4r::g3d::ResFile(resFile); @@ -44,7 +46,6 @@ bool dAcOTarzanPole_c::createHeap() { return true; } -const f32 dAcOTarzanPole_c::sUnusedFloat = 0.0f; int dAcOTarzanPole_c::create() { if (!initAllocatorWork1Heap(0xFFFFFFFF, "dAcOTarzanPole_c::m_allocator", 0x20)) { return FAILED; @@ -56,15 +57,15 @@ int dAcOTarzanPole_c::create() { mCollider.Set(sCcSrc); mCollider.SetStts(mStts); - forwardAccel = 0; - forwardMaxSpeed = -40; + forwardAccel = 0.0f; + forwardMaxSpeed = -40.0f; mFloat = (s32)(params & 0xFF) * 10.0f; if ((s32)(params & 0xFF) == 0xFF) { mFloat = 0.0f; } - mVec = mVec3_c::Ex * 400; + mVec = mVec3_c::Ex * 400.0f; mVec.rotY(rotation.y); boundingBox.Set(mVec3_c(-0.0f, -120.0f, -110.0f), mVec3_c(500.0f, 140.0f, 110.0f)); @@ -75,7 +76,6 @@ int dAcOTarzanPole_c::doDelete() { return SUCCEEDED; } -const f32 dAcOTarzanPole_c::sUnusedFloat2 = 320.0f; int dAcOTarzanPole_c::actorExecute() { updateMatrix(); mMdl.setLocalMtx(mWorldMtx); @@ -90,10 +90,10 @@ int dAcOTarzanPole_c::actorExecute() { mObjectActorFlags = mObjectActorFlags | 0x1000; } - mVec = mVec3_c::Ex * 320.0f + mVec3_c::Ey * 0; + mVec = mVec3_c::Ex * sXOffset + mVec3_c::Ey * sYOffset; mVec.rotY(rotation.y); poscopy2 = position + mVec; - poscopy3 = poscopy2 + mVec3_c::Ey * 20; + poscopy3 = poscopy2 + mVec3_c::Ey * 20.0f; if (player != nullptr && !player->checkActionFlags(0x400000) && dAcItem_c::checkFlag(ITEM_WHIP)) { AttentionManager::GetInstance()->addUnk7Target((dAcObjBase_c &)*this, 1, 1000.0f, 10.0f, -600.0, 200);