mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 13:56:15 -04:00
Small cleanup
This commit is contained in:
+17
-17
@@ -11885,7 +11885,7 @@ ActorLink__lookTowardsItem = .text:0x801D73A0; // type:function size:0x230
|
||||
fn_801D75D0 = .text:0x801D75D0; // type:function size:0x8
|
||||
fn_801D75E0 = .text:0x801D75E0; // type:function size:0xB8
|
||||
fn_801D76A0 = .text:0x801D76A0; // type:function size:0x7F8
|
||||
fn_801D7EA0 = .text:0x801D7EA0; // type:function size:0x10
|
||||
getStateID__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801D7EA0; // type:function size:0x10
|
||||
fn_801D7EB0 = .text:0x801D7EB0; // type:function size:0x3E0
|
||||
fn_801D8290 = .text:0x801D8290; // type:function size:0x46C
|
||||
fn_801D8700 = .text:0x801D8700; // type:function size:0x134
|
||||
@@ -14155,23 +14155,23 @@ executeState__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct
|
||||
draw__14dAcBoomerang_cFv = .text:0x80264CE0; // type:function size:0x160
|
||||
create__18dAcBoomerangProc_cFPQ23m3d5mdl_c6mColoriP12mAllocator_c = .text:0x80264E40; // type:function size:0x88
|
||||
fn_80264ED0 = .text:0x80264ED0; // type:function size:0x80
|
||||
fn_80264F50 = .text:0x80264F50; // type:function size:0x60
|
||||
fn_80264FB0 = .text:0x80264FB0; // type:function size:0xC
|
||||
fn_80264FC0 = .text:0x80264FC0; // type:function size:0x1C
|
||||
fn_80264FE0 = .text:0x80264FE0; // type:function size:0x1C
|
||||
fn_80265000 = .text:0x80265000; // type:function size:0x1C
|
||||
fn_80265020 = .text:0x80265020; // type:function size:0x10
|
||||
fn_80265030 = .text:0x80265030; // type:function size:0x10
|
||||
fn_80265040 = .text:0x80265040; // type:function size:0x10
|
||||
fn_80265050 = .text:0x80265050; // type:function size:0x10
|
||||
fn_80265060 = .text:0x80265060; // type:function size:0x10
|
||||
fn_80265070 = .text:0x80265070; // type:function size:0x10
|
||||
fn_80265080 = .text:0x80265080; // type:function size:0x30
|
||||
fn_802650B0 = .text:0x802650B0; // type:function size:0x30
|
||||
fn_802650E0 = .text:0x802650E0; // type:function size:0x30
|
||||
build__30sFStateFct_c<14dAcBoomerang_c>FRC12sStateIDIf_c = .text:0x80264F50; // type:function size:0x60
|
||||
dispose__30sFStateFct_c<14dAcBoomerang_c>FRP10sStateIf_c = .text:0x80264FB0; // type:function size:0xC
|
||||
initialize__27sFState_c<14dAcBoomerang_c>Fv = .text:0x80264FC0; // type:function size:0x1C
|
||||
execute__27sFState_c<14dAcBoomerang_c>Fv = .text:0x80264FE0; // type:function size:0x1C
|
||||
finalize__27sFState_c<14dAcBoomerang_c>Fv = .text:0x80265000; // type:function size:0x1C
|
||||
initializeState__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80265020; // type:function size:0x10
|
||||
finalizeState__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80265030; // type:function size:0x10
|
||||
refreshState__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80265040; // type:function size:0x10
|
||||
getState__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80265050; // type:function size:0x10
|
||||
getNewStateID__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80265060; // type:function size:0x10
|
||||
getOldStateID__83sStateMgr_c<14dAcBoomerang_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80265070; // type:function size:0x10
|
||||
finalizeState__29sFStateID_c<14dAcBoomerang_c>CFR14dAcBoomerang_c = .text:0x80265080; // type:function size:0x30
|
||||
executeState__29sFStateID_c<14dAcBoomerang_c>CFR14dAcBoomerang_c = .text:0x802650B0; // type:function size:0x30
|
||||
initializeState__29sFStateID_c<14dAcBoomerang_c>CFR14dAcBoomerang_c = .text:0x802650E0; // type:function size:0x30
|
||||
__sinit_\d_a_obj_boomerang_cpp = .text:0x80265110; // type:function size:0x41C
|
||||
AcBoomerang__dtor2 = .text:0x80265530; // type:function size:0x58
|
||||
fn_80265590 = .text:0x80265590; // type:function size:0x88
|
||||
__dt__29sFStateID_c<14dAcBoomerang_c>Fv = .text:0x80265530; // type:function size:0x58
|
||||
isSameName__29sFStateID_c<14dAcBoomerang_c>CFPCc = .text:0x80265590; // type:function size:0x88
|
||||
dAcObjFairy_c_classInit__Fv = .text:0x80265620; // type:function size:0x144
|
||||
__dt__26sFState_c<13dAcObjFairy_c>Fv = .text:0x80265770; // type:function size:0x58
|
||||
__dt__29sFStateFct_c<13dAcObjFairy_c>Fv = .text:0x802657D0; // type:function size:0x6C
|
||||
|
||||
@@ -102,6 +102,9 @@ public:
|
||||
static s32 getCurrentBowType();
|
||||
static s32 getCurrentSlingshotType();
|
||||
static s32 getCurrentBeetleType();
|
||||
static bool hasBeetleVariantOrBetter(s32 variant) {
|
||||
return getCurrentBeetleType() >= variant;
|
||||
}
|
||||
static s32 getCurrentBugNetType();
|
||||
|
||||
static bool isInBambooCuttingMinigame() {
|
||||
|
||||
@@ -208,15 +208,19 @@ private:
|
||||
/* 0x08B5 */ u8 mWindNodeID;
|
||||
/* 0x08B6 */ u8 mLeftWingNodeID;
|
||||
/* 0x08B7 */ u8 mRightWingNodeID;
|
||||
/* 0x08B8 */ u8 _0x8B8[0x8C8 - 0x8B8];
|
||||
/* 0x08CA */ u16 field_0x8C8;
|
||||
/* 0x08B8 */ mAng field_0x8B8;
|
||||
/* 0x08BA */ mAng field_0x8BA;
|
||||
/* 0x08BC */ mAng field_0x8BC;
|
||||
/* 0x08BE */ mAng field_0x8BE;
|
||||
/* 0x08C0 */ u8 _0x8C0[0x8C8 - 0x8C0];
|
||||
/* 0x08CA */ mAng field_0x8C8;
|
||||
/* 0x08CA */ u16 mRemainingFlightTime;
|
||||
/* 0x08CC */ u32 field_0x8CC;
|
||||
/* 0x08D0 */ f32 field_0x8D0;
|
||||
/* 0x08D4 */ f32 field_0x8D4;
|
||||
/* 0x08D8 */ mVec3_c field_0x8D8;
|
||||
/* 0x08E4 */ mVec3_c field_0x8E4;
|
||||
/* 0x08F0 */ u8 _0x8E4[0x8FC - 0x8F0];
|
||||
/* 0x08F0 */ mVec3_c field_0x8F0;
|
||||
/* 0x08FC */ dCcD_Sph mSph0;
|
||||
/* 0x0A4C */ dCcD_Sph mSph1;
|
||||
/* 0x0B9C */ EffectsStruct mEff0;
|
||||
|
||||
@@ -53,12 +53,29 @@ class ex_c {
|
||||
/* 0x10D8 */ s32 field_0x10D8;
|
||||
};
|
||||
|
||||
// Orthonormal Basis vectors of the Mpls attachment in 3D space.
|
||||
// Z+ is forward, Y+ is up, and X+ is left. So a Wiimote pointing at
|
||||
// the Screen will have vectors (1, 0, 0), (0, 1, 0), (0, 0, 1).
|
||||
// Of particular interest here is mZ, which tells you in which direction
|
||||
// the Wiimote points.
|
||||
struct mpls_c {
|
||||
mpls_c() : mX(mVec3_c::Ex), mY(mVec3_c::Ey), mZ(mVec3_c::Ez) {}
|
||||
mMtx_c getMtx() const;
|
||||
/* 0x00 */ mVec3_c mX;
|
||||
/* 0x0C */ mVec3_c mY;
|
||||
/* 0x18 */ mVec3_c mZ;
|
||||
|
||||
// vertical angle. 0 is forward, positive is pointing upwards,
|
||||
// negative is pointing downwards
|
||||
mAng getVerticalAngle() const {
|
||||
return cM::atan2s(mZ.y, mZ.absXZ());
|
||||
}
|
||||
|
||||
// horizontal angle. 0 is forward, positive is pointing to the left,
|
||||
// negative is pointing to the right
|
||||
mAng getHorizontalAngle() const {
|
||||
return cM::atan2s(mZ.x, mZ.z);
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@@ -243,6 +243,8 @@ public:
|
||||
void rotY(const mAng &angle);
|
||||
void rotZ(const mAng &angle);
|
||||
|
||||
void fromXY(const mAng &angleX, const mAng &angleY, f32);
|
||||
|
||||
void CopyTo(Vec *p) const {
|
||||
p->x = x;
|
||||
p->y = y;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "d/col/bg/d_bg_s_lin_chk.h"
|
||||
#include "d/col/c/c_cc_d.h"
|
||||
#include "d/d_pad.h"
|
||||
#include "d/d_player_act.h"
|
||||
#include "d/d_rumble.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "f/f_base.h"
|
||||
@@ -60,7 +61,7 @@ void dAcBoomerang_c::areaCallback(mVec3_c *param1, u32 param2) {
|
||||
void dAcBoomerang_c::atHitCallback(cCcD_Obj *i_objInfA, dAcObjBase_c *i_actorB, cCcD_Obj *i_objInfB) {
|
||||
if (i_actorB != nullptr && i_actorB->GetLinkage().checkFlag(0x80)) {
|
||||
// Check if beetle can grab things
|
||||
if ((s32)(dAcPy_c::getCurrentBeetleType() >= HOOK_BEETLE) != FALSE) {
|
||||
if (dAcPy_c::hasBeetleVariantOrBetter(HOOK_BEETLE)) {
|
||||
// If beetle is already holding the object or is stationary
|
||||
if (i_actorB == mGrabbedActor.get() || !mStateMgr.isState(StateID_Move)) {
|
||||
return;
|
||||
@@ -124,21 +125,21 @@ bool dAcBoomerang_c::createHeap() {
|
||||
TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1));
|
||||
|
||||
// Decide the Pincers
|
||||
if ((s32)(dAcPy_c::getCurrentBeetleType() >= HOOK_BEETLE) != FALSE) {
|
||||
if (dAcPy_c::hasBeetleVariantOrBetter(HOOK_BEETLE)) {
|
||||
hideModel(MDL_MOUTH_BASIC);
|
||||
} else {
|
||||
hideModel(MDL_MOUTH_HOOK);
|
||||
}
|
||||
|
||||
// Decide the Body
|
||||
if ((s32)(dAcPy_c::getCurrentBeetleType() >= TOUGH_BEETLE) != FALSE) {
|
||||
if (dAcPy_c::hasBeetleVariantOrBetter(TOUGH_BEETLE)) {
|
||||
hideModel(MDL_BODY_BASIC);
|
||||
} else {
|
||||
hideModel(MDL_BODY_ADV);
|
||||
}
|
||||
|
||||
// Decide the Wings
|
||||
if ((s32)(dAcPy_c::getCurrentBeetleType() >= QUICK_BEETLE) != FALSE) {
|
||||
if (dAcPy_c::hasBeetleVariantOrBetter(QUICK_BEETLE)) {
|
||||
hideModel(MDL_WINGS_BASIC);
|
||||
} else {
|
||||
hideModel(MDL_WINGS_ADV);
|
||||
@@ -216,7 +217,7 @@ int dAcBoomerang_c::create() {
|
||||
|
||||
mSph1.SetCoGrp(0xE);
|
||||
|
||||
if ((s32)(dAcPy_c::getCurrentBeetleType() >= HOOK_BEETLE) == FALSE) {
|
||||
if (!dAcPy_c::hasBeetleVariantOrBetter(HOOK_BEETLE)) {
|
||||
mSph0.OnAt_0x4000();
|
||||
mSph1.OnAt_0x4000();
|
||||
}
|
||||
@@ -428,6 +429,20 @@ void dAcBoomerang_c::initializeState_Move() {
|
||||
|
||||
mOldPosition = position;
|
||||
mOldPosition.y += 60.f;
|
||||
|
||||
field_0x8BC = dPad::ex_c::m_current_ex->mMPLS.getVerticalAngle();
|
||||
field_0x8BA = dPad::ex_c::m_current_ex->mMPLS.getHorizontalAngle();
|
||||
field_0x8B8 = daPlayerActBase_c::fn_8005BAA0();
|
||||
|
||||
// TODO regswap
|
||||
field_0x8BE = angle.x - dPad::ex_c::m_current_ex->mMPLS.getVerticalAngle();
|
||||
|
||||
field_0x8E4.fromXY(angle.x, angle.y, forwardSpeed);
|
||||
|
||||
playSound(SE_BE_THROW);
|
||||
dJEffManager_c::spawnUIEffect(PARTICLE_RESOURCE_ID_MAPPING_3_, mVec3_c::Zero, nullptr, nullptr, nullptr, nullptr);
|
||||
field_0x8F0 = mVec3_c::Zero;
|
||||
field_0x8D4 = 0.0f;
|
||||
}
|
||||
void dAcBoomerang_c::executeState_Move() {}
|
||||
void dAcBoomerang_c::finalizeState_Move() {}
|
||||
@@ -488,7 +503,7 @@ int dAcBoomerang_c::actorExecute() {
|
||||
unsetField_0x8CC(FLAG_REQUEST_0x400);
|
||||
}
|
||||
|
||||
if (dAcPy_c::GetLink2()->checkModelUpdateFlag(0x10000 | 0x80)) {
|
||||
if (player->checkModelUpdateFlag(0x10000 | 0x80)) {
|
||||
deleteRequest();
|
||||
unsetField_0x8CC(FLAG_REQUEST_0x400);
|
||||
return SUCCEEDED;
|
||||
|
||||
Reference in New Issue
Block a user