d_lyt_meter_ganbari_gauge OK

This commit is contained in:
robojumper
2025-04-17 15:47:43 +02:00
parent eb32c18c39
commit 563e5535c7
10 changed files with 419 additions and 60 deletions
+14 -1
View File
@@ -11,6 +11,7 @@
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "toBeSorted/file_manager.h"
class dAcPy_c : public dAcObjBase_c {
// See Below for some info
@@ -145,7 +146,7 @@ public:
/* vt 0x1B4 */ virtual void isByte0x434eEqual7();
/* vt 0x1B8 */ virtual void canHandleGameOver();
/* vt 0x1BC */ virtual void vt_0x1BC();
/* vt 0x1C0 */ virtual void vt_0x1C0();
/* vt 0x1C0 */ virtual void *vt_0x1C0() const;
/* vt 0x1C4 */ virtual void getActorInActorRef1();
/* vt 0x1C8 */ virtual void doesActorRef1Exist();
/* vt 0x1CC */ virtual void unlinkActorRef1();
@@ -297,6 +298,18 @@ public:
return mRidingActorType;
}
inline bool hasvt_0x1C0() const {
return vt_0x1C0() != nullptr;
}
inline bool isAffectedByStaminaPotion() const {
return FileManager::GetInstance()->hasStaminaPotionNormal() && getRidingActorType() != 3;
}
inline bool isAffectedByStaminaPotionPlus() const {
return FileManager::GetInstance()->hasStaminaPotionPlus() && getRidingActorType() != 3;
}
static nw4r::g3d::ResFile getItemResFile(const char *name, mAllocator_c &allocator);
static const dAcPy_c *GetLink() {
+16 -4
View File
@@ -2,17 +2,29 @@
#define D_CAMERA_H
#include "d/d_base.h"
#include "m/m_vec.h"
extern "C" bool fn_80081FE0(void*, const char *);
extern "C" bool fn_80081FE0(void *, const char *);
class dCamera_c : public dBase_c {
public:
/* 0x068 */ u8 _0x068[0xD98 - 0x068];
/* 0xD98 */ void *field_0xD98;
bool isCurrentTrend(const char *name) const {
return fn_80081FE0(field_0xD98, name);
}
void *getField_0xD98() const {
return field_0xD98;
}
const mVec3_c &getPositionMaybe() const {
return mPositionMaybe;
}
private:
/* 0x068 */ u8 _0x068[0x6C - 0x068];
/* 0x06C */ mVec3_c mPositionMaybe;
/* 0x078 */ u8 _0x078[0xD98 - 0x078];
/* 0xD98 */ void *field_0xD98;
};
#endif
@@ -25,11 +25,17 @@ public:
virtual ~dLytMeterGanbariGauge_c() {}
bool fn_80104760() const;
private:
void realizeAnimState();
static bool isStaminaLow(f32);
static bool isStaminaCritical(f32);
bool fn_80104710(bool) const;
bool isCrawling() const;
static bool swimmingRelated();
static bool fn_801034B0(f32);
static bool fn_80103520(f32);
bool fn_801047B0() const;
bool displayAirInsteadOfStamina();
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, InvisibleWait);
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, In);
@@ -57,18 +63,18 @@ private:
/* 0x524 */ mVec3_c field_0x524;
/* 0x530 */ u8 field_0x530;
/* 0x534 */ s32 field_0x534;
/* 0x538 */ u32 field_0x538;
/* 0x538 */ s32 field_0x538;
/* 0x53C */ s32 mOutWaitTimer;
/* 0x540 */ u32 field_0x540;
/* 0x544 */ u32 field_0x544;
/* 0x548 */ u32 field_0x548;
/* 0x540 */ s32 field_0x540;
/* 0x544 */ s32 field_0x544;
/* 0x548 */ s32 field_0x548;
/* 0x54C */ f32 field_0x54C;
/* 0x550 */ f32 field_0x550;
/* 0x554 */ f32 field_0x554;
u8 field_0x558;
u8 field_0x559;
u8 field_0x55A;
bool field_0x55A;
u8 field_0x55B;
};
+4
View File
@@ -262,6 +262,10 @@ public:
mVec2_c(const mVec2_c &other) {
set(other.x, other.y);
}
mVec2_c(f32 fx, f32 fy) {
set(fx, fy);
}
};
#endif
+16
View File
@@ -293,6 +293,22 @@ public:
return getGuardianPotionTimer() != 0;
}
bool hasAirPotionPlus() const {
return getAirPotionPlusTimer() != 0;
}
bool hasAirPotionNormal() const {
return getAirPotionTimer() != 0;
}
bool hasStaminaPotionPlus() const {
return getStaminaPotionPlusTimer() != 0;
}
bool hasStaminaPotionNormal() const {
return getStaminaPotionTimer() != 0;
}
private:
static FileManager *sInstance;
};