intial progress

This commit is contained in:
elijah-thomas774
2025-05-26 22:12:25 -04:00
parent 01839e716f
commit 00a4d0a166
15 changed files with 421 additions and 60 deletions
+74 -10
View File
@@ -5,30 +5,35 @@
#include "d/a/d_a_base.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/bg/d_bg_s_acch.h"
#include "d/col/bg/d_bg_s_lin_chk.h"
#include "d/col/cc/d_cc_d.h"
#include "d/d_shadow.h"
#include "d/lyt/d_lyt_fader.h"
#include "m/m3d/m_anmchr.h"
#include "m/m3d/m_anmchrblend.h"
#include "m/m3d/m_mdl.h"
#include "m/m3d/m_proc.h"
#include "m/m_color.h"
#include "m/m_fader.h"
#include "m/m_vec.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "rvl/GX/GXTypes.h"
#include "s/s_State.hpp"
#include "toBeSorted/actor_event.h"
#include "toBeSorted/d_emitter.h"
class dAcBoomerangProcBase_c : public m3d::proc_c {
public:
~dAcBoomerangProcBase_c() {}
};
class dAcBoomerangProc_c : public dAcBoomerangProcBase_c {
class dAcBoomerangProc_c : public d3d::UnkProc {
public:
dAcBoomerangProc_c() : mColor0(0), mColor1(0xFFFFFFFF) {}
~dAcBoomerangProc_c() {}
bool create(m3d::mdl_c *mdl, mColor clr, int prioOpa, mAllocator_c *alloc);
bool create2(m3d::mdl_c *mdl, mColor clr, int prioOpa, mAllocator_c *alloc) {
return create(mdl, clr, prioOpa, alloc);
}
virtual void drawOpa() override;
private:
mColor mColor0;
mColor mColor1;
};
@@ -60,6 +65,14 @@ public:
STATE_FUNC_DECLARE(dAcBoomerang_c, EventReturnWait);
public: // TYPES
enum Variant_e {
NONE,
BEETLE,
HOOK_BEETLE,
QUICK_BEETLE,
TOUGH_BEETLE,
};
struct ChrAnimation_t {
const char *mName;
f32 mRate;
@@ -75,22 +88,66 @@ public: // TYPES
};
static const ChrAnimation_t sChrAnims[RB_MAX];
enum ModelType_e {
MDL_WINGS_BASIC = 0,
MDL_BODY_BASIC = 1,
MDL_MOUTH_BASIC = 2,
MDL_MOUTH_HOOK = 3,
MDL_MOTTH_ADV = MDL_MOUTH_HOOK, // Just for naming :P
MDL_BODY_ADV = 4,
MDL_WINGS_ADV = 5,
};
// Macros until enum is solidified
#define FLAG_BOOMERANG_CANCEL (0x3)
#define FLAG_BOOMERANG_RUMBLE_ACTIVE (0x4000)
public: // INLINES
bool checkField_0x8CC(u32 mask) {
bool checkField_0x8CC(u32 mask) const {
return field_0x8CC & mask;
}
void onField_0x8CC(u32 mask) {
field_0x8CC |= mask;
}
bool isMoving() {
return mStateMgr.isState(StateID_Move);
}
public: // FUNCTIONS
void areaCallback(mVec3_c *param1, u32 param2);
void atHitCallback(cCcD_Obj *i_objInfA, dAcObjBase_c *i_actorB, cCcD_Obj *i_objInfB);
/** hides the given shape within the resfile. Ref Brawlcrate's 'polygon#' in the mdl0/Object folder */
void hideModel(ModelType_e type);
/** ?? */
void deleteCheck();
/** ?? Retrieve Beetle */
void retrieve();
/** Attempts to grab ahold of the object upon collision. Called from atHitCallback if type > Hook beetle */
bool tryGrabObject(dAcObjBase_c *pObject);
/** Sets the room id of the beetle. Sets to links room id or the room id of the collision its around */
void setRoomId();
/** Updates the position based on where links wrist is */
void placeOnArm();
/** Sets the assuming bonk flag and plays the rumble feedback */
void bonk();
/** Applies the selected animation to the beetle */
void setChrAnimation(ChrAnimation_e requestedAnimation);
private:
/* 0x0330 */ nw4r::g3d::ResFile mResFile;
/* 0x0334 */ m3d::mdl_c mMdl;
/* 0x0358 */ m3d::anmChrBlend_c mAnmChrBlend;
/* 0x0380 */ m3d::anmChr_c mAnmChr[2];
#define BOOMERANG_ANIM_PINCERS (0)
#define BOOMERANG_ANIM_WINGS (1)
/* 0x0380 */ m3d::anmChr_c mAnmChr[2]; /* 0 - Pincers, 1 - Wings*/
/* 0x03F0 */ dAcBoomerangProc_c mProc;
/* 0x0410 */ dShadowCircle_c mShadow;
/* 0x0418 */ dAcRef_c<dAcObjBase_c> mGrabbedActor;
@@ -105,7 +162,9 @@ private:
/* 0x08B7 */ u8 mRightWingNodeID;
/* 0x08B8 */ u8 _0x8B8[0x8CC - 0x8B8];
/* 0x08B8 */ u32 field_0x8CC;
/* 0x08D0 */ u8 _0x8D0[0x8FC - 0x8D0];
/* 0x08D0 */ u8 _0x8D0[0x8D8 - 0x8D0];
/* 0x08D8 */ mVec3_c field_0x8D8;
/* 0x08E4 */ u8 _0x8E4[0x8FC - 0x8E4];
/* 0x08FC */ dCcD_Sph mSph0;
/* 0x0A4C */ dCcD_Sph mSph1;
/* 0x0B9C */ EffectsStruct mEff0;
@@ -113,8 +172,13 @@ private:
/* 0x0C04 */ EffectsStruct mEff2;
/* 0x0C38 */ EffectsStruct mEff3;
/* 0x0C6C */ dLytFader_c mLytFader;
/* 0x114C */ u8 _0x114C[0x115C - 0x114C];
/* 0x114C */ mFader_c mFader;
/* 0x1150 */ u8 _0x1150[0x115C - 0x1150];
/* 0x115C */ STATE_MGR_DECLARE(dAcBoomerang_c);
static dCcD_SrcSph sSphSrc;
static dBgS_BeetleLinChk sLinChk;
static const u32 sSrcAtType;
};
#endif