Tubo! (d_a_obj_tubo) (#95)

* begin work

* fixup modifications to d_a_base header

* progress

* update from main again (forgor to fetch)

* progress

* Basically done

* clean up some inlines

* some at/tg hit typing and tubo naming

* more naming
This commit is contained in:
Elijah Thomas
2024-11-12 22:30:01 -05:00
committed by GitHub
parent 9525f8e9e5
commit 2ecf6509dd
43 changed files with 1335 additions and 193 deletions
+27 -1
View File
@@ -23,7 +23,7 @@ public:
void remove(bool);
void fn_80029929(u16 effect, mVec3_c *pos, void *, void *, void *, void *);
void setMtx(const mMtx_c&);
void setMtx(const mMtx_c &);
bool checkField0x00() const {
return field_0x00 != 0;
@@ -35,4 +35,30 @@ private:
u8 field_0x2C[0x34 - 0x2C];
};
// Not sure if these belongs here, but it uses EffectsStruct
// Related Functions in the 8002B100 area
class EffectsStruct_Ext {
public:
EffectsStruct_Ext() : mField_0x00(1), mField_0x01(0) {}
void init(dBase_c *, f32, f32, f32);
void setField_0x00(u8 val) {
mField_0x00 = val;
}
void setField_0x01(u8 val) {
mField_0x01 = val;
}
void fn_8002B120(f32, f32);
/* 0x00 */ u8 mField_0x00;
/* 0x01 */ u8 mField_0x01;
/* 0x04 */ f32 mField_0x04;
/* 0x08 */ f32 mField_0x08;
/* 0x0C */ f32 mField_0x0C;
/* 0x10 */ EffectsStruct mEff;
virtual ~EffectsStruct_Ext() {}
};
#endif
+15 -2
View File
@@ -2,6 +2,8 @@
#ifndef EVENT_MANAGER_H
#define EVENT_MANAGER_H
#include "common.h"
#include "sized_string.h"
#include "toBeSorted/event.h"
class dAcBase_c;
@@ -21,9 +23,20 @@ public:
return isInEvent() && sInstance != nullptr && sInstance->mState != 7;
}
static const char *getCurrentEventName() {
return isInEvent() ? sInstance->mCurrentEvent.eventName : nullptr;
}
static bool isCurrentEvent(const char *name) {
return strequals(getCurrentEventName(), name);
}
private:
u8 field_0x000[0x184 - 0x000];
int mState;
/* 0x000 */ u8 _000[0x084 - 0x000];
/* 0x084 */ Event mCurrentEvent;
/* 0x0C4 */ u8 _0C4[0x184 - 0x0C4];
/* 0x184 */ int mState;
/* 0x18C */ u8 _18C[0x19C - 0x18C];
};
#endif
@@ -5,6 +5,24 @@
#include "m/m_angle.h"
#include "m/m_vec.h"
enum SpecialItemDropTable {
SPECIAL_ITEM_0 = 0,
SPECIAL_ITEM_1,
SPECIAL_ITEM_2,
SPECIAL_ITEM_3,
SPECIAL_ITEM_4,
SPECIAL_ITEM_5,
SPECIAL_ITEM_6,
SPECIAL_ITEM_7,
SPECIAL_ITEM_8,
SPECIAL_ITEM_9,
SPECIAL_ITEM_10,
SPECIAL_ITEM_11,
SPECIAL_ITEM_12,
SPECIAL_ITEM_13,
// ...
};
class SpecialItemDropMgr {
public:
static SpecialItemDropMgr *sInstance;
+1
View File
@@ -37,6 +37,7 @@ struct TimeAreaStruct {
/* 0x08 */ u8 field_0x08;
bool isNearZero() {
// is cM3d_IsZero
return fabsf(field_0x00) <= FLT_EPSILON;
}