dAcTbox 92%

This commit is contained in:
robojumper
2024-11-22 17:12:17 +01:00
parent ca36a0123c
commit e1d5f5b22f
14 changed files with 587 additions and 122 deletions
+4
View File
@@ -59,6 +59,10 @@ public:
static bool isKeyPiece(ITEM_ID item);
static bool isTreasure(ITEM_ID item);
static bool getItemGetEventName(u16 item, const char **outName);
static void itemGetEventStart(dAcBase_c *);
static void itemGetEventEnd(dAcBase_c *);
private:
/* 0x334 */ UNKTYPE *mpMdl; // Model has its own handling system
/* 0x338 */ dShadowCircle_c mShdw;
+1 -1
View File
@@ -112,7 +112,7 @@ public:
/* vt 0x15C */ virtual void vt_0x15C();
/* vt 0x160 */ virtual void vt_0x160();
/* vt 0x164 */ virtual void vt_0x164();
/* vt 0x168 */ virtual void getCurrentAnimFrame();
/* vt 0x168 */ virtual f32 getCurrentAnimFrame() const;
/* vt 0x16C */ virtual void getFloatIfStruggling();
/* vt 0x170 */ virtual void isSwimming();
/* vt 0x174 */ virtual void isGustBellowsBeingBlown();
+23 -36
View File
@@ -7,6 +7,7 @@
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/bg/d_bg_w.h"
#include "d/col/cc/d_cc_d.h"
#include "d/d_cc.h"
#include "d/d_shadow.h"
#include "m/m3d/m_anmchr.h"
#include "m/m3d/m_anmmatclr.h"
@@ -23,30 +24,6 @@
#include "toBeSorted/dowsing_target.h"
#include "toBeSorted/stage_render_stuff.h"
// Somewhere in d_cc
class dAcTboxCcD : public dCcD_Unk {
public:
dAcTboxCcD() : mpList(nullptr), field_0x210(this) {}
virtual ~dAcTboxCcD() {
if (mpList != nullptr) {
mpList->remove(&mNode);
mpList = nullptr;
}
}
/* 0x00 */ cListNd_c mNode;
/* 0x08 */ dCcD_Unk *field_0x210;
/* 0x0C */ cListMg_c *mpList;
};
struct TboxAndMoreUnkCC {
cListMg_c mList;
virtual ~TboxAndMoreUnkCC();
void addCc(dAcTboxCcD &ccD, const dCcD_SrcUnk &src);
void SetStts(cCcD_Stts &stts);
void registerColliders();
};
class dAcTbox_c : public dAcObjBase_c {
public:
enum TboxVariant_e {
@@ -68,6 +45,7 @@ public:
virtual void registerInEvent() override;
virtual void unkVirtFunc_0x6C() override;
virtual void doInteraction(s32) override;
virtual void *getObjectListEntry() override;
@@ -115,19 +93,23 @@ private:
void noRegisterDowsing();
void noUnregisterDowsing();
static bool fn_80268660(int arg);
bool checkForLinkBonk();
void fn_8026E630();
bool fn_8026D540();
bool fn_8026D3C0();
void fn_8026D3C0();
void syncScaleToMdl(m3d::scnLeaf_c *lf);
void getCCBounds(mVec3_c *out1, mVec3_c *out2) const;
void getCylParams(mVec3_c *out1, f32 *out2, f32 *out3) const;
void fn_8026DAD0(mVec3_c *src, mVec3_c *dest) const;
void fn_8026DAC0(mAng& ang);
void fn_8026DAD0(const mVec3_c *src, mVec3_c *dest) const;
void fn_8026DAC0(mAng &ang);
static bool hasCollectedAllTears();
static bool isValidVariant(int variant);
static bool tryGetDowsingTargetOffset(int variant, mVec3_c &out);
static void getDowsingTargetOffset(int variant, mVec3_c &out);
static bool isValidGroupIndex(int idx);
static bool getGroundHeight(f32 *height, const mVec3_c &pos);
static bool isBelowGroundAtPos(f32 height, const mVec3_c &pos);
void setActionState();
@@ -137,9 +119,14 @@ private:
void fn_8026D130();
void fn_8026D140();
void fn_8026D950();
void fn_8026D370();
bool checkShouldClose();
void setShouldCloseFlag();
void unsetShouldCloseFlag();
void setTboxFlag();
bool checkIsClear() const;
static bool fn_802686F0(const mVec3_c &vec, f32 y);
const InteractionTargetDef &getInteractionTargetDef() const;
/* 0x0330 */ m3d::mdlAnmChr mMdl1;
@@ -161,9 +148,9 @@ private:
s32 field_0x4F4;
/* 0x04F8 */ dBgW mBgWs[2];
/* 0x0918 */ dAcTboxCcD mCcD1;
/* 0x0B30 */ dAcTboxCcD mCcD2;
/* 0x0D48 */ TboxAndMoreUnkCC field_0x0D48;
/* 0x0918 */ LinkedCollider mCcD1;
/* 0x0B30 */ LinkedCollider mCcD2;
/* 0x0D48 */ ColliderLinkedList field_0x0D48;
/* 0x0D54 */ dCcD_Unk mCcD3;
/* 0x0F5C */ dCcD_Cyl mCcD4;
/* 0x10AC */ STATE_MGR_DECLARE(dAcTbox_c);
@@ -184,19 +171,19 @@ private:
/* 0x11E4 */ u8 field_0x11E4[0x11E8 - 0x11E4];
/* 0x11E8 */ f32 field_0x11E8;
/* 0x11EC */ f32 field_0x11EC;
/* 0x11F0 */ UNKWORD field_0x11F0;
/* 0x11F4 */ UNKWORD field_0x11F4;
/* 0x11F8 */ UNKWORD field_0x11F8;
/* 0x11FC */ UNKWORD field_0x11FC;
/* 0x1200 */ u16 mItemId;
/* 0x1202 */ u16 mItemModelIdx;
/* 0x1204 */ bool mHasBeenOpened;
/* 0x1205 */ u8 mSpawnSceneFlag;
/* 0x1206 */ u8 mSetSceneFlag; // set when?
+32
View File
@@ -0,0 +1,32 @@
#ifndef D_CC_H
#define D_CC_H
#include "c/c_list.h"
#include "d/col/c/c_cc_d.h"
#include "d/col/cc/d_cc_d.h"
// Somewhere in d_cc
class LinkedCollider : public dCcD_Unk {
public:
LinkedCollider() : mpList(nullptr), field_0x210(this) {}
virtual ~LinkedCollider() {
if (mpList != nullptr) {
mpList->remove(&mNode);
mpList = nullptr;
}
}
/* 0x00 */ cListNd_c mNode;
/* 0x08 */ dCcD_Unk *field_0x210;
/* 0x0C */ cListMg_c *mpList;
};
struct ColliderLinkedList {
cListMg_c mList;
virtual ~ColliderLinkedList();
void addCc(LinkedCollider &ccD, const dCcD_SrcUnk &src);
void SetStts(cCcD_Stts &stts);
void registerColliders();
};
#endif
+1 -1
View File
@@ -21,7 +21,7 @@ public:
virtual ~TBoxflagManager() {}
void init();
void copyFromSave(u32 sceneIndex);
bool checkFlag(u16 sceneIndex, u16 flag);
u16 checkFlag(u16 sceneIndex, u16 flag);
virtual u16 getFlagCount() const;
void setFlag(u16 flag);
bool checkUncommittedFlag(u16 sceneIndex, u16 flag);
@@ -0,0 +1,27 @@
#ifndef BLUR_AND_PALETTE_MANAGER_H
#define BLUR_AND_PALETTE_MANAGER_H
#include "common.h"
#include "m/m_vec.h"
class BlurAndPaletteManager {
public:
static BlurAndPaletteManager &GetInstance() {
return sInstance;
}
void fn_800247D0(mVec3_c, f32);
void fn_80022AF0(f32);
void setField_0x2F20(f32 arg) {
field_0x2F20 = arg;
}
void fn_800223A0(void *);
void fn_80022440(void *);
private:
u8 field_0x0000[0x2F20 - 0x0000];
f32 field_0x2F20;
static BlurAndPaletteManager sInstance;
};
#endif
+1 -1
View File
@@ -16,4 +16,4 @@ public:
u16 counterId;
};
#endif COUNTER_H
#endif
@@ -0,0 +1,19 @@
#ifndef GODDESS_CHEST_COUNTER_H
#define GODDESS_CHEST_COUNTER_H
#include "toBeSorted/counters/counter.h"
class GoddessChestCounter : public Counter {
public:
GoddessChestCounter() : Counter(0x43F) {}
virtual ~GoddessChestCounter() {};
virtual u16 getCommittedValue() override;
virtual u16 getMax() override;
virtual u16 getUncommittedValue() override;
virtual void setValue(u16 num) override;
static GoddessChestCounter sInstance;
};
#endif
+2 -1
View File
@@ -16,8 +16,9 @@ public:
public:
/** 0x800A0C40 */
Event(char *eventName, u32 unk, u32 eventFlags, void *callback1, void *callback2);
Event(const char *eventName, u32 unk, u32 eventFlags, void *callback1, void *callback2);
Event(u32 eventId, s32 roomId, u32 eventFlags, void *callback1, void *callback2);
Event(const char *eventName, void *zevDat, u32 unk, u32 eventFlags, void *callback1, void *callback2);
/** 0x800A1240 */
virtual ~Event();
};
+1
View File
@@ -12,6 +12,7 @@ class EventManager {
public:
static bool isInEvent(dAcBase_c *actor, const char *eventName);
static bool finishEvent(dAcBase_c *actor, const char *eventName);
static void changeOwnEvent(dAcBase_c *actor1, dAcBase_c *actor2, Event *event, UNKWORD);
static bool alsoSetAsCurrentEvent(dAcBase_c *actor, Event *event, void *unknown);
static EventManager *sInstance;