mirror of
https://github.com/zeldaret/ss
synced 2026-09-04 02:09:59 -04:00
fi_context OK (also cleanup dFlow_c)
This commit is contained in:
@@ -171,7 +171,7 @@ protected:
|
||||
void setNext(u16 next);
|
||||
void setField0x3C();
|
||||
bool checkField0x3C() const;
|
||||
bool shouldActorShowKillCount(s32 id) const;
|
||||
bool shouldHideKillCountForActor(s32 id) const;
|
||||
static void playSound(u32);
|
||||
void createLytMiniGame();
|
||||
void clearMinigame();
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_itembase.h"
|
||||
|
||||
s32 summarizePouchContents(s32 *, s32 *, s32 *);
|
||||
|
||||
u32 convertFilePouchSlot(s32 fileSlot);
|
||||
s32 convertLytPouchSlot(s32 fileSlot);
|
||||
s32 getPouchSlotCount(bool unk);
|
||||
|
||||
@@ -421,6 +421,22 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static f32 getShieldLevel() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMain.mShield.getLevel();
|
||||
} else {
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
static f32 getShieldGaugePercentMaybe() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMain.mShield.getGaugePercentMaybe();
|
||||
} else {
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x00004 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x00374 */ dLytMeterEventSkip_c *mpEventSkip;
|
||||
|
||||
@@ -95,7 +95,7 @@ private:
|
||||
/* 0x420 */ dLytMeterCrossBtnParts_c mParts[4];
|
||||
/* 0x620 */ s32 field_0x620;
|
||||
/* 0x624 */ s32 field_0x624;
|
||||
/* 0x628 */ u16 field_0x628;
|
||||
/* 0x628 */ u16 mSavedFiFlow;
|
||||
/* 0x62C */ s32 mCallCount0;
|
||||
/* 0x630 */ s32 mCallCount1;
|
||||
/* 0x634 */ u8 field_0x634;
|
||||
|
||||
@@ -43,6 +43,10 @@ public:
|
||||
return field_0x31D;
|
||||
}
|
||||
|
||||
f32 getLevel() const {
|
||||
return field_0x2F0;
|
||||
}
|
||||
|
||||
private:
|
||||
s32 getLytFrameForShield(s32) const;
|
||||
void setLevel(f32 level);
|
||||
|
||||
@@ -3,40 +3,65 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
struct FiAnalysisEntry {
|
||||
/* 0x00 */ const char *mStageName;
|
||||
/* 0x04 */ u16 mStoryFlag;
|
||||
/* 0x06 */ s16 mKen3MonsterPresenceEntry;
|
||||
/* 0x08 */ u8 mSuitabilityPercent[4];
|
||||
/* 0x0C */ u16 mKen3SuitabilityAnalysis[4];
|
||||
/* 0x14 */ s16 mShieldType;
|
||||
/* 0x16 */ s16 mShieldMessage;
|
||||
};
|
||||
struct AnalysisEntry;
|
||||
|
||||
class FiAnalysisHandle {
|
||||
public:
|
||||
FiAnalysisHandle(AnalysisEntry *entry) : mpEntry(entry) {}
|
||||
s16 getEquipmentFocus() const;
|
||||
s16 getAreaIndexForFiAreaName() const;
|
||||
s32 getSuitabilityArg() const;
|
||||
s16 getSuitabilityLabel() const;
|
||||
s32 getSuitabilityPercentageArg() const;
|
||||
s16 getEquipmentRecommendation() const;
|
||||
s16 getShieldMessage();
|
||||
s16 shieldRelated();
|
||||
s16 getThreatenedShield();
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
private:
|
||||
FiAnalysisEntry *mpEntry;
|
||||
enum FiAnalysisEquipmentFocus_e {
|
||||
FOCUS_COMBAT,
|
||||
FOCUS_SURVIVAL,
|
||||
FOCUS_TREASURE,
|
||||
FOCUS_BALANCED,
|
||||
};
|
||||
|
||||
static FiAnalysisEquipmentFocus_e getCurrentFocus();
|
||||
|
||||
AnalysisEntry *mpEntry;
|
||||
};
|
||||
|
||||
class FiContext {
|
||||
public:
|
||||
enum KEN8_Button_e {
|
||||
KEN8_Summary = 0,
|
||||
KEN8_Hint = 1,
|
||||
KEN8_Objective = 2,
|
||||
KEN8_Analysis = 3,
|
||||
KEN8_PlayTime = 4,
|
||||
KEN8_Rumors = 5,
|
||||
KEN8_Other = 6,
|
||||
KEN8_Nevermind = 7,
|
||||
KEN8_Advice = 9,
|
||||
KEN8_None = 10,
|
||||
};
|
||||
|
||||
static void create();
|
||||
static void initialize(void *data);
|
||||
static s32 getGlobalFiInfo0(s32);
|
||||
static FiAnalysisHandle getNaviTableEquipmentCheckEntry();
|
||||
static u8 rateBattlePerformance(u8 enemyActorId);
|
||||
|
||||
/** KEN0 - player progress */
|
||||
static s16 getNaviTableProgressSummary();
|
||||
/** KEN1 - hint */
|
||||
static s16 getFiAdviceHintEntry();
|
||||
static s16 getUnkObjectiveValue();
|
||||
/** KEN2 - objective */
|
||||
static s16 getObjective();
|
||||
/* KEN3 - analysis*/
|
||||
static FiAnalysisHandle getNaviTableEquipmentCheckEntry();
|
||||
|
||||
static s32 setTargetedActorTextId(s32 id);
|
||||
|
||||
static u16 prepareFiHelpIndex();
|
||||
|
||||
bool getDoSpecialFiMenuHandling() const {
|
||||
return mDoSpecialFiMenuHandling;
|
||||
@@ -57,25 +82,49 @@ public:
|
||||
}
|
||||
|
||||
static const wchar_t *getMessageForFiInfo(s32 arg) {
|
||||
return getTextMessage(getGlobalFiInfo0(arg));
|
||||
return getButtonText(getGlobalFiInfo0(arg));
|
||||
}
|
||||
|
||||
static FiContext *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static bool getField_0x47() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x47;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void setField_0x48(bool val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->field_0x48 = val;
|
||||
}
|
||||
}
|
||||
|
||||
static bool getField_0x48() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x48;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void setField_0x4A(bool val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->field_0x4A = val;
|
||||
}
|
||||
}
|
||||
|
||||
static bool getField_0x4A() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x4A;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getHelpIndex() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mFiHelpIndex;
|
||||
@@ -92,9 +141,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CB00(s32 arg) {
|
||||
static void do_setAdviceOptions(s32 arg) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CB00(arg);
|
||||
sInstance->setAdviceOptions(arg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,34 +153,53 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CA00() {
|
||||
static void do_prepareFiCallOptions() {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CA00();
|
||||
sInstance->prepareFiCallOptions();
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CB20() {
|
||||
static void do_resetAdviceOptions() {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CB20();
|
||||
sInstance->resetAdviceOptions();
|
||||
}
|
||||
}
|
||||
|
||||
void resetField_0x3C();
|
||||
void reset();
|
||||
void resetSaveTimeRelated();
|
||||
void setAdviceOptions(s32 unused);
|
||||
void resetAdviceOptions();
|
||||
|
||||
static const wchar_t *getTextMessage(s32 idx);
|
||||
static const wchar_t *getButtonText(s32 idx);
|
||||
|
||||
private:
|
||||
static void setTargetActorId(s32 id) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mTargetActorId = id;
|
||||
}
|
||||
}
|
||||
|
||||
static void setHelpIndex(s32 idx) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mFiHelpIndex = idx;
|
||||
}
|
||||
}
|
||||
|
||||
static FiContext *sInstance;
|
||||
|
||||
void fn_8016CB00(s32);
|
||||
void fn_8016CB40();
|
||||
void fn_8016CA00();
|
||||
void fn_8016CB20();
|
||||
void prepareFiCallOptions();
|
||||
bool isInLeviasFightMaybe();
|
||||
|
||||
/* 0x00 */ u8 _0x00[0x34 - 0x00];
|
||||
/* 0x00 */ s32 mFiButtonOptions[10]; // correspond to KEN8 with an offset of +1
|
||||
/* 0x28 */ s32 field_0x28;
|
||||
/* 0x2C */ s32 field_0x2C;
|
||||
/* 0x30 */ s32 field_0x30;
|
||||
/* 0x34 */ s32 mTargetActorId;
|
||||
/* 0x38 */ s32 mFiHelpIndex;
|
||||
/* 0x3C */ u8 _0x3C[0x48 - 0x3C];
|
||||
/* 0x3C */ u8 mSaveTimeRelated;
|
||||
/* 0x3D */ u8 field_0x3D[10];
|
||||
/* 0x47 */ bool field_0x47;
|
||||
/* 0x48 */ bool field_0x48;
|
||||
/* 0x49 */ bool field_0x49;
|
||||
/* 0x4A */ bool field_0x4A;
|
||||
|
||||
@@ -108,9 +108,9 @@ public:
|
||||
/* 8000AAA0 */ void initFile(int fileNum);
|
||||
|
||||
/* 8000ABD0 */ void setCurrentHealthCapacity(s16 health);
|
||||
/* 8000AC00 */ s16 getCurrentHealthCapacity();
|
||||
/* 8000AC00 */ u16 getCurrentHealthCapacity();
|
||||
/* 8000AC50 */ void setCurrentHealth(s16 health);
|
||||
/* 8000AC80 */ s16 getCurrentHealth();
|
||||
/* 8000AC80 */ u16 getCurrentHealth();
|
||||
|
||||
/* 8000ACD0 */ u16 getLoadRoomT1();
|
||||
/* 8000AD20 */ u16 getLoadRoomT2();
|
||||
|
||||
@@ -13,6 +13,10 @@ public:
|
||||
return field_0x08;
|
||||
}
|
||||
|
||||
s64 getField_0x30() const {
|
||||
return field_0x30;
|
||||
}
|
||||
|
||||
s64 fn_801907D0();
|
||||
void fn_801907F0();
|
||||
void fn_801909A0();
|
||||
@@ -21,7 +25,9 @@ private:
|
||||
static SaveTimeRelated *sInstance;
|
||||
|
||||
/* 0x00 */ u8 _0x00[0x08 - 0x00];
|
||||
/* 0x08 */ u64 field_0x08;
|
||||
/* 0x08 */ s64 field_0x08;
|
||||
/* 0x10 */ u8 field_0x10[0x30 - 0x10];
|
||||
/* 0x30 */ s64 field_0x30;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user