mirror of
https://github.com/zeldaret/ss
synced 2026-07-02 20:15:56 -04:00
d_message OK (via dFlow_c)
This commit is contained in:
@@ -47,6 +47,8 @@ public:
|
||||
static void spawnItem(u16 item, u32 room, const mVec3_c &pos, const mAng3_c &rot, u32 params, u32 arg);
|
||||
static void spawnDrop(u16 item, u32 room, const mVec3_c &pos, const mAng3_c &rot);
|
||||
static u32 checkFlag(u32 flag);
|
||||
static void setFlag(s32 id);
|
||||
|
||||
void setItemPosition(const mVec3_c &);
|
||||
void getItemFromBWheelItem();
|
||||
bool isStateWait();
|
||||
@@ -59,6 +61,9 @@ public:
|
||||
static s32 getTotalSeedCapacity();
|
||||
static s32 getTotalArrowCapacity();
|
||||
|
||||
static s32 getRupeeCounter();
|
||||
static u32 getCurrentWalletCapacity();
|
||||
|
||||
static u32 getKeyPieceCount();
|
||||
static u32 getSmallKeyCount();
|
||||
|
||||
@@ -70,6 +75,8 @@ public:
|
||||
static void itemGetEventStart(dAcBase_c *);
|
||||
static void itemGetEventEnd(dAcBase_c *);
|
||||
|
||||
static void addRupees(s32 amount);
|
||||
|
||||
enum Trial_e {
|
||||
TRIAL_SKYLOFT,
|
||||
TRIAL_FARON,
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
/* vt 0x1A4 */ virtual void vt_0x1A4();
|
||||
/* vt 0x1A8 */ virtual void vt_0x1A8();
|
||||
/* vt 0x1AC */ virtual void vt_0x1AC();
|
||||
/* vt 0x1B0 */ virtual void isItemFairyFromBugnet();
|
||||
/* vt 0x1B0 */ virtual bool isItemFairyFromBugnet();
|
||||
/* vt 0x1B4 */ virtual void isByte0x434eEqual7();
|
||||
/* vt 0x1B8 */ virtual void canHandleGameOver();
|
||||
/* vt 0x1BC */ virtual void vt_0x1BC();
|
||||
@@ -338,6 +338,7 @@ public:
|
||||
static s32 getCurrentSlingshotType();
|
||||
static s32 getCurrentBeetleType();
|
||||
static s32 getCurrentBugNetType();
|
||||
static s32 getCurrentlyEquippedShieldType();
|
||||
|
||||
static bool isItemRestrictedByBokoBase(ITEM_ID item);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ private:
|
||||
m3d::smdl_c mMdl;
|
||||
STATE_MGR_DECLARE(dAcOtoD3StoneFigure_c);
|
||||
dCcD_Cyl mCollision;
|
||||
s8 mExitId;
|
||||
u8 mExitId;
|
||||
bool mIsSkyKeepAlreadyOpen;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "m/m_vec.h"
|
||||
|
||||
extern "C" bool fn_80081FE0(void *, const char *);
|
||||
extern "C" bool fn_800918E0(void *, s32, s16);
|
||||
|
||||
class dCamera_c : public dBase_c {
|
||||
public:
|
||||
@@ -20,11 +21,17 @@ public:
|
||||
return mPositionMaybe;
|
||||
}
|
||||
|
||||
bool doFn_800918E0(s32 a1, s16 a2) {
|
||||
return fn_800918E0(field_0xDA0, a1, a2);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x068 */ u8 _0x068[0x6C - 0x068];
|
||||
/* 0x06C */ mVec3_c mPositionMaybe;
|
||||
/* 0x078 */ u8 _0x078[0xD98 - 0x078];
|
||||
/* 0xD98 */ void *field_0xD98;
|
||||
/* 0xD9C */ u8 _0xD9C[0xDA0 - 0xD9C];
|
||||
/* 0xDA0 */ void *field_0xDA0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+242
-7
@@ -8,6 +8,193 @@
|
||||
#include "libms/msgfile.h"
|
||||
#include "sized_string.h"
|
||||
|
||||
class dFlowBase_c {
|
||||
protected:
|
||||
enum Type_e {
|
||||
FLOW_NONE,
|
||||
FLOW_MESSAGE,
|
||||
FLOW_BRANCH,
|
||||
FLOW_EVENT,
|
||||
FLOW_ENTRY,
|
||||
FLOW_JUMP,
|
||||
};
|
||||
|
||||
public:
|
||||
virtual ~dFlowBase_c() {}
|
||||
|
||||
/* vt 0x0C */ virtual void triggerEntryPoint(s32, s32) = 0;
|
||||
/* vt 0x10 */ virtual void triggerEntryPoint(const char *) = 0;
|
||||
/* vt 0x14 */ virtual void advanceFlow() = 0;
|
||||
/* vt 0x18 */ virtual bool vt_0x18() const = 0;
|
||||
/* vt 0x1C */ virtual bool handleEventInternal(const MsbFlowInfo *element) = 0;
|
||||
/* vt 0x20 */ virtual bool handleEvent() = 0;
|
||||
/* vt 0x24 */ virtual bool handleMessage() = 0;
|
||||
/* vt 0x28 */ virtual bool handleBranch() = 0;
|
||||
/* vt 0x2C */ virtual bool handleEntry() = 0;
|
||||
/* vt 0x30 */ virtual bool handleJump() = 0;
|
||||
/* vt 0x34 */ virtual void vt_0x34() {}
|
||||
};
|
||||
|
||||
// Ghidra: ActorEventFlowManager
|
||||
class dFlow_c : dFlowBase_c {
|
||||
enum BranchValue_e {
|
||||
BRANCH_00,
|
||||
BRANCH_01,
|
||||
BRANCH_02,
|
||||
BRANCH_STORYFLAG,
|
||||
BRANCH_04,
|
||||
BRANCH_ZONEFLAG,
|
||||
BRANCH_SCENEFLAG,
|
||||
BRANCH_EVENT_COUNTER_THRESHOLD_1,
|
||||
BRANCH_EVENT_COUNTER_THRESHOLD_2,
|
||||
BRANCH_TEMPFLAG,
|
||||
BRANCH_CURRENT_RUPEES,
|
||||
BRANCH_RAND_2,
|
||||
BRANCH_RAND_3,
|
||||
BRANCH_RAND_4,
|
||||
BRANCH_14,
|
||||
BRANCH_15,
|
||||
BRANCH_16,
|
||||
BRANCH_FREE_SPACE_IN_POUCH,
|
||||
BRANCH_18,
|
||||
BRANCH_19,
|
||||
BRANCH_FREE_SPACE_IN_ITEM_CHECK,
|
||||
BRANCH_21,
|
||||
BRANCH_22,
|
||||
};
|
||||
|
||||
enum Event_e {
|
||||
EVENT_SET_STORYFLAG = 0,
|
||||
EVENT_UNSET_STORYFLAG = 1,
|
||||
EVENT_SET_SCENEFLAG = 2,
|
||||
EVENT_UNSET_SCENEFLAG = 3,
|
||||
EVENT_SET_ZONEFLAG = 4,
|
||||
EVENT_UNSET_ZONEFLAG = 5,
|
||||
EVENT_DELAY = 6,
|
||||
EVENT_07 = 7,
|
||||
EVENT_RUPEES = 8,
|
||||
EVENT_SET_ITEM = 9,
|
||||
EVENT_EXIT = 10,
|
||||
|
||||
EVENT_12 = 12,
|
||||
|
||||
EVENT_COUNTER_THRESHOLD = 23,
|
||||
EVENT_PLAY_SOUND = 24,
|
||||
EVENT_ADD_ITEM = 25,
|
||||
|
||||
EVENT_SET_TEMPFLAG = 28,
|
||||
EVENT_UNSET_TEMPFLAG = 29,
|
||||
|
||||
EVENT_LIGHT_PILLAR_30 = 30,
|
||||
|
||||
EVENT_LIGHT_PILLAR_34 = 34,
|
||||
|
||||
EVENT_SET_STORYFLAG_217 = 37,
|
||||
EVENT_DEMO_METER_ITEM_SELECT = 38,
|
||||
EVENT_CAMERA_42 = 42,
|
||||
EVENT_LYT_MINI_GAME = 44,
|
||||
EVENT_LYT_MINI_GAME_END = 45,
|
||||
EVENT_46 = 46,
|
||||
|
||||
EVENT_RESET_STORYFLAG = 52,
|
||||
EVENT_SET_ITEMFLAG = 53,
|
||||
EVENT_PALETTE = 54,
|
||||
EVENT_DEMO_DOWSING = 55,
|
||||
EVENT_DEMO_METER_DOWSING = 56,
|
||||
EVENT_DEMO_METER_MINUS_BTN = 57,
|
||||
EVENT_SELECT_STORY_DOWSING = 58,
|
||||
EVENT_DEMO_COLLECTION_SCREEN = 59,
|
||||
};
|
||||
|
||||
public:
|
||||
dFlow_c();
|
||||
|
||||
virtual ~dFlow_c();
|
||||
|
||||
typedef u16 (dFlow_c::*BranchHandler)(const MsbFlowInfo *element) const;
|
||||
|
||||
/* vt 0x0C */ virtual void triggerEntryPoint(s32 labelPart1, s32 labelPart2) override;
|
||||
/* vt 0x10 */ virtual void triggerEntryPoint(const char *) override;
|
||||
/* vt 0x14 */ virtual void advanceFlow() override;
|
||||
/* vt 0x18 */ virtual bool vt_0x18() const override;
|
||||
/* vt 0x1C */ virtual bool handleEventInternal(const MsbFlowInfo *element) override;
|
||||
/* vt 0x20 */ virtual bool handleEvent() override;
|
||||
/* vt 0x24 */ virtual bool handleMessage() override;
|
||||
/* vt 0x28 */ virtual bool handleBranch() override;
|
||||
/* vt 0x2C */ virtual bool handleEntry() override;
|
||||
/* vt 0x30 */ virtual bool handleJump() override;
|
||||
/* vt 0x38 */ virtual bool vt_0x38() const {
|
||||
return 0;
|
||||
}
|
||||
/* vt 0x3C */ virtual u16 getSwitchChoice(const MsbFlowInfo *element, u16 param) const;
|
||||
/* vt 0x40 */ virtual bool triggerEntryPointChecked(s32 labelPart1, s32 labelPart2);
|
||||
|
||||
bool advanceUntilEvent(s32 searchParam3, s32 *pOutParams1n2);
|
||||
bool advanceUntil(s32 searchType, s32 searchParam3, s32 *pOutParams1n2);
|
||||
|
||||
u16 getField_0x44() const;
|
||||
u16 getField_0x46() const;
|
||||
|
||||
protected:
|
||||
static s32 sExitId;
|
||||
|
||||
static BranchHandler sBranchHandlers[];
|
||||
u16 branchHandler00(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler01(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler02(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler03(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler04(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler05(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler06(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler07(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler08(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler09(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler10(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler11(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler12(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler13(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler14(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler15(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler16(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler17(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler18(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler19(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler20(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler21(const MsbFlowInfo *element) const;
|
||||
u16 branchHandler22(const MsbFlowInfo *element) const;
|
||||
|
||||
u16 findEntryPoint(u16 labelPart1, u16 labelPart2);
|
||||
u16 findEntryPoint(const char *label);
|
||||
|
||||
void start(u16 entry);
|
||||
void clear();
|
||||
void setNext(u16 next);
|
||||
void setField0x3C();
|
||||
bool checkField0x3C() const;
|
||||
bool matchesUnknownActorCategory(s32 id) const;
|
||||
static void playSound(u32);
|
||||
void createLytMiniGame();
|
||||
void clearMinigame();
|
||||
|
||||
/* 0x04 */ MsbfInfo *mpMsbf;
|
||||
/* 0x08 */ s32 mCurrentFlowIndex;
|
||||
/* 0x0C */ u16 field_0x0C;
|
||||
/* 0x0E */ u8 field_0x0E;
|
||||
/* 0x0F */ u8 field_0x0F;
|
||||
/* 0x10 */ u8 field_0x10;
|
||||
/* 0x14 */ s32 field_0x14;
|
||||
/* 0x18 */ s32 mResultFromCounterCheck;
|
||||
/* 0x1C */ SizedString<32> mCurrentTextLabelName;
|
||||
/* 0x3C */ u8 field_0x3C;
|
||||
/* 0x40 */ s32 field_0x40;
|
||||
/* 0x44 */ u16 field_0x44;
|
||||
/* 0x46 */ u16 field_0x46;
|
||||
/* 0x48 */ s32 mDelayTimer;
|
||||
/* 0x4C */ MsbFlowInfo mFlowInfo;
|
||||
/* 0x5C */ s32 field_0x5C;
|
||||
/* 0x60 */ s32 mFiInfo0;
|
||||
};
|
||||
|
||||
class dMessage_c : public dBase_c {
|
||||
public:
|
||||
dMessage_c();
|
||||
@@ -30,6 +217,7 @@ public:
|
||||
return sTagProcessor;
|
||||
}
|
||||
|
||||
void clearLightPillarRelatedArgs();
|
||||
void init();
|
||||
void reset();
|
||||
|
||||
@@ -49,23 +237,63 @@ public:
|
||||
field_0x2FC = val;
|
||||
}
|
||||
|
||||
void setField_0x328(u8 val) {
|
||||
field_0x328 = val;
|
||||
}
|
||||
|
||||
s32 getField_0x32C() const {
|
||||
return field_0x32C;
|
||||
}
|
||||
|
||||
void setField_0x32C(s32 val) {
|
||||
field_0x32C = val;
|
||||
}
|
||||
|
||||
void setField_0x329(bool v) {
|
||||
field_0x329 = v;
|
||||
}
|
||||
|
||||
void setField_0x32A(bool v) {
|
||||
field_0x32A = v;
|
||||
}
|
||||
|
||||
bool getField_0x32A() const {
|
||||
return field_0x32A;
|
||||
}
|
||||
|
||||
void setField_0x330(bool v) {
|
||||
field_0x330 = v;
|
||||
}
|
||||
|
||||
void setMiniGameVariant(s32 v) {
|
||||
mMiniGameVariant = v;
|
||||
}
|
||||
|
||||
s32 getMiniGameVariant() const {
|
||||
return mMiniGameVariant;
|
||||
}
|
||||
|
||||
void setField_0x344(s32 v) {
|
||||
field_0x344 = v;
|
||||
}
|
||||
|
||||
u8 getField_0x340() const {
|
||||
return field_0x340;
|
||||
}
|
||||
|
||||
void setField_0x340(u8 v) {
|
||||
field_0x340 = v;
|
||||
}
|
||||
|
||||
static bool isValidTextLabel(const char *name);
|
||||
static void loadTextByLabel(const char *label, dTagProcessor_c *tagProcessor, bool, u32, u32);
|
||||
|
||||
static s32 getMsbtIndexForLabel(const char *name);
|
||||
static const char *getMsbtFileName(s32 index);
|
||||
static MsbfInfo *getMsbfInfoForIndex(s32 index);
|
||||
static s32 getMsbtIndexForMsbfIndex(s32);
|
||||
static const char *getArcNameByIndex(s32 idx, bool);
|
||||
static MsbtInfo *getMsbtInfoForIndex(s32 index);
|
||||
|
||||
static const wchar_t *getTextMessageByLabel(const char *label, bool global, wchar_t *dstBuf, u32 maxLen);
|
||||
static const wchar_t *
|
||||
@@ -73,9 +301,16 @@ public:
|
||||
|
||||
static const wchar_t *formatText(const wchar_t *text);
|
||||
|
||||
static MsbtInfo *getMsbtInfoForIndex(s32 index);
|
||||
static MsbfInfo *getMsbfInfoForIndex(s32 index);
|
||||
static const char *getArcNameByIndex(s32 idx, bool);
|
||||
void storeLightPillarRelatedArg(u32);
|
||||
u32 getLightPillarRelatedArg(s32);
|
||||
|
||||
s32 getCurrentTextFileNumber() const {
|
||||
return mCurrentTextFileNumber;
|
||||
}
|
||||
|
||||
void setCurrentTextFileNumber(s32 num) {
|
||||
mCurrentTextFileNumber = num;
|
||||
}
|
||||
|
||||
private:
|
||||
static void *sZev0;
|
||||
@@ -105,7 +340,6 @@ private:
|
||||
s32 getTextIndexForLabel(const char *label);
|
||||
s32 getMsbtIndexForLabelInternal(const char *label);
|
||||
MsbtInfo *getMsbtInfoForIndexInternal(s32 index);
|
||||
|
||||
MsbfInfo *getMsbfInfoForIndexInternal(s32 index);
|
||||
|
||||
static const char *getArcNameByIndexInternal(s32 idx, bool global);
|
||||
@@ -120,7 +354,7 @@ private:
|
||||
|
||||
/* 0x2FC */ s32 field_0x2FC;
|
||||
|
||||
/* 0x300 */ u8 _0x300[0x328 - 0x300];
|
||||
/* 0x300 */ u32 field_0x300[10];
|
||||
|
||||
/* 0x328 */ bool field_0x328;
|
||||
/* 0x329 */ bool field_0x329;
|
||||
@@ -128,11 +362,12 @@ private:
|
||||
|
||||
/* 0x32B */ u8 field_0x32B;
|
||||
/* 0x32C */ s32 field_0x32C;
|
||||
/* 0x330 */ u8 _0x330[0x334 - 0x330];
|
||||
/* 0x330 */ u8 field_0x330;
|
||||
|
||||
/* 0x334 */ u32 mMinigameResultPoints;
|
||||
/* 0x338 */ u32 mMinigameTime;
|
||||
/* 0x33C */ u8 _0x33C[0x344 - 0x33C];
|
||||
/* 0x33C */ s32 mMiniGameVariant;
|
||||
/* 0x340 */ u8 field_0x340;
|
||||
/* 0x344 */ s32 field_0x344;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
#define D_PLAYER_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
|
||||
dAcPy_c *getLinkPtr();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,11 +2,22 @@
|
||||
#define D_POUCH_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_itembase.h"
|
||||
|
||||
u32 convertFilePouchSlot(s32 fileSlot);
|
||||
s32 convertLytPouchSlot(s32 fileSlot);
|
||||
s32 getPouchSlotCount(bool unk);
|
||||
bool isItemExtraAmmo(s32 item);
|
||||
bool isItemMedal(s32 item);
|
||||
bool hasAnyShields();
|
||||
|
||||
#define POUCH_SLOT_NONE 8
|
||||
|
||||
u8 adventurePouchFindItemSlot(ITEM_ID item);
|
||||
u32 adventurePouchCountItem(ITEM_ID itemId);
|
||||
|
||||
#define ITEM_CHECK_SLOT_NONE 60
|
||||
|
||||
u16 itemCheckFindItemSlot(ITEM_ID item);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
virtual int draw() override;
|
||||
virtual void deleteReady() override;
|
||||
|
||||
void triggerExit(s32 room, u8 exitIndex, s32 forcedNight = 2, s32 forcedTrial = 2);
|
||||
void triggerExit(s32 room, u16 exitIndex, s32 forcedNight = 2, s32 forcedTrial = 2);
|
||||
// void triggerEntrance(const char *stageName, u8 room, );
|
||||
const LinkReloadInfo &getLinkReloadInfo() const;
|
||||
|
||||
|
||||
+2
-2
@@ -137,7 +137,7 @@ public:
|
||||
return mFader.isStatus(mFaderBase_c::FADED_IN);
|
||||
}
|
||||
|
||||
u8 getCurrRoomId() const {
|
||||
s8 getCurrRoomId() const {
|
||||
return curr_room_id;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ private:
|
||||
/* 0x01A0 */ MapRelated mapRelated;
|
||||
/* 0x0394 */ u8 _0x394[0x39C - 0x394];
|
||||
/* 0x039C */ u32 loaded_entities[2047];
|
||||
/* 0x2398 */ u8 curr_room_id;
|
||||
/* 0x2398 */ s8 curr_room_id;
|
||||
|
||||
/* 80575760 */ static dStage_c *sInstance;
|
||||
};
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
STATE_FUNC_DECLARE(dStageMgr_c, RestartScene);
|
||||
|
||||
public:
|
||||
bool isAreaTypeNormal() const;
|
||||
bool isAreaTypeDungeon() const;
|
||||
bool isAreaTypeSky() const;
|
||||
bool isAreaTypeHouse() const;
|
||||
|
||||
@@ -132,6 +132,19 @@ public:
|
||||
field_0x82C = val;
|
||||
}
|
||||
|
||||
void setFields_0x8FC_0x900(s32 v1, s32 v2) {
|
||||
field_0x8FC = v1;
|
||||
field_0x900 = v2;
|
||||
}
|
||||
|
||||
s32 getField_0x8FC() const {
|
||||
return field_0x8FC;
|
||||
}
|
||||
|
||||
s32 getField_0x900() const {
|
||||
return field_0x900;
|
||||
}
|
||||
|
||||
void setField_0x90D(u8 val) {
|
||||
field_0x90D = val;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@ public:
|
||||
|
||||
bool isInSomeMapState() const;
|
||||
bool isNotInStateMap() const;
|
||||
void openCollectionScreenDemo();
|
||||
bool isStateNormalOrNotInEvent() const;
|
||||
void somehowRelatedToEnteringLightPillars(s32, s32, s32);
|
||||
|
||||
void fn_802CCD40(bool);
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef D_LYT_DEMO_DOWSING_H
|
||||
#define D_LYT_DEMO_DOWSING_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
class dLytDemoDowsing_c : public dBase_c {
|
||||
public:
|
||||
dLytDemoDowsing_c() : mStateMgr(*this, sStateID::null) {
|
||||
sInstance = this;
|
||||
}
|
||||
virtual ~dLytDemoDowsing_c() {
|
||||
sInstance = nullptr;
|
||||
}
|
||||
|
||||
static dLytDemoDowsing_c *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
void start() {
|
||||
mShouldStart = true;
|
||||
}
|
||||
|
||||
private:
|
||||
STATE_FUNC_DECLARE(dLytDemoDowsing_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytDemoDowsing_c, Start);
|
||||
|
||||
static dLytDemoDowsing_c *sInstance;
|
||||
|
||||
/* 0x068 */ UI_STATE_MGR_DECLARE(dLytDemoDowsing_c);
|
||||
/* 0x0A4 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x414 */ d2d::LytBase_c mLyt;
|
||||
/* 0x4A4 */ d2d::AnmGroup_c mAnm[2];
|
||||
/* 0x524 */ bool mShouldStart;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -278,6 +278,7 @@ public:
|
||||
|
||||
bool isOpenMaybe() const;
|
||||
bool fn_80139EA0() const;
|
||||
void lightPillarRelated(s32, s32, s32);
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, Invisible);
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, RenderingWait);
|
||||
@@ -417,6 +418,10 @@ public:
|
||||
return isValid(val) && ((1 << (val - 2)) & 0x1D);
|
||||
}
|
||||
|
||||
void lightPillarRelated(s32 p1, s32 p2, s32 p3) {
|
||||
mMapMain.lightPillarRelated(p1, p2, p3);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x0004 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x0374 */ dLytMapMain_c mMapMain;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef D_LYT_MINI_GAME_H
|
||||
#define D_LYT_MINI_GAME_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
class dLytMiniGame_c {
|
||||
public:
|
||||
static dLytMiniGame_c *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
void timeRelatedExecute();
|
||||
void scoreRelatedExecute();
|
||||
|
||||
void setDisplayedTime(s32 time);
|
||||
void setDisplayedPoints(s32 time);
|
||||
|
||||
void timeRelated();
|
||||
void scoreRelated();
|
||||
|
||||
private:
|
||||
static dLytMiniGame_c *sInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -239,6 +239,18 @@ public:
|
||||
return &sInstance->mMain;
|
||||
}
|
||||
|
||||
bool itemSelectDemoRelated(s32 arg) {
|
||||
return mMain.mItemSelect.fn_800F0220(arg);
|
||||
}
|
||||
|
||||
bool dowsingDemoRelated(s32 arg) {
|
||||
return mMain.mDowsing.fn_800FE3C0(arg);
|
||||
}
|
||||
|
||||
bool minusBtnDemoRelated(s32 arg) {
|
||||
return mMain.mMinusBtn.demoRelated(arg);
|
||||
}
|
||||
|
||||
// Not all of these inlines exist on dLytMeterMain_c
|
||||
// because accessing via GetMeter->get... causes
|
||||
// different instructions sometimes
|
||||
@@ -255,6 +267,10 @@ public:
|
||||
return mMain.field_0x13774;
|
||||
}
|
||||
|
||||
void setMeterField_0x13775(bool val) {
|
||||
mMain.field_0x13775 = val;
|
||||
}
|
||||
|
||||
bool getMeterField_0x1377F() const {
|
||||
return mMain.field_0x1377F;
|
||||
}
|
||||
@@ -309,6 +325,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static void setRupyField_0x8AD(u8 val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mMain.mRupy.setField_0x8AD(val);
|
||||
}
|
||||
}
|
||||
|
||||
static u8 getRupyField_0x8AC() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMain.mRupy.getField_0x8AC();
|
||||
|
||||
@@ -109,6 +109,10 @@ public:
|
||||
field_0x8AC = val;
|
||||
}
|
||||
|
||||
void setField_0x8AD(u8 val) {
|
||||
field_0x8AD = val;
|
||||
}
|
||||
|
||||
void setSize(u8 size) {
|
||||
mSize = size;
|
||||
}
|
||||
|
||||
@@ -36,10 +36,13 @@ public:
|
||||
bool isVisible() const;
|
||||
bool isOutputtingText() const;
|
||||
|
||||
void setCurrentLabelName(const char *name, bool storeFile);
|
||||
bool setCurrentLabelName(const char *name, bool storeFile);
|
||||
void setCurrentEntrypointName(const char *name);
|
||||
void setCurrentFlowFilename(const char *name);
|
||||
|
||||
void setNumericArg0(s32 arg);
|
||||
void setNumericArgs(s32 *arg, s32 argCount);
|
||||
|
||||
static dLytMsgWindow_c *getInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
@@ -58,6 +61,22 @@ public:
|
||||
return sInstance->mEntryPointToTrigger;
|
||||
}
|
||||
|
||||
dTagProcessor_c *getTagProcessor() const {
|
||||
return mpTagProcessor;
|
||||
}
|
||||
|
||||
u8 getField_0x80D() const {
|
||||
return field_0x80D;
|
||||
}
|
||||
|
||||
u8 getField_0x815() const {
|
||||
return field_0x815;
|
||||
}
|
||||
|
||||
s32 getTextOptionSelection() const {
|
||||
return mTextOptionSelection;
|
||||
}
|
||||
|
||||
private:
|
||||
bool setTextToDisplay(const wchar_t *text);
|
||||
void createSubMsgManager(u8 type);
|
||||
|
||||
@@ -12,10 +12,10 @@ struct MsbfInfo;
|
||||
struct MsbFlowInfo {
|
||||
/* 0x00 */ unsigned char type;
|
||||
/* 0x01 */ char subType;
|
||||
/* 0x04 */ int params1n2;
|
||||
/* 0x04 */ unsigned int params1n2;
|
||||
/* 0x08 */ short next;
|
||||
/* 0x0A */ short param3;
|
||||
/* 0x0C */ short param4;
|
||||
/* 0x0A */ unsigned short param3;
|
||||
/* 0x0C */ unsigned short param4;
|
||||
/* 0x0E */ unsigned short param5;
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -6,7 +6,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include "rvl/OS/OS.h"
|
||||
#include "rvl/OS/OSAddress.h"
|
||||
#include "rvl/OS/OSAlarm.h"
|
||||
@@ -39,6 +39,7 @@ extern "C" {
|
||||
#include "rvl/OS/OSTime.h"
|
||||
#include "rvl/OS/OSUtf.h"
|
||||
#include "rvl/OS/__ppc_eabi_init.h"
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -43,6 +43,13 @@ struct SizedString {
|
||||
}
|
||||
}
|
||||
|
||||
void set(const char *src) {
|
||||
if (src != mChars) {
|
||||
mChars[0] = '\0';
|
||||
append(src);
|
||||
}
|
||||
}
|
||||
|
||||
void operator+=(const char *src) {
|
||||
if (src != nullptr) {
|
||||
append(src);
|
||||
|
||||
@@ -231,6 +231,8 @@ public:
|
||||
}
|
||||
void fn_800223A0(void *);
|
||||
void fn_80022440(void *);
|
||||
// light pillar related
|
||||
void fn_80024240(s16, s16, s16);
|
||||
|
||||
u8 get0x2DE8() const {
|
||||
return field_0x2DE0[8];
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
#ifndef FI_CONTEXT_H
|
||||
#define FI_CONTEXT_H
|
||||
|
||||
#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;
|
||||
};
|
||||
|
||||
class FiAnalysisHandle {
|
||||
public:
|
||||
s16 getEquipmentFocus() const;
|
||||
s16 getAreaIndexForFiAreaName() const;
|
||||
s32 getSuitabilityArg() const;
|
||||
s16 getSuitabilityLabel() const;
|
||||
s16 getShieldMessage();
|
||||
s16 shieldRelated();
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
private:
|
||||
FiAnalysisEntry *mpEntry;
|
||||
};
|
||||
|
||||
class FiContext {
|
||||
public:
|
||||
static void create();
|
||||
static s32 getGlobalFiInfo0(s32);
|
||||
static FiAnalysisHandle getNaviTableEquipmentCheckEntry();
|
||||
static u8 rateBattlePerformance(u8 enemyActorId);
|
||||
static s16 getNaviTableProgressSummary();
|
||||
static s16 getFiAdviceHintEntry();
|
||||
static s16 getUnkObjectiveValue();
|
||||
|
||||
bool getDoSpecialFiMenuHandling() const {
|
||||
return mDoSpecialFiMenuHandling;
|
||||
}
|
||||
|
||||
static bool getDoSpecialFiMenuHandlingChecked() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->getDoSpecialFiMenuHandling();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void setDoSpecialFiMenuHandling(bool val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mDoSpecialFiMenuHandling = val;
|
||||
}
|
||||
}
|
||||
|
||||
static const wchar_t *getMessageForFiInfo(s32 arg) {
|
||||
return getTextMessage(getGlobalFiInfo0(arg));
|
||||
}
|
||||
|
||||
static FiContext *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static void setField_0x48(bool val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->field_0x48 = val;
|
||||
}
|
||||
}
|
||||
|
||||
static void setField_0x4A(bool val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->field_0x4A = val;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getHelpIndex() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mFiHelpIndex;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getTargetActorId() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mTargetActorId;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CB00(s32 arg) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CB00(arg);
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CB40() {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CB40();
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CA00() {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CA00();
|
||||
}
|
||||
}
|
||||
|
||||
static void do_fn_8016CB20() {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->fn_8016CB20();
|
||||
}
|
||||
}
|
||||
|
||||
void resetField_0x3C();
|
||||
|
||||
static const wchar_t *getTextMessage(s32 idx);
|
||||
|
||||
private:
|
||||
static FiContext *sInstance;
|
||||
|
||||
void fn_8016CB00(s32);
|
||||
void fn_8016CB40();
|
||||
void fn_8016CA00();
|
||||
void fn_8016CB20();
|
||||
|
||||
/* 0x00 */ u8 _0x00[0x34 - 0x00];
|
||||
/* 0x34 */ s32 mTargetActorId;
|
||||
/* 0x38 */ s32 mFiHelpIndex;
|
||||
/* 0x3C */ u8 _0x3C[0x48 - 0x3C];
|
||||
/* 0x48 */ bool field_0x48;
|
||||
/* 0x49 */ bool field_0x49;
|
||||
/* 0x4A */ bool field_0x4A;
|
||||
/* 0x4B */ bool mDoSpecialFiMenuHandling;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
#ifndef GLOBAL_FI_CONTEXT_H
|
||||
#define GLOBAL_FI_CONTEXT_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
struct FiContext {
|
||||
/* 0x00 */ u8 _0x00[0x4B - 0x00];
|
||||
/* 0x4B */ bool mDoSpecialFiMenuHandling;
|
||||
|
||||
static s32 getGlobalFiInfo0(s32);
|
||||
};
|
||||
|
||||
extern "C" FiContext *GLOBAL_FI_CONTEXT;
|
||||
extern "C" void fn_8016C9F0(FiContext *);
|
||||
extern "C" void createGlobalFiContext();
|
||||
|
||||
#endif
|
||||
@@ -17,8 +17,13 @@ extern "C" void fn_803618F0(void *);
|
||||
extern "C" void fn_80362730(void *);
|
||||
extern "C" void fn_80365D20(void *);
|
||||
extern "C" void fn_803624F0(void *);
|
||||
extern "C" void fn_80364FD0(void *, s32);
|
||||
|
||||
extern "C" void *ENEMY_BGM_RELATED_MGR;
|
||||
extern "C" void fn_80384570(void *, bool);
|
||||
extern "C" void fn_803858D0(void *);
|
||||
|
||||
extern "C" void *FANFARE_SOUND_MGR;
|
||||
extern "C" void AnotherSoundMgr__playSound(void *, s32);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef UNK_SAVE_TIME_H
|
||||
#define UNK_SAVE_TIME_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
class SaveTimeRelated {
|
||||
public:
|
||||
static SaveTimeRelated *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
s64 getField_0x08() const {
|
||||
return field_0x08;
|
||||
}
|
||||
|
||||
s64 fn_801907D0();
|
||||
void fn_801907F0();
|
||||
void fn_801909A0();
|
||||
|
||||
private:
|
||||
static SaveTimeRelated *sInstance;
|
||||
|
||||
/* 0x00 */ u8 _0x00[0x08 - 0x00];
|
||||
/* 0x08 */ u64 field_0x08;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user