Skip to content

Commit

Permalink
fixup merge
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-thomas774 committed Nov 6, 2024
1 parent 7e042dc commit aa4981e
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 79 deletions.
24 changes: 0 additions & 24 deletions config/SOUE01/rels/d_a_obj_tumble_weedNP/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Us>__4sLibFPUs_Us = .text:0x00000A50; // type:function size:0x1C
draw__16dAcOTumbleWeed_cFv = .text:0x00000A70; // type:function size:0xE4
calcTimer<Us>__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
Expand All @@ -48,22 +40,6 @@ setWind__16dAcOTumbleWeed_cFRC7mVec3_c = .text:0x00001B00; // type:function size
calcWind__16dAcOTumbleWeed_cFv = .text:0x00001B50; // type:function size:0xD0
calcTimer<Uc>__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<Uc>__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
Expand Down
1 change: 1 addition & 0 deletions include/d/a/d_a_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
7 changes: 2 additions & 5 deletions src/REL/d/a/obj/d_a_obj_tumble_weed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down
101 changes: 52 additions & 49 deletions src/REL/d/t/d_t_tumble_weed.cpp
Original file line number Diff line number Diff line change
@@ -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);

Expand Down Expand Up @@ -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 *) {}

0 comments on commit aa4981e

Please sign in to comment.