mirror of
https://github.com/zeldaret/ss
synced 2026-05-28 00:15:59 -04:00
Merge pull request #247 from elijah-thomas774/story-flags
Storyflag Enum
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define D_FLAG_STORYFLAG_MANAGER_H
|
||||
|
||||
#include "d/flag/baseflag_manager.h"
|
||||
#include "d/flag/storyflag_map.h"
|
||||
#include "toBeSorted/file_manager.h"
|
||||
|
||||
class StoryflagManager : public ItemStoryManagerBase {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -99,7 +99,7 @@ bool dAcEsm_c::sSomeArray[9];
|
||||
|
||||
int dAcEsm_c::actorCreate() {
|
||||
// Check for Batreaux being human and on Skyloft/Waterfall cave
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(360) &&
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_GRATITUDE_QUEST_FINISHED) &&
|
||||
(dScGame_c::isCurrentStage("F000") || dScGame_c::isCurrentStage("D000"))) {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,9 @@ static const char *const sBambooIslandNames[] = {
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_BAMBOO_ISLAND, dAcObambooIsland_c, fProfile::OBJ_BAMBOO_ISLAND, 0x01F9, 0, 3);
|
||||
|
||||
void dAcObambooIsland_c::rideCallback(dBgW *unknown, dAcObjBase_c *actor, dAcObjBase_c *interactor) {
|
||||
if (interactor->isActorPlayer() && actor != nullptr && StoryflagManager::sInstance->getCounterOrFlag(284) == 0) {
|
||||
StoryflagManager::sInstance->setFlag(284);
|
||||
if (interactor->isActorPlayer() && actor != nullptr &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_BAMBOO_ISLAND_DISCOVERED) == 0) {
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_BAMBOO_ISLAND_DISCOVERED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -421,14 +421,14 @@ void dAcOChest_c::fn_326_1470() {
|
||||
if (!mIsLinksCloset) {
|
||||
return;
|
||||
}
|
||||
StoryflagManager::sInstance->setFlag(0x331);
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_ALTERNATE_WARDROBE_TEXT);
|
||||
}
|
||||
|
||||
void dAcOChest_c::fn_326_14A0() {
|
||||
if (!mIsLinksCloset) {
|
||||
return;
|
||||
}
|
||||
StoryflagManager::sInstance->unsetFlag(0x331);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_ALTERNATE_WARDROBE_TEXT);
|
||||
}
|
||||
|
||||
const u32 dAcOChest_c::unused = 0;
|
||||
|
||||
@@ -108,7 +108,7 @@ ok:
|
||||
}
|
||||
|
||||
int dAcODungeonShip_c::create() {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(271)) {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_SANDSHIP_DOWSING)) {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,5 +113,6 @@ void dAcOislandNusi_c::executeState_NusiFight() {
|
||||
void dAcOislandNusi_c::finalizeState_NusiFight() {}
|
||||
|
||||
bool dAcOislandNusi_c::isInLeviasFight() const {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(368) && !StoryflagManager::sInstance->getCounterOrFlag(200);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_LEVIAS_FIGHT_STARTED) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_LEVIAS_FIGHT_DEFEATED);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ bool dAcOJunkRep_c::loadMdl(m3d::smdl_c &mdl, const char *name) {
|
||||
}
|
||||
|
||||
bool dAcOJunkRep_c::getState() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(0x143) == 1;
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_SCRAPPER_UNLOCKED) == 1;
|
||||
}
|
||||
|
||||
bool dAcOJunkRep_c::createHeap() {
|
||||
|
||||
@@ -114,5 +114,5 @@ int dAcOmegamiIsland_c::draw() {
|
||||
}
|
||||
|
||||
bool dAcOmegamiIsland_c::hasGoddessStatueFallen() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(0x11);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_TRIFORCE_COMPLETE);
|
||||
}
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_PUMPKIN_BAR, dAcOpumpkinBar_c, fProfile::OBJ_PUMPKIN_BAR, 0x1ED, 0, 3);
|
||||
|
||||
void dAcOpumpkinBar_c::barCollisionRideCallback(dBgW *collider, dAcObjBase_c *actor, dAcObjBase_c *interactor) {
|
||||
if (interactor->isActorPlayer() && actor != 0 && !StoryflagManager::sInstance->getCounterOrFlag(282)) {
|
||||
StoryflagManager::sInstance->setFlag(282);
|
||||
if (interactor->isActorPlayer() && actor != 0 &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_LUMPY_PUMPKIN_DISCOVERED)) {
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_LUMPY_PUMPKIN_DISCOVERED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_PUZZLE_ISLAND, dAcOpuzzleIsland_c, fProfile::OBJ_PUZZLE_ISLAND, 0x1D6, 0, 3);
|
||||
|
||||
void dAcOpuzzleIsland_c::rideCallback(dBgW *unknown, dAcObjBase_c *actor, dAcObjBase_c *interactor) {
|
||||
if (interactor->isActorPlayer() && actor != nullptr && StoryflagManager::sInstance->getCounterOrFlag(0x11d) == 0) {
|
||||
StoryflagManager::sInstance->setFlag(0x11d);
|
||||
if (interactor->isActorPlayer() && actor != nullptr &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_ISLE_OF_SONGS_DISCOVERED) == 0) {
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_ISLE_OF_SONGS_DISCOVERED);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ bool dAcOruinedSave_c::createHeap() {
|
||||
}
|
||||
|
||||
int dAcOruinedSave_c::create() {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(492)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_STATUES_ACTIVATED)) {
|
||||
return FAILED;
|
||||
}
|
||||
CREATE_ALLOCATOR(dAcOruinedSave_c);
|
||||
@@ -62,7 +62,7 @@ int dAcOruinedSave_c::draw() {
|
||||
void dAcOruinedSave_c::initializeState_Wait() {}
|
||||
|
||||
void dAcOruinedSave_c::executeState_Wait() {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(492)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_STATUES_ACTIVATED)) {
|
||||
mStateMgr.changeState(StateID_Vanish);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,6 +252,6 @@ void dAcOSeatSword_c::updateSwordMdl() {
|
||||
|
||||
bool dAcOSeatSword_c::checkPlayerHasSword() {
|
||||
// the GetFlag needs to be an inline ... (using getCounterOrFlag doesnt work)
|
||||
return (mSubtype == 0 && StoryflagManager::sInstance->getFlag(0x3)) ||
|
||||
(mSubtype == 1 && !StoryflagManager::sInstance->getFlag(0xA7));
|
||||
return (mSubtype == 0 && StoryflagManager::sInstance->getFlag(STORYFLAG_GODDESS_SWORD)) ||
|
||||
(mSubtype == 1 && !StoryflagManager::sInstance->getFlag(STORYFLAG_SWORD_RESTRICTED));
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ const char *dAcOtoD3StoneFigure_c::getModelName() const {
|
||||
}
|
||||
|
||||
bool dAcOtoD3StoneFigure_c::isStoneOfTrialsPlaced() const {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(22);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_STONE_OF_TRIALS_PLACED);
|
||||
}
|
||||
|
||||
void dAcOtoD3StoneFigure_c::doInteraction(s32 arg) {
|
||||
|
||||
@@ -16,8 +16,8 @@ SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA, dAcOutajima_c, fProfile::OBJ_UTAJIMA, 0x1D4,
|
||||
|
||||
void dAcOutajima_c::rideCallback(dBgW *bg, dAcObjBase_c *o1, dAcObjBase_c *o2) {
|
||||
if (o2->isActorPlayer() && o1 != nullptr) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(285) == 0) {
|
||||
StoryflagManager::sInstance->setFlag(285);
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_ISLE_OF_SONGS_DISCOVERED) == 0) {
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_ISLE_OF_SONGS_DISCOVERED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,16 +57,16 @@ bool dTgDowsing_c::checkDowsing() const {
|
||||
switch (mDowsingOption) {
|
||||
case TRIAL_0:
|
||||
return ItemflagManager::sInstance->getFlagDirect(ITEM_FARORES_COURAGE) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(93); // TOOD (Counter ID)
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_FARON_TRIAL_UNLOCKED);
|
||||
case TRIAL_1:
|
||||
return ItemflagManager::sInstance->getFlagDirect(ITEM_NAYRUS_WISDOM) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(97); // TOOD (Counter ID)
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_LANAYRU_TRIAL_UNLOCKED);
|
||||
case TRIAL_2:
|
||||
return ItemflagManager::sInstance->getFlagDirect(ITEM_DINS_POWER) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(98); // TOOD (Counter ID)
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_ELDIN_TRIAL_UNLOCKED);
|
||||
case TRIAL_3:
|
||||
return ItemflagManager::sInstance->getFlagDirect(ITEM_SOTH) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(99); // TOOD (Counter ID)
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_HYLIA_TRIAL_UNLOCKED);
|
||||
case PROPELLER: return DowsingTarget::hasPropellerDowsing();
|
||||
case WATER_BASIN: return DowsingTarget::hasWaterBasinDowsing();
|
||||
case CRYSTAL_BALL: return DowsingTarget::hasCrystalBallDowsing();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
SPECIAL_ACTOR_PROFILE(TAG_GENKI_DOWSING_TARGET, dTgGenkiDwsTgt_c, fProfile::TAG_GENKI_DOWSING_TARGET, 0x02A5, 0, 0);
|
||||
|
||||
int dTgGenkiDwsTgt_c::create() {
|
||||
u16 batQuestActivated = StoryflagManager::sInstance->getCounterOrFlag(304);
|
||||
u16 batQuestActivated = StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_GRATITUDE_QUEST_STARTED);
|
||||
if (batQuestActivated == 0 || !dScGame_c::GetInstance()->currentSpawnInfo.isNight()) {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(TBOX, dAcTbox_c, fProfile::TBOX, 0x018D, 0, 6);
|
||||
|
||||
static mVec3_c sDowsingTargetOffsets[] = {
|
||||
@@ -2346,7 +2345,7 @@ void dAcTbox_c::initDowsingTargetCube() {
|
||||
void dAcTbox_c::noRegisterDowsing() {}
|
||||
|
||||
void dAcTbox_c::registerKeyPieceDowsing() {
|
||||
if ((field_0x11F4 & 4) == 0 && StoryflagManager::sInstance->getCounterOrFlag(0x6A)) {
|
||||
if ((field_0x11F4 & 4) == 0 && StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_KEYPIECE_DOWSING)) {
|
||||
mDowsingTarget.doRegister();
|
||||
field_0x11F4 |= 4;
|
||||
}
|
||||
|
||||
+6
-6
@@ -7,13 +7,13 @@
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_light_env.h"
|
||||
#include "d/d_lyt_hio.h"
|
||||
#include "d/d_player.h"
|
||||
#include "d/d_pouch.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "d/d_stage_mgr.h"
|
||||
#include "d/d_tag_processor.h"
|
||||
#include "d/d_lyt_hio.h"
|
||||
#include "d/flag/itemflag_manager.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
@@ -467,7 +467,7 @@ bool dFlow_c::handleEventInternal(const MsbFlowInfo *element) {
|
||||
}
|
||||
case EVENT_SET_STORYFLAG_217:
|
||||
StoryflagManager::sInstance->setFlagOrCounterToValue(
|
||||
217, dLytMsgWindow_c::getInstance()->getTextOptionSelection()
|
||||
STORYFLAG_217, dLytMsgWindow_c::getInstance()->getTextOptionSelection()
|
||||
);
|
||||
break;
|
||||
case EVENT_DEMO_METER_ITEM_SELECT: return dLytMeter_c::GetInstance()->itemSelectDemoRelated(params1n2);
|
||||
@@ -623,7 +623,7 @@ bool dFlow_c::handleMessage() {
|
||||
fiHelpIndex = 0;
|
||||
}
|
||||
if (fiHelpIndex == 5) {
|
||||
StoryflagManager::sInstance->setFlag(727);
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_WALLET_FULL_ACK);
|
||||
}
|
||||
mCurrentTextLabelName.sprintf("KEN4_%03d", fiHelpIndex);
|
||||
} else if (mCurrentTextLabelName == "KEN5_000") {
|
||||
@@ -706,7 +706,7 @@ bool dFlow_c::handleMessage() {
|
||||
} else if (mCurrentTextLabelName == "KEN9_000") {
|
||||
// Random hint
|
||||
s32 v;
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(530)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_BOSS_RUSH_ACTIVE)) {
|
||||
// "When you require my analysis..."
|
||||
v = 200;
|
||||
} else if (dStageMgr_c::GetInstance()->getSTIFbyte4() == 0) {
|
||||
@@ -939,7 +939,7 @@ u16 dFlow_c::branchHandler21(const MsbFlowInfo *element) const {
|
||||
}
|
||||
|
||||
u16 dFlow_c::branchHandler22(const MsbFlowInfo *element) const {
|
||||
u16 ret = StoryflagManager::sInstance->getCounterOrFlag(692);
|
||||
u16 ret = StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_692);
|
||||
if (ret > 3) {
|
||||
ret = 3;
|
||||
}
|
||||
@@ -1004,7 +1004,7 @@ void dFlow_c::triggerEntryPoint(s32 labelPart1, s32 labelPart2) {
|
||||
FiContext::setField_0x48(true);
|
||||
labelPart2 = 401;
|
||||
} else if (labelPart2 == 401) {
|
||||
StoryflagManager::sInstance->setFlag(808);
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_LOW_HEART_NOTICE);
|
||||
// Don't introduce heart dowsing in areas where you might
|
||||
// not be able to dowse
|
||||
if (dStageMgr_c::GetInstance()->isAreaTypeNormal()) {
|
||||
|
||||
+2
-1
@@ -293,7 +293,8 @@ void dRoom_c::drawOnMapIfVisible(mMtx_c *mtx, int param) {
|
||||
} else {
|
||||
// Lake Floria interior
|
||||
if (dStageMgr_c::GetInstance()->isAreaTypeOverworldOrSkyloft() && dScGame_c::isCurrentStage("F102") &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(115) && roomid >= 3 && roomid < 5) {
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_FLORIA_INTERIOR_MAP_UNLOCKED) && roomid >= 3 &&
|
||||
roomid < 5) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -179,14 +179,14 @@ void dScGame_c::setRespawnInfo(const mVec3_c &linkPos, const mAng3_c &linkRot, b
|
||||
MinigameManager::isInMinigameState(MinigameManager::BOSS_RUSH) ?
|
||||
true :
|
||||
false;
|
||||
bool isInHordeFight = isCurrentStage("F403") && !StoryflagManager::sInstance->getFlag(134);
|
||||
bool isInHordeFight = isCurrentStage("F403") && !StoryflagManager::sInstance->getFlag(STORYFLAG_HORDE_DEFEATED);
|
||||
s32 areaType = dStageMgr_c::GetInstance()->getAreaType();
|
||||
if (mPreventSaveRespawnInfo != true && !isInThunderDragonTrial && !isInHordeFight &&
|
||||
(areaType != 2 && !isCurrentStage("B100_1") && !sPreventClearingSomeFlag &&
|
||||
(areaType != 1 || (mLastAreaType != 1 && mLastAreaType != 2)))) {
|
||||
FileManager::GetInstance()->setT3Info(linkPos, linkRot);
|
||||
if (mLastAreaType != 5 && unk) {
|
||||
StoryflagManager::sInstance->unsetFlag(752);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_752);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -386,7 +386,9 @@ MapRelated::MapRelated()
|
||||
((dScGame_c::isCurrentStage("F300") || dScGame_c::isCurrentStage("F300_4")) &&
|
||||
SceneflagManager::sInstance->checkTempOrSceneflag(3));
|
||||
if (!showDesertPast) {
|
||||
bool hideSeaPast = !(dScGame_c::isCurrentStage("F301_1") && StoryflagManager::sInstance->getCounterOrFlag(519));
|
||||
bool hideSeaPast =
|
||||
!(dScGame_c::isCurrentStage("F301_1") &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_SEA_CHART_ACTIVATED));
|
||||
if (hideSeaPast) {
|
||||
showPastVariant = false;
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ static void handleBzsPly(int roomid, const BzsSectionHead *section) {
|
||||
ang.y = fileMgr->getAngleT3();
|
||||
linkPos = &pos;
|
||||
linkAngle = ∠
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(752) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(119)) {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_752) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_RESPAWN_AT_STATUE)) {
|
||||
const PLY *entrance = room->getEntranceById(dScGame_c::currentSpawnInfo.entrance);
|
||||
if (fn_8005C5D0(entrance->linkParams) == true) {
|
||||
linkActorParams = entrance->linkParams;
|
||||
@@ -347,7 +347,8 @@ static void handleBzsStas(int roomid, const BzsSectionHead *section) {
|
||||
}
|
||||
}
|
||||
|
||||
static void parseLayerBzs(int roomid, u32 layer, const LAY *head, const BzsTagToParseFunc *handlerTable, s32 tableSize) {
|
||||
static void
|
||||
parseLayerBzs(int roomid, u32 layer, const LAY *head, const BzsTagToParseFunc *handlerTable, s32 tableSize) {
|
||||
const LAY *lay = head + layer;
|
||||
const BzsSectionHead *newHead = OFS_TO_PTR(BzsSectionHead, lay);
|
||||
for (s32 i = 0; i < lay->mCount; i++) {
|
||||
|
||||
@@ -13,7 +13,7 @@ void StoryflagManager::copyFlagsFromSaveFirstTime() {
|
||||
extern "C" FlagDefinition StoryflagManager__STORYFLAG_DEFINITIONS[];
|
||||
|
||||
void StoryflagManager::setupFlagIndex() {
|
||||
createFlagIndex(StoryflagManager__STORYFLAG_DEFINITIONS, 0x4B1);
|
||||
createFlagIndex(StoryflagManager__STORYFLAG_DEFINITIONS, STORYFLAG_MAX);
|
||||
}
|
||||
|
||||
void StoryflagManager::onDirty() {}
|
||||
|
||||
+10
-10
@@ -587,7 +587,7 @@ void dLytPauseMgr_c::executeState_None() {
|
||||
mSavedPauseDisp = lytControl->getCurrentPauseDisp();
|
||||
lytControl->setCurrentPauseDisp(lytControl->getPauseDemoDisp());
|
||||
} else {
|
||||
StoryflagManager::sInstance->unsetFlag(571);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_1_BTN_NOTICE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -643,7 +643,7 @@ void dLytPauseMgr_c::executeState_Wait() {
|
||||
|
||||
if (dLytControlGame_c::getInstance()->getCurrentPauseDisp() == dLytPauseMgr_c::DISP_00_INVENTORY) {
|
||||
bool b = false;
|
||||
if (!StoryflagManager::sInstance->getFlag(58)) {
|
||||
if (!StoryflagManager::sInstance->getFlag(STORYFLAG_B_WHEEL_UNLOCKED)) {
|
||||
if (dPad::getDownTrigB()) {
|
||||
b = true;
|
||||
}
|
||||
@@ -855,7 +855,7 @@ void dLytPauseMgr_c::preDrawStage() {
|
||||
}
|
||||
|
||||
void dLytPauseMgr_c::postDrawStage() {
|
||||
if (field_0x083A == true) {
|
||||
if (field_0x083A == true) {
|
||||
field_0x083A = false;
|
||||
d2d::defaultSet();
|
||||
if (dLytControlGame_c::getInstance() != nullptr) {
|
||||
@@ -903,21 +903,21 @@ bool dLytPauseMgr_c::checkSelectRing() {
|
||||
|
||||
if (dPad::getDownTrigB()) {
|
||||
mCurrentDisp00Tab = TAB_ITEM;
|
||||
if (tab != TAB_ITEM && StoryflagManager::sInstance->getFlag(58)) {
|
||||
if (tab != TAB_ITEM && StoryflagManager::sInstance->getFlag(STORYFLAG_B_WHEEL_UNLOCKED)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (dPad::getDownTrigMinus()) {
|
||||
mCurrentDisp00Tab = TAB_POUCH;
|
||||
if (tab != TAB_POUCH && StoryflagManager::sInstance->getFlag(30)) {
|
||||
if (tab != TAB_POUCH && StoryflagManager::sInstance->getFlag(STORYFLAG_POUCH_UNLOCKED)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (dPad::getDownTrigC()) {
|
||||
mCurrentDisp00Tab = TAB_DOWSING;
|
||||
if (tab != TAB_DOWSING && StoryflagManager::sInstance->getFlag(789)) {
|
||||
if (tab != TAB_DOWSING && StoryflagManager::sInstance->getFlag(STORYFLAG_DOWSING_UNLOCKED)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -987,15 +987,15 @@ void dLytPauseMgr_c::changeSavedDisp() {
|
||||
}
|
||||
lytControl->setCurrentPauseDisp(disp);
|
||||
if (disp != 0) {
|
||||
StoryflagManager::sInstance->setFlag(847);
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_ON_COLLECTION_SCREEN);
|
||||
} else {
|
||||
StoryflagManager::sInstance->unsetFlag(847);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_ON_COLLECTION_SCREEN);
|
||||
}
|
||||
}
|
||||
|
||||
void dLytPauseMgr_c::saveTabFlag() {
|
||||
dLytControlGame_c::getInstance()->setPauseDisp00Tab(mCurrentDisp00Tab);
|
||||
StoryflagManager::sInstance->setFlagOrCounterToValue(846, mCurrentDisp00Tab);
|
||||
StoryflagManager::sInstance->setFlagOrCounterToValue(STORYFLAG_SAVED_DISP00_TAB, mCurrentDisp00Tab);
|
||||
}
|
||||
|
||||
bool dLytPauseMgr_c::checkRing() {
|
||||
@@ -1003,7 +1003,7 @@ bool dLytPauseMgr_c::checkRing() {
|
||||
if (lytControl->getCurrentPauseDisp() != DISP_00_INVENTORY) {
|
||||
return false;
|
||||
}
|
||||
if (!StoryflagManager::sInstance->getFlag(30)) {
|
||||
if (!StoryflagManager::sInstance->getFlag(STORYFLAG_POUCH_UNLOCKED)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -548,7 +548,7 @@ bool dLytPauseDisp00_c::requestSelectGuide() {
|
||||
mSelectGuideRequest = true;
|
||||
if (mCallTimerMaybe != 0) {
|
||||
mStopCallRequest = true;
|
||||
StoryflagManager::sInstance->unsetFlag(570);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_UI_MODE_NOTICE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -599,15 +599,15 @@ void dLytPauseDisp00_c::initializeState_None() {
|
||||
StoryflagManager *storyFlagmanager = StoryflagManager::sInstance;
|
||||
|
||||
// Check which tabs are unlocked
|
||||
if (storyFlagmanager->getFlag(789)) {
|
||||
if (storyFlagmanager->getFlag(STORYFLAG_DOWSING_UNLOCKED)) {
|
||||
mpBoundings[PAUSE_DISP_00_BOUNDING_LEFT_TAB]->SetVisible(true);
|
||||
}
|
||||
|
||||
if (storyFlagmanager->getFlag(30)) {
|
||||
if (storyFlagmanager->getFlag(STORYFLAG_POUCH_UNLOCKED)) {
|
||||
mpBoundings[PAUSE_DISP_00_BOUNDING_CENTER_TAB]->SetVisible(true);
|
||||
}
|
||||
|
||||
if (storyFlagmanager->getFlag(58)) {
|
||||
if (storyFlagmanager->getFlag(STORYFLAG_B_WHEEL_UNLOCKED)) {
|
||||
mpBoundings[PAUSE_DISP_00_BOUNDING_RIGHT_TAB]->SetVisible(true);
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ void dLytPauseDisp00_c::initializeState_In() {
|
||||
u8 mode = dLytMeter_c::GetMain()->getUiMode();
|
||||
setAnm(PAUSE_DISP_00_ANIM_UI_TYPE, mode);
|
||||
StoryflagManager *storyflagManager = StoryflagManager::sInstance;
|
||||
if (storyflagManager->getFlag(583)) {
|
||||
if (storyflagManager->getFlag(STORYFLAG_UPGRADED_DOWSING)) {
|
||||
setAnm(PAUSE_DISP_00_ANIM_DOWSING_TYPE, 1.0f);
|
||||
} else {
|
||||
setAnm(PAUSE_DISP_00_ANIM_DOWSING_TYPE, 0.0f);
|
||||
@@ -669,13 +669,13 @@ void dLytPauseDisp00_c::initializeState_In() {
|
||||
|
||||
// Control tab visibility
|
||||
f32 tabVFrame = 0.0f;
|
||||
if (storyflagManager->getFlag(30)) {
|
||||
if (storyflagManager->getFlag(STORYFLAG_POUCH_UNLOCKED)) {
|
||||
tabVFrame = 1.0f;
|
||||
}
|
||||
if (storyflagManager->getFlag(789)) {
|
||||
if (storyflagManager->getFlag(STORYFLAG_DOWSING_UNLOCKED)) {
|
||||
tabVFrame = 2.0f;
|
||||
}
|
||||
if (storyflagManager->getFlag(58)) {
|
||||
if (storyflagManager->getFlag(STORYFLAG_B_WHEEL_UNLOCKED)) {
|
||||
tabVFrame = 3.0f;
|
||||
}
|
||||
|
||||
@@ -1184,14 +1184,14 @@ void dLytPauseDisp00_c::setupDisp() {
|
||||
icon++;
|
||||
}
|
||||
|
||||
if (StoryflagManager::sInstance->getFlag(358)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_UI_MODE_UNLOCKED)) {
|
||||
setAnm(PAUSE_DISP_00_ANIM_HAVE_UITYPE_BTN, 1.0f);
|
||||
mpBoundings[PAUSE_DISP_00_BOUNDING_UI_TYPE]->SetVisible(true);
|
||||
} else {
|
||||
setAnm(PAUSE_DISP_00_ANIM_HAVE_UITYPE_BTN, 0.0f);
|
||||
}
|
||||
|
||||
if (StoryflagManager::sInstance->getFlag(570)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_UI_MODE_NOTICE)) {
|
||||
setAnm(PAUSE_DISP_00_ANIM_CALL, 0.0f);
|
||||
mCallTimerMaybe = 1;
|
||||
}
|
||||
@@ -1556,7 +1556,7 @@ void dLytPauseDisp00_c::setupSword() {
|
||||
}
|
||||
|
||||
void dLytPauseDisp00_c::setupStoneOfTrials() {
|
||||
if (StoryflagManager::sInstance->getFlag(22)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_STONE_OF_TRIALS_PLACED)) {
|
||||
setAnm(PAUSE_DISP_00_ANIM_HAVE_SHIREN, 2.0f);
|
||||
mpBoundings[PAUSE_DISP_00_BOUNDING_SHIREN]->SetVisible(true);
|
||||
} else {
|
||||
@@ -2082,7 +2082,7 @@ u16 dLytPauseDisp00_c::getPointedItemSpecial(s32 paneIdx, bool *pLocked) {
|
||||
case PAUSE_DISP_00_BOUNDING_MUSE_OFFSET ... PAUSE_DISP_00_BOUNDING_MUSE_OFFSET + 7: {
|
||||
s32 song = paneIdx - PAUSE_DISP_00_BOUNDING_MUSE_OFFSET;
|
||||
if (paneIdx == PAUSE_DISP_00_BOUNDING_MUSE_OFFSET + 6) {
|
||||
if (StoryflagManager::sInstance->getFlag(462)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_THUNDER_DRAGON_SONG)) {
|
||||
id = getSongItemIdForIndex(song);
|
||||
} else if (dAcItem_c::checkFlag(ITEM_LIFE_TREE_FRUIT)) {
|
||||
id = ITEM_LIFE_TREE_FRUIT;
|
||||
|
||||
@@ -582,7 +582,8 @@ void dLytPauseDisp01_c::setupDisp() {
|
||||
setupInsects();
|
||||
setupMaterials();
|
||||
|
||||
if (StoryflagManager::sInstance->getFlag(552) || StoryflagManager::sInstance->getFlag(555)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_CAWLINS_LETTER_GHOST) ||
|
||||
StoryflagManager::sInstance->getFlag(STORYFLAG_CAWLINS_LETTER_KARANE)) {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_TEGAMI, 2.0f);
|
||||
mpPanes[PAUSE_DISP_01_PANE_TEGAMI]->SetVisible(true);
|
||||
} else if (dAcItem_c::checkFlag(ITEM_CAWLIN_LETTER)) {
|
||||
@@ -592,17 +593,17 @@ void dLytPauseDisp01_c::setupDisp() {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_TEGAMI, 0.0f);
|
||||
}
|
||||
|
||||
if (StoryflagManager::sInstance->getFlag(477)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_BEEDLE_CAGE_GIVEN)) {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_TERRY_BUG, 2.0f);
|
||||
mpPanes[PAUSE_DISP_01_PANE_TERRY_BUG]->SetVisible(true);
|
||||
} else if (StoryflagManager::sInstance->getFlag(476)) {
|
||||
} else if (StoryflagManager::sInstance->getFlag(STORYFLAG_BEEDLE_CAGE_AQUIRED)) {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_TERRY_BUG, 1.0f);
|
||||
mpPanes[PAUSE_DISP_01_PANE_TERRY_BUG]->SetVisible(true);
|
||||
} else {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_TERRY_BUG, 0.0f);
|
||||
}
|
||||
|
||||
if (StoryflagManager::sInstance->getFlag(387)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_RATTLE_GIVEN)) {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_GARAGARA, 2.0f);
|
||||
mpPanes[PAUSE_DISP_01_PANE_GARAGARA]->SetVisible(true);
|
||||
} else if (dAcItem_c::checkFlag(ITEM_RATTLE)) {
|
||||
@@ -622,7 +623,7 @@ void dLytPauseDisp01_c::setupDisp() {
|
||||
crystalCount = demoItem == ITEM_1_CRYSTAL ? crystalCount - 1 : crystalCount - 5;
|
||||
}
|
||||
|
||||
if (StoryflagManager::sInstance->getFlag(360)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_GRATITUDE_QUEST_FINISHED)) {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_GENKI, 2.0f);
|
||||
} else if (isDemo && crystalCount == 0) {
|
||||
setAnm(PAUSE_DISP_01_ANIM_HAVE_GENKI, 0.0f);
|
||||
@@ -954,7 +955,7 @@ bool dLytPauseDisp01_c::shouldInsectBeDisplayed(s32 insectIdx) const {
|
||||
if (insectIdx != 0) {
|
||||
return dAcItem_c::checkFlag(getInsectItemId(insectIdx));
|
||||
} else {
|
||||
return StoryflagManager::sInstance->getFlag(122);
|
||||
return StoryflagManager::sInstance->getFlag(STORYFLAG_DEKU_HORNET_COLLECTED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,7 +348,8 @@ const wchar_t *dLytPauseText_c::getCurrentPausePopupCaption() {
|
||||
return dMessage_c::getTextMessageByLabel("CAPTION_DOWSING_012", true, nullptr, 0);
|
||||
}
|
||||
} else if (id == 14) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(1087) == 27) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_GODDESS_CHEST_COUNT) ==
|
||||
27 /* TODO: Max Count Define */) {
|
||||
// "You've activated all of the Goddess Cubes. There are none left for your sword to react to."
|
||||
return dMessage_c::getTextMessageByLabel("CAPTION_DOWSING_014_02", true, nullptr, 0);
|
||||
} else {
|
||||
@@ -389,29 +390,32 @@ const wchar_t *dLytPauseText_c::getCurrentPausePopupCaption() {
|
||||
}
|
||||
default: {
|
||||
if (id == ITEM_CAWLIN_LETTER) {
|
||||
if (StoryflagManager::sInstance->getFlag(552) || StoryflagManager::sInstance->getFlag(555)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_CAWLINS_LETTER_GHOST) ||
|
||||
StoryflagManager::sInstance->getFlag(STORYFLAG_CAWLINS_LETTER_KARANE)) {
|
||||
// "A heartfelt letter from Cawlin that you were able to somewhat successfully deliver..."
|
||||
return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_158_02", true, nullptr, 0);
|
||||
} else {
|
||||
return getCaptionItemText(id);
|
||||
}
|
||||
} else if (id == ITEM_BEEDLE_INSECT_CAGE) {
|
||||
if (StoryflagManager::sInstance->getFlag(477)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_BEEDLE_CAGE_GIVEN)) {
|
||||
// "Formerly contained Beedle's beloved insect. You successfully returned it to its owner."
|
||||
return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_159_02", true, nullptr, 0);
|
||||
} else {
|
||||
return getCaptionItemText(id);
|
||||
}
|
||||
} else if (id == ITEM_RATTLE) {
|
||||
if (StoryflagManager::sInstance->getFlag(387)) {
|
||||
// "This toy belongs to the baby of Bertie, who runs the Potion Shop. You've successfully returned it to its owner."
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_RATTLE_GIVEN)) {
|
||||
// "This toy belongs to the baby of Bertie, who runs the Potion Shop. You've successfully returned
|
||||
// it to its owner."
|
||||
return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_160_02", true, nullptr, 0);
|
||||
} else {
|
||||
return getCaptionItemText(id);
|
||||
}
|
||||
} else if (id == ITEM_1_CRYSTAL) {
|
||||
if (StoryflagManager::sInstance->getFlag(360)) {
|
||||
// "Crystallized gratitude from the people of the land. This power of thankfulness turned Batreaux into a human."
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_GRATITUDE_QUEST_FINISHED)) {
|
||||
// "Crystallized gratitude from the people of the land. This power of thankfulness turned Batreaux
|
||||
// into a human."
|
||||
return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_048_02", true, nullptr, 0);
|
||||
} else {
|
||||
return getCaptionItemText(id);
|
||||
|
||||
@@ -191,7 +191,7 @@ bool dLytMeter1Button_c::execute() {
|
||||
mStateMgr.executeState();
|
||||
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(571)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_1_BTN_NOTICE)) {
|
||||
mShouldCall = true;
|
||||
}
|
||||
} else {
|
||||
@@ -233,7 +233,8 @@ bool dLytMeter1Button_c::execute() {
|
||||
}
|
||||
|
||||
bool dLytMeter1Button_c::shouldCall() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(571)) {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_1_BTN_NOTICE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -352,7 +353,7 @@ bool dLytMeter2Button_c::remove() {
|
||||
bool dLytMeter2Button_c::execute() {
|
||||
dLytMeter_c *meter = dLytMeter_c::GetInstance();
|
||||
if (meter->isHelpOpen()) {
|
||||
StoryflagManager::sInstance->unsetFlag(832);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_2_BTN_NOTICE);
|
||||
}
|
||||
if (mpOwnerPane == nullptr) {
|
||||
return true;
|
||||
@@ -368,7 +369,7 @@ bool dLytMeter2Button_c::execute() {
|
||||
mStateMgr.executeState();
|
||||
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(832)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_2_BTN_NOTICE)) {
|
||||
mShouldCall = true;
|
||||
}
|
||||
} else {
|
||||
@@ -410,7 +411,8 @@ bool dLytMeter2Button_c::execute() {
|
||||
}
|
||||
|
||||
bool dLytMeter2Button_c::shouldCall() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(832)) {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_2_BTN_NOTICE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -587,11 +589,11 @@ bool dLytMeterMain_c::fn_800CA040() {
|
||||
}
|
||||
|
||||
void dLytMeterMain_c::setUiMode(u16 value) const {
|
||||
StoryflagManager::sInstance->setFlagOrCounterToValue(840, value);
|
||||
StoryflagManager::sInstance->setFlagOrCounterToValue(STORYFLAG_UI_MODE, value);
|
||||
}
|
||||
|
||||
u8 dLytMeterMain_c::getUiMode() {
|
||||
return StoryflagManager::sInstance->getFlag(840);
|
||||
return StoryflagManager::sInstance->getFlag(STORYFLAG_UI_MODE);
|
||||
}
|
||||
|
||||
dLytMeterMain_c::dLytMeterMain_c() {}
|
||||
@@ -1156,7 +1158,7 @@ void dLytMeterMain_c::checkPaneVisibility() {
|
||||
}
|
||||
}
|
||||
|
||||
if ((!StoryflagManager::sInstance->getCounterOrFlag(58) &&
|
||||
if ((!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_B_WHEEL_UNLOCKED) &&
|
||||
((LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_NONE &&
|
||||
mItemSelect.getField_0x5794() != 2 &&
|
||||
(!EventManager::isInEvent() || !EventManager::isCurrentEvent("ItemGetGorgeous")))))
|
||||
|
||||
@@ -485,7 +485,7 @@ bool dLytMeterCrossBtn_c::execute() {
|
||||
|
||||
mStateMgr.executeState();
|
||||
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(43)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_FIRST_TIME_LOFTWING_ANM)) {
|
||||
field_0x63B = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ void dLytMeterDowsing_c::initializeState_MenuSelectingIn() {
|
||||
mAnm[DOWSING_ANIM_IN].setForwardOnce();
|
||||
mAnm[DOWSING_ANIM_IN].setFrame(0.0f);
|
||||
mAnm[DOWSING_ANIM_IN].setAnimEnable(true);
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(583)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_UPGRADED_DOWSING)) {
|
||||
mAnm[DOWSING_ANIM_TYPE].setFrame(1.0f);
|
||||
} else {
|
||||
mAnm[DOWSING_ANIM_TYPE].setFrame(0.0f);
|
||||
@@ -683,7 +683,7 @@ void dLytMeterDowsing_c::initializeState_DemoMove() {
|
||||
mAnm[DOWSING_ANIM_IN].setToEnd2();
|
||||
mAnm[DOWSING_ANIM_IN].setAnimEnable(true);
|
||||
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(583)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_UPGRADED_DOWSING)) {
|
||||
mAnm[DOWSING_ANIM_TYPE].setFrame(1.0f);
|
||||
} else {
|
||||
mAnm[DOWSING_ANIM_TYPE].setFrame(0.0f);
|
||||
@@ -894,24 +894,25 @@ bool dLytMeterDowsing_c::remove() {
|
||||
|
||||
bool dLytMeterDowsing_c::execute() {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(566) &&
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_C_BTN_NOTICE) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) != LytDoButtonRelated::ACT_IE_NONE) {
|
||||
if (dLytMeter_c::GetMain()->fn_800D5380(0)) {
|
||||
field_0x5508 = 0;
|
||||
StoryflagManager::sInstance->unsetFlag(566);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_C_BTN_NOTICE);
|
||||
if (getSelectedDowsingSlot() != DowsingTarget::SLOT_NONE) {
|
||||
if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52) {
|
||||
StoryflagManager::sInstance->unsetFlag(818);
|
||||
if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) ==
|
||||
LytDoButtonRelated::ACT_IE_INFO_DOWSE) {
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_DOWSING_NOTICE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
field_0x5508 = 1;
|
||||
}
|
||||
} else if (StoryflagManager::sInstance->getCounterOrFlag(818) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52) {
|
||||
} else if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_DOWSING_NOTICE) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE) {
|
||||
if (field_0x5505 != 0 || field_0x550A != 0) {
|
||||
field_0x5508 = 0;
|
||||
StoryflagManager::sInstance->unsetFlag(818);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_DOWSING_NOTICE);
|
||||
} else {
|
||||
field_0x5508 = 1;
|
||||
}
|
||||
@@ -1112,8 +1113,9 @@ void dLytMeterDowsing_c::fn_800FE110() {
|
||||
|
||||
void dLytMeterDowsing_c::fn_800FE220() {
|
||||
if (getSelectedDowsingSlot() != DowsingTarget::SLOT_NONE &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52 && dLytMeter_c::GetMain()->fn_800D5380(0) &&
|
||||
!dLytMeter_c::GetMain()->fn_800D5650() && !dLytMeter_c::GetMain()->fn_800D5680()) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE &&
|
||||
dLytMeter_c::GetMain()->fn_800D5380(0) && !dLytMeter_c::GetMain()->fn_800D5650() &&
|
||||
!dLytMeter_c::GetMain()->fn_800D5680()) {
|
||||
mAnm[DOWSING_ANIM_RESET].setAnimEnable(true);
|
||||
mAnm[DOWSING_ANIM_RESET].setForwardOnce();
|
||||
mAnm[DOWSING_ANIM_RESET].setToStart();
|
||||
@@ -1260,10 +1262,10 @@ s32 dLytMeterDowsing_c::fn_800FE9C0(s32 unkId) const {
|
||||
|
||||
bool dLytMeterDowsing_c::shouldCall() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() &&
|
||||
((StoryflagManager::sInstance->getCounterOrFlag(566) &&
|
||||
((StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_C_BTN_NOTICE) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) != LytDoButtonRelated::ACT_IE_NONE) ||
|
||||
(StoryflagManager::sInstance->getCounterOrFlag(818) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52))) {
|
||||
(StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_DOWSING_NOTICE) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1830,11 +1830,11 @@ bool dLytMeterItemSelect_c::remove() {
|
||||
}
|
||||
|
||||
bool dLytMeterItemSelect_c::execute() {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(569) != 0) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_B_BTN_NOTICE) != 0) {
|
||||
if (field_0x57A2 != 0 || (field_0x57A0 != 0 && field_0x5794 != I_SAILCLOTH && field_0x5794 != I_BOAT_CANNON &&
|
||||
field_0x5794 != I_HARP)) {
|
||||
field_0x57B9 = 0;
|
||||
StoryflagManager::sInstance->unsetFlag(569);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_B_BTN_NOTICE);
|
||||
} else {
|
||||
field_0x57B9 = 1;
|
||||
}
|
||||
@@ -2481,7 +2481,7 @@ bool dLytMeterItemSelect_c::fn_800EFDF0(bool b) const {
|
||||
}
|
||||
|
||||
bool dLytMeterItemSelect_c::fn_800F0030() const {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(58) &&
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_B_WHEEL_UNLOCKED) &&
|
||||
!(EventManager::isInEvent() && EventManager::isCurrentEvent("ItemGetGorgeous")) ||
|
||||
(mpOwnerPane == nullptr || !mpOwnerPane->IsVisible() || dLytMeter_c::GetMain()->fn_800D5650() ||
|
||||
dLytMeter_c::GetMain()->fn_800D5680() || !dLytMeter_c::GetMain()->getItemSelectNotHiddenByAreaCaption())) {
|
||||
|
||||
@@ -844,10 +844,10 @@ bool dLytMeterMinusBtn_c::execute() {
|
||||
}
|
||||
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && mpPanes[MINUS_BTN_PANE_UIMODE]->IsVisible()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(568) != 0) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_MINUS_BTN_NOTICE) != 0) {
|
||||
if (field_0x4EB8 != 0) {
|
||||
field_0x4EB9 = 0;
|
||||
StoryflagManager::sInstance->unsetFlag(568);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_MINUS_BTN_NOTICE);
|
||||
} else {
|
||||
field_0x4EB9 = 1;
|
||||
}
|
||||
@@ -879,7 +879,7 @@ bool dLytMeterMinusBtn_c::execute() {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(30)) {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_POUCH_UNLOCKED)) {
|
||||
dLytMeter_c::GetInstance()->clearFlags(METER_BTN_MINUS);
|
||||
}
|
||||
|
||||
@@ -955,7 +955,8 @@ bool dLytMeterMinusBtn_c::execute() {
|
||||
}
|
||||
|
||||
bool dLytMeterMinusBtn_c::shouldCall() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(568)) {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_MINUS_BTN_NOTICE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1037,7 +1038,7 @@ bool dLytMeterMinusBtn_c::fn_800F7600() const {
|
||||
}
|
||||
|
||||
bool dLytMeterMinusBtn_c::fn_800F7760() const {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(30) ||
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_POUCH_UNLOCKED) ||
|
||||
(mpOwnerPane == nullptr || !mpOwnerPane->IsVisible() || dLytMeter_c::GetMain()->fn_800D5650() ||
|
||||
dLytMeter_c::GetMain()->fn_800D5680() || !dLytMeter_c::GetMain()->getMinusBtnNotHiddenByAreaCaption())) {
|
||||
return false;
|
||||
|
||||
@@ -127,7 +127,7 @@ bool dLytMeterPlusBtn_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
setMessage(LytDoButtonRelated::ACT_IE_NONE);
|
||||
|
||||
field_0x1C0 = 0;
|
||||
field_0x1C1 = StoryflagManager::sInstance->getCounterOrFlag(212);
|
||||
field_0x1C1 = StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_212);
|
||||
|
||||
mCallCount = 0;
|
||||
|
||||
@@ -176,7 +176,7 @@ bool dLytMeterPlusBtn_c::execute() {
|
||||
mShouldCall = true;
|
||||
} else {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(567)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_PLUS_BTN_NOTICE)) {
|
||||
mShouldCall = true;
|
||||
} else {
|
||||
mShouldCall = false;
|
||||
@@ -228,7 +228,8 @@ bool dLytMeterPlusBtn_c::execute() {
|
||||
}
|
||||
|
||||
bool dLytMeterPlusBtn_c::isCalling() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(567)) {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_PLUS_BTN_NOTICE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -237,7 +238,7 @@ bool dLytMeterPlusBtn_c::isCalling() const {
|
||||
void dLytMeterPlusBtn_c::setCall(bool shouldCall) {
|
||||
field_0x1C0 = shouldCall;
|
||||
if (shouldCall) {
|
||||
StoryflagManager::sInstance->setFlag(212);
|
||||
StoryflagManager::sInstance->setFlag(STORYFLAG_212);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -204,10 +204,10 @@ bool dLytMeterZBtn_c::execute() {
|
||||
}
|
||||
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(565)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_Z_BTN_NOTICE)) {
|
||||
if (dPad::getDownTrigZ()) {
|
||||
field_0x1C5 = 0;
|
||||
StoryflagManager::sInstance->unsetFlag(565);
|
||||
StoryflagManager::sInstance->unsetFlag(STORYFLAG_Z_BTN_NOTICE);
|
||||
} else {
|
||||
field_0x1C5 = 1;
|
||||
}
|
||||
@@ -273,7 +273,8 @@ void dLytMeterZBtn_c::setMessage(s32 id) {
|
||||
}
|
||||
|
||||
bool dLytMeterZBtn_c::isCalling() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(565)) {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() &&
|
||||
StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_Z_BTN_NOTICE)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "d/snd/d_snd_bgm_sound_battle.h"
|
||||
#include "d/snd/d_snd_bgm_sound.h"
|
||||
#include "d/snd/d_snd_mgr.h"
|
||||
#include "d/snd/d_snd_bgm_mml_parsers.h"
|
||||
#include "d/snd/d_snd_bgm_sound.h"
|
||||
#include "d/snd/d_snd_bgm_sound_battle.h"
|
||||
#include "d/snd/d_snd_mgr.h"
|
||||
#include "d/snd/d_snd_player_mgr.h"
|
||||
#include "d/snd/d_snd_sound.h"
|
||||
#include "d/snd/d_snd_state_mgr.h"
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "nw4r/snd/snd_SoundArchive.h"
|
||||
#include "nw4r/ut/ut_list.h"
|
||||
|
||||
|
||||
bool dSndBgmMgr_c::isSoundPlayedByBgmBattlePlayer(u32 soundId) {
|
||||
if (soundId == -1) {
|
||||
return false;
|
||||
@@ -133,7 +134,7 @@ void dSndBgmMgr_c::loadStageSound() {
|
||||
|
||||
if (dSndStateMgr_c::isInStage("F103")) {
|
||||
// Flooded Faron Woods
|
||||
if (!StoryflagManager::sInstance->getFlag(18)) {
|
||||
if (!StoryflagManager::sInstance->getFlag(STORYFLAG_ALL_TADTONES_GATHERED)) {
|
||||
bool ok = true;
|
||||
if (!dSndPlayerMgr_c::GetInstance()->isLoadedFileForSound(TAG_BGM_EVENT_COMP_NOTE)) {
|
||||
ok = dSndPlayerMgr_c::GetInstance()->loadFileForSound(TAG_BGM_EVENT_COMP_NOTE);
|
||||
|
||||
@@ -12,8 +12,9 @@ typedef TList<DowsingTarget, offsetof(DowsingTarget, mLink)> DowsingList;
|
||||
DowsingList DOWSING_LISTS[8];
|
||||
|
||||
static const int DOWSING_TARGET_STORY_FLAGS[8] = {
|
||||
100, 105, 100, 104, 108, 110, 109, 102,
|
||||
}; // TODO (Story Flag ID)
|
||||
STORYFLAG_ZELDA_DOWSING, STORYFLAG_RUPEE_DOWSING, STORYFLAG_ZELDA_DOWSING, STORYFLAG_CRYSTAL_DOWSING,
|
||||
STORYFLAG_HEART_DOWSING, STORYFLAG_GODDESS_CUBE_DOWSING, STORYFLAG_109, STORYFLAG_TREASURE_DOWSING,
|
||||
};
|
||||
|
||||
DowsingTarget::~DowsingTarget() {
|
||||
doUnregister();
|
||||
@@ -56,22 +57,23 @@ void DowsingTarget::getPosition(mVec3_c &position) {
|
||||
PSMTXMultVec(mtx.m, mOffset, position);
|
||||
}
|
||||
|
||||
// TODO (Story Flag IDs)
|
||||
|
||||
bool DowsingTarget::hasZeldaDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(100);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_ZELDA_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasKikwiDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(56) && !StoryflagManager::sInstance->getCounterOrFlag(57);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_KIKWI_DOWSING) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_KIKWI_FIND_FINISHED);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasKeyPieceDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(106) && !StoryflagManager::sInstance->getCounterOrFlag(120);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_KEYPIECE_DOWSING) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_KEYPIECE_COMPLETE);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasDesertNodeDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(107) && !StoryflagManager::sInstance->getCounterOrFlag(8);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_GENERATOR_DOWSING) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_LMF_RAISED);
|
||||
}
|
||||
|
||||
inline bool checkTrial(u16 itemflag, u16 storyflag) {
|
||||
@@ -81,45 +83,50 @@ inline bool checkTrial(u16 itemflag, u16 storyflag) {
|
||||
false;
|
||||
}
|
||||
|
||||
// TODO (Story Flag IDs) (you get the point lmao)
|
||||
bool DowsingTarget::hasAnyTrialDowsing() {
|
||||
return checkTrial(187, 93) || checkTrial(188, 97) || checkTrial(189, 98) || checkTrial(193, 99);
|
||||
return checkTrial(ITEM_FARORES_COURAGE, STORYFLAG_FARON_TRIAL_UNLOCKED) ||
|
||||
checkTrial(ITEM_NAYRUS_WISDOM, STORYFLAG_LANAYRU_TRIAL_UNLOCKED) ||
|
||||
checkTrial(ITEM_DINS_POWER, STORYFLAG_ELDIN_TRIAL_UNLOCKED) ||
|
||||
checkTrial(ITEM_SOTH, STORYFLAG_HYLIA_TRIAL_UNLOCKED);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasSacredWaterDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(64) && !StoryflagManager::sInstance->getCounterOrFlag(65);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_SACRED_WATER_DOWSING) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_WATER_DRAGON_HEALED);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasSandshipDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(271) && !StoryflagManager::sInstance->getCounterOrFlag(14);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_SANDSHIP_DOWSING) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_SANDSHIP_ENTERED);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasTadtoneDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(81) && !StoryflagManager::sInstance->getCounterOrFlag(18);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_TADTONE_DOWSING) &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_ALL_TADTONES_GATHERED);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasPropellerDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(668);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_PROPELLER_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasWaterBasinDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(669);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_WATER_BASIN_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasCrystalBallDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(670);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_CRYSTAL_BALL_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasPumpkinDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(680);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_PUMPKIN_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasNewPlantSpeciesDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(681);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_KIKWI_SPECIES_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasPartyWheelDowsing() {
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(682);
|
||||
return StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_PARTY_WHEEL_DOWSING);
|
||||
}
|
||||
|
||||
bool DowsingTarget::hasDowsingInSlot(int slot) {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/unk_save_time.h"
|
||||
|
||||
|
||||
// https://github.com/lepelog/skywardsword-tools/wiki/Navi-Table-(Fi-Advice)
|
||||
|
||||
// Portability hazard, only works for 32 bit architectures
|
||||
@@ -88,7 +87,7 @@ s16 FiAnalysisHandle::getEquipmentFocus() const {
|
||||
if (!isValid()) {
|
||||
return -1;
|
||||
} else {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(530)) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_BOSS_RUSH_ACTIVE)) {
|
||||
// "I cannot offer my usual analysis because you are currently engaged in a challenge created by the Thunder
|
||||
// Dragon Lanayru."
|
||||
return 180;
|
||||
@@ -153,7 +152,7 @@ void FiContext::initialize(void *data) {
|
||||
}
|
||||
|
||||
s16 FiContext::getNaviTableProgressSummary() {
|
||||
if (StoryflagManager::sInstance->getFlag(530)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_BOSS_RUSH_ACTIVE)) {
|
||||
// When in boss rush, no progress is available since story flags
|
||||
// are unreliable here.
|
||||
// "You are currently reliving some of your previous battles within the Thunder Dragon's Lightning Round..."
|
||||
@@ -172,7 +171,7 @@ s16 FiContext::getNaviTableProgressSummary() {
|
||||
}
|
||||
|
||||
s16 FiContext::getFiAdviceHintEntry() {
|
||||
if (StoryflagManager::sInstance->getFlag(530)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_BOSS_RUSH_ACTIVE)) {
|
||||
// When in boss rush, no hint since location doesn't make sense
|
||||
// "Master, this is a world built from your memories by Lanayru, the Thunder Dragon"
|
||||
return 37;
|
||||
@@ -192,20 +191,22 @@ s16 FiContext::getFiAdviceHintEntry() {
|
||||
}
|
||||
|
||||
s16 FiContext::getObjective() {
|
||||
if (StoryflagManager::sInstance->getFlag(530)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_BOSS_RUSH_ACTIVE)) {
|
||||
// When in boss rush, objective is to beat the mode
|
||||
// "Master, your primary objective is to defeat the enemy here and overcome the grueling task the Thunder
|
||||
// Dragon, Lanayru, has set before you..."
|
||||
return 92;
|
||||
} else {
|
||||
if (StoryflagManager::sInstance->getFlag(136) && StoryflagManager::sInstance->getFlag(143) &&
|
||||
StoryflagManager::sInstance->getFlag(144) && StoryflagManager::sInstance->getFlag(145) &&
|
||||
!StoryflagManager::sInstance->getFlag(133)) {
|
||||
if (StoryflagManager::sInstance->getFlag(STORYFLAG_IMPRISONED_FIGHT) &&
|
||||
StoryflagManager::sInstance->getFlag(STORYFLAG_IMPRISONED_1_FIGHT) &&
|
||||
StoryflagManager::sInstance->getFlag(STORYFLAG_IMPRISONED_2_FIGHT) &&
|
||||
StoryflagManager::sInstance->getFlag(STORYFLAG_IMPRISONED_3_FIGHT) &&
|
||||
!StoryflagManager::sInstance->getFlag(STORYFLAG_IMPRISONED_3_DEFEATED)) {
|
||||
// "Demise has once again broken the seal that binds him..."
|
||||
return 70;
|
||||
}
|
||||
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(21)) {
|
||||
if (!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_THUNDER_DRAGON_SOTH_COMPLETED)) {
|
||||
if (ItemflagManager::sInstance->getFlagDirect(ITEM_LIFE_TREE_SEED) &&
|
||||
!ItemflagManager::sInstance->getFlagDirect(ITEM_LIFE_TREE_FRUIT)) {
|
||||
// "I project that the soil in Lanayru Province will not provide enough nourishment for the Life Tree
|
||||
@@ -310,7 +311,8 @@ u16 FiContext::prepareFiHelpIndex() {
|
||||
}
|
||||
}
|
||||
|
||||
if (FileManager::GetInstance()->getCurrentHealth() <= 12 && !StoryflagManager::sInstance->getCounterOrFlag(808)) {
|
||||
if (FileManager::GetInstance()->getCurrentHealth() <= 12 &&
|
||||
!StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_LOW_HEART_NOTICE)) {
|
||||
ret = 6401;
|
||||
// "Your hearts have decreased quite dramatically..."
|
||||
setHelpIndex(0);
|
||||
@@ -336,8 +338,8 @@ u16 FiContext::prepareFiHelpIndex() {
|
||||
u32 numRupees = dAcItem_c::getRupeeCounter();
|
||||
u32 walletCapacity = dAcItem_c::getCurrentWalletCapacity();
|
||||
|
||||
if (!StoryflagManager::sInstance->getFlag(727) && walletCapacity != 0 && numRupees == walletCapacity &&
|
||||
!getField_0x47()) {
|
||||
if (!StoryflagManager::sInstance->getFlag(STORYFLAG_WALLET_FULL_ACK) && walletCapacity != 0 &&
|
||||
numRupees == walletCapacity && !getField_0x47()) {
|
||||
ret = 6400;
|
||||
// "Master, your wallet is full..."
|
||||
setHelpIndex(5);
|
||||
@@ -431,8 +433,8 @@ void FiContext::fn_8016CB40() {
|
||||
}
|
||||
|
||||
bool FiContext::isInLeviasFightMaybe() {
|
||||
if (dScGame_c::isCurrentStage("F023") && StoryflagManager::sInstance->getFlag(368) &&
|
||||
!StoryflagManager::sInstance->getFlag(200)) {
|
||||
if (dScGame_c::isCurrentStage("F023") && StoryflagManager::sInstance->getFlag(STORYFLAG_LEVIAS_FIGHT_STARTED) &&
|
||||
!StoryflagManager::sInstance->getFlag(STORYFLAG_LEVIAS_FIGHT_DEFEATED)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user