diff --git a/config/SOUE01/rels/d_a_obj_tumble_weedNP/symbols.txt b/config/SOUE01/rels/d_a_obj_tumble_weedNP/symbols.txt index 651e1631..1d94b1d8 100644 --- a/config/SOUE01/rels/d_a_obj_tumble_weedNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_tumble_weedNP/symbols.txt @@ -5,27 +5,19 @@ __register_global_object = .text:0x00000070; // type:function size:0x1C scope:gl __destroy_global_chain = .text:0x00000090; // type:function size:0x54 scope:global dAcOTumbleWeed_c_classInit__Fv = .text:0x000000F0; // type:function size:0x118 __dt__15dShadowCircle_cFv = .text:0x00000210; // type:function size:0x58 scope:weak -__dt__15dShadowCircle_cFv = .text:0x00000210; // type:function size:0x58 scope:weak __dt__29sFState_c<16dAcOTumbleWeed_c>Fv = .text:0x00000270; // type:function size:0x58 __dt__32sFStateFct_c<16dAcOTumbleWeed_c>Fv = .text:0x000002D0; // type:function size:0x6C __dt__85sStateMgr_c<16dAcOTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000340; // type:function size:0xA0 __dt__55sFStateMgr_c<16dAcOTumbleWeed_c,20sStateMethodUsr_FI_c>Fv = .text:0x000003E0; // type:function size:0xA4 createHeap__16dAcOTumbleWeed_cFv = .text:0x00000490; // type:function size:0x80 actorCreate__16dAcOTumbleWeed_cFv = .text:0x00000510; // type:function size:0x1D8 -createHeap__16dAcOTumbleWeed_cFv = .text:0x00000490; // type:function size:0x80 -actorCreate__16dAcOTumbleWeed_cFv = .text:0x00000510; // type:function size:0x1D8 changeState__85sStateMgr_c<16dAcOTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x000006F0; // type:function size:0x10 actorPostCreate__16dAcOTumbleWeed_cFv = .text:0x00000700; // type:function size:0x8 doDelete__16dAcOTumbleWeed_cFv = .text:0x00000710; // type:function size:0x8 actorExecute__16dAcOTumbleWeed_cFv = .text:0x00000720; // type:function size:0x314 -actorPostCreate__16dAcOTumbleWeed_cFv = .text:0x00000700; // type:function size:0x8 -doDelete__16dAcOTumbleWeed_cFv = .text:0x00000710; // type:function size:0x8 -actorExecute__16dAcOTumbleWeed_cFv = .text:0x00000720; // type:function size:0x314 executeState__85sStateMgr_c<16dAcOTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000A40; // type:function size:0x10 calcTimer__4sLibFPUs_Us = .text:0x00000A50; // type:function size:0x1C draw__16dAcOTumbleWeed_cFv = .text:0x00000A70; // type:function size:0xE4 -calcTimer__4sLibFPUs_Us = .text:0x00000A50; // type:function size:0x1C -draw__16dAcOTumbleWeed_cFv = .text:0x00000A70; // type:function size:0xE4 initializeState_Wait__16dAcOTumbleWeed_cFv = .text:0x00000B60; // type:function size:0xC executeState_Wait__16dAcOTumbleWeed_cFv = .text:0x00000B70; // type:function size:0xD4 finalizeState_Wait__16dAcOTumbleWeed_cFv = .text:0x00000C50; // type:function size:0x4 @@ -48,22 +40,6 @@ setWind__16dAcOTumbleWeed_cFRC7mVec3_c = .text:0x00001B00; // type:function size calcWind__16dAcOTumbleWeed_cFv = .text:0x00001B50; // type:function size:0xD0 calcTimer__4sLibFPUc_Uc = .text:0x00001C20; // type:function size:0x1C getPosition__16dAcOTumbleWeed_cCFv = .text:0x00001C40; // type:function size:0xAC -checkBreak__16dAcOTumbleWeed_cFv = .text:0x00000D20; // type:function size:0x118 -fn_475_E40__16dAcOTumbleWeed_cCFv = .text:0x00000E40; // type:function size:0x1C -checkSlope__16dAcOTumbleWeed_cFv = .text:0x00000E60; // type:function size:0x11C -checkCollect__16dAcOTumbleWeed_cFv = .text:0x00000F80; // type:function size:0x6C -checkInvalidGround__16dAcOTumbleWeed_cCFv = .text:0x00000FF0; // type:function size:0x58 -doBreak__16dAcOTumbleWeed_cFv = .text:0x00001050; // type:function size:0x6C -calcMatrix__16dAcOTumbleWeed_cFv = .text:0x000010C0; // type:function size:0x684 -adjustAngle__16dAcOTumbleWeed_cFv = .text:0x00001750; // type:function size:0x58 -adjustSpeed__16dAcOTumbleWeed_cFv = .text:0x000017B0; // type:function size:0x1A8 -tumbleBounceMaybe__16dAcOTumbleWeed_cFv = .text:0x00001960; // type:function size:0x68 -adjustTimeScale__16dAcOTumbleWeed_cFv = .text:0x000019D0; // type:function size:0xA0 -adjustTumble__16dAcOTumbleWeed_cFRC7mVec3_c = .text:0x00001A70; // type:function size:0x88 -setWind__16dAcOTumbleWeed_cFRC7mVec3_c = .text:0x00001B00; // type:function size:0x4C -calcWind__16dAcOTumbleWeed_cFv = .text:0x00001B50; // type:function size:0xD0 -calcTimer__4sLibFPUc_Uc = .text:0x00001C20; // type:function size:0x1C -getPosition__16dAcOTumbleWeed_cCFv = .text:0x00001C40; // type:function size:0xAC __dt__16dAcOTumbleWeed_cFv = .text:0x00001CF0; // type:function size:0x10C getStateID__85sStateMgr_c<16dAcOTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00001E00; // type:function size:0x10 build__32sFStateFct_c<16dAcOTumbleWeed_c>FRC12sStateIDIf_c = .text:0x00001E10; // type:function size:0x60 diff --git a/include/d/a/d_a_item.h b/include/d/a/d_a_item.h index f6ea85e9..14d7144d 100644 --- a/include/d/a/d_a_item.h +++ b/include/d/a/d_a_item.h @@ -46,6 +46,7 @@ class dAcItem_c : public dAcItemBase_c { static void spawnItem(u16 item, u32 room, const mVec3_c &pos, const mAng3_c &rot, u32 params, u32 arg); static void spawnDrop(u16 item, u32 room, const mVec3_c &pos, const mAng3_c &rot); + static u32 checkFlag(u32 flag); private: /* 0x334 */ UNKTYPE *mpMdl; // Model has its own handling system diff --git a/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp b/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp index 3fa70d24..4de37268 100644 --- a/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp +++ b/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp @@ -1,7 +1,6 @@ #include "d/a/obj/d_a_obj_toD3_stone_figure.h" #include "d/a/d_a_item.h" -#include "d/a/obj/d_a_obj_item.h" #include "d/col/cc/d_cc_s.h" #include "d/flag/storyflag_manager.h" #include "toBeSorted/attention.h" diff --git a/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp b/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp index 2ac29f47..f9f5616a 100644 --- a/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp +++ b/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp @@ -2,23 +2,20 @@ #include "c/c_math.h" #include "common.h" +#include "d/a/d_a_itembase.h" #include "d/a/d_a_player.h" #include "d/a/obj/d_a_obj_base.h" #include "d/col/bg/d_bg_s.h" -#include "d/col/bg/d_bg_s_gnd_chk.h" #include "d/col/c/c_cc_d.h" #include "d/col/c/c_m3d_g_pla.h" #include "d/col/cc/d_cc_d.h" #include "d/col/cc/d_cc_s.h" #include "egg/math/eggMath.h" #include "egg/math/eggQuat.h" -#include "f/f_base.h" #include "m/m_angle.h" #include "m/m_mtx.h" #include "m/m_quat.h" #include "m/m_vec.h" -#include "nw4r/math/math_triangular.h" -#include "rvl/MTX/mtx.h" #include "rvl/MTX/vec.h" #include "s/s_Math.h" #include "toBeSorted/dowsing_target.h" @@ -118,7 +115,7 @@ int dAcOTumbleWeed_c::actorExecute() { mObjAcch.CrrPos(*dBgS::GetInstance()); mField_0x974 += position.y - mOldPosition.y; if (checkCollect()) { - dAcPy_c::LINK->bugNetCollectTreasure(0xA3 /* TODO(Item Id) ITEM_TUMBLEWEED */); + dAcPy_c::LINK->bugNetCollectTreasure(ITEM_TUMBLE_WEED); FUN_8002dcd0(); return SUCCEEDED; } diff --git a/src/REL/d/t/d_t_tumble_weed.cpp b/src/REL/d/t/d_t_tumble_weed.cpp index eebae1d6..5949dbe7 100644 --- a/src/REL/d/t/d_t_tumble_weed.cpp +++ b/src/REL/d/t/d_t_tumble_weed.cpp @@ -1,6 +1,7 @@ #include "d/t/d_t_tumble_weed.h" #include "m/m_vec.h" +#include "s/s_Math.h" SPECIAL_ACTOR_PROFILE(TUMBLE_WEED_TAG, dTgTumbleWeed_c, fProfile::TUMBLE_WEED_TAG, 0x0244, 0, 0); @@ -44,63 +45,65 @@ void dTgTumbleWeed_c::executeState_AreaOut() { mStateMgr.changeState(StateID_AreaIn); } } - void dTgTumbleWeed_c::finalizeState_AreaOut() {} +} +void dTgTumbleWeed_c::finalizeState_AreaOut() {} - void dTgTumbleWeed_c::initializeState_AreaIn() {} - void dTgTumbleWeed_c::executeState_AreaIn() { - if (tumbleweedTimer == 0) { - if (shouldSpawnTumbleweed()) { - doSpawnTumbleweed(); - } - tumbleweedTimer = 600; +void dTgTumbleWeed_c::initializeState_AreaIn() {} +void dTgTumbleWeed_c::executeState_AreaIn() { + if (tumbleweedTimer == 0) { + if (shouldSpawnTumbleweed()) { + doSpawnTumbleweed(); } + tumbleweedTimer = 600; + } + if (sLib::calcTimer(&windTimer) == 0) { if (sLib::calcTimer(&windTimer) == 0) { - if (sLib::calcTimer(&windTimer) == 0) { - windTimer = 0x96; - if (shouldDoWind()) { - mStateMgr.changeState(StateID_Wind); - return; - } - } - if (!isWithinPlayerRadius(mScale.x)) { - mStateMgr.changeState(StateID_AreaOut); + windTimer = 0x96; + if (shouldDoWind()) { + mStateMgr.changeState(StateID_Wind); + return; } } - void dTgTumbleWeed_c::finalizeState_AreaIn() {} - - void dTgTumbleWeed_c::initializeState_Wind() { - mVec3_c vec; - getWind(&vec); - if (childTumbleweed.get() != nullptr) { - childTumbleweed.get()->setWind(vec); - childTumbleweed.get()->setWind(vec); - } + if (!isWithinPlayerRadius(mScale.x)) { + mStateMgr.changeState(StateID_AreaOut); } + } +} +void dTgTumbleWeed_c::finalizeState_AreaIn() {} - void dTgTumbleWeed_c::executeState_Wind() { - if (isWithinPlayerRadius(mScale.x)) { - mStateMgr.changeState(StateID_AreaIn); - } else { - mStateMgr.changeState(StateID_AreaOut); - } - } - void dTgTumbleWeed_c::finalizeState_Wind() {} +void dTgTumbleWeed_c::initializeState_Wind() { + mVec3_c vec; + getWind(&vec); + if (childTumbleweed.get() != nullptr) { + childTumbleweed.get()->setWind(vec); + childTumbleweed.get()->setWind(vec); + } +} - bool dTgTumbleWeed_c::shouldSpawnTumbleweed() { - bool spawnAllowed = false; - if (childTumbleweed.get() == nullptr && cM::rnd() <= 0.8f) { - spawnAllowed = true; - } +void dTgTumbleWeed_c::executeState_Wind() { + if (isWithinPlayerRadius(mScale.x)) { + mStateMgr.changeState(StateID_AreaIn); + } else { + mStateMgr.changeState(StateID_AreaOut); + } +} +void dTgTumbleWeed_c::finalizeState_Wind() {} - if (spawnAllowed) { - return true; - } +bool dTgTumbleWeed_c::shouldSpawnTumbleweed() { + bool spawnAllowed = false; + if (childTumbleweed.get() == nullptr && cM::rnd() <= 0.8f) { + spawnAllowed = true; + } - return false; - } + if (spawnAllowed) { + return true; + } - bool dTgTumbleWeed_c::shouldDoWind() { - return childTumbleweed.get() != nullptr && cM::rnd() <= 0.5f; - } - void dTgTumbleWeed_c::doSpawnTumbleweed() {} - void dTgTumbleWeed_c::getWind(mVec3_c *) {} + return false; +} + +bool dTgTumbleWeed_c::shouldDoWind() { + return childTumbleweed.get() != nullptr && cM::rnd() <= 0.5f; +} +void dTgTumbleWeed_c::doSpawnTumbleweed() {} +void dTgTumbleWeed_c::getWind(mVec3_c *) {}