mirror of
https://github.com/zeldaret/botw
synced 2026-10-21 09:10:57 -04:00
uking/scene: move the map getters to uking::StageInfo
They're linked before gameStageInfo.cpp's sinit with no other sinit in between, so they belong to gameStageInfo, not gameScene, and become StageInfo statics declared in gameStageInfo.h. Their GameScene owner was a guess. (AI assisted using Claude Opus 5.5)
This commit is contained in:
@@ -49623,8 +49623,8 @@ Address,Quality,Size,Name
|
||||
0x00000071007cbea4,U,000004,nullsub_2444
|
||||
0x00000071007cbea8,U,000004,j__ZdlPv_353
|
||||
0x00000071007cbeac,U,000440,StageFactory::create
|
||||
0x00000071007cc064,O,000020,_ZN5uking9GameScene17getCurrentMapTypeEv
|
||||
0x00000071007cc078,O,000020,_ZN5uking9GameScene17getCurrentMapNameEv
|
||||
0x00000071007cc064,O,000020,_ZN5uking9StageInfo17getCurrentMapTypeEv
|
||||
0x00000071007cc078,O,000020,_ZN5uking9StageInfo17getCurrentMapNameEv
|
||||
0x00000071007cc08c,U,000012,getPSavePosAngleForStageGen
|
||||
0x00000071007cc098,U,000012,getPSavePosForStageGen
|
||||
0x00000071007cc0a4,U,003264,genStageUpdateMapTypeFlags
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1,5 +1,5 @@
|
||||
#include "Game/Actor/Damage/actDamageInfoMgr.h"
|
||||
#include "Game/Scene/gameScene.h"
|
||||
#include "Game/Scene/gameStageInfo.h"
|
||||
#include "KingSystem/ActorSystem/actGlobalParameter.h"
|
||||
#include "KingSystem/GameData/gdtCommonFlagsUtils.h"
|
||||
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectGlobal.h"
|
||||
@@ -49,7 +49,7 @@ bool DamageInfoMgr::isTrueFormMasterSword() const {
|
||||
if (ksys::gdt::getFlag_LastBossGanonBeastGenerateFlag())
|
||||
return true;
|
||||
|
||||
const sead::SafeString& map = GameScene::getCurrentMapName();
|
||||
const sead::SafeString& map = StageInfo::getCurrentMapName();
|
||||
|
||||
if (!ksys::gdt::getFlag_Die_PGanonElectric() && map == "RemainsElectric")
|
||||
return true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Game/Actor/Query/queryIsCurrentMainFieldStage.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/Scene/gameScene.h"
|
||||
#include "Game/Scene/gameStageInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -9,7 +9,7 @@ IsCurrentMainFieldStage::IsCurrentMainFieldStage(const InitArg& arg) : ksys::act
|
||||
IsCurrentMainFieldStage::~IsCurrentMainFieldStage() = default;
|
||||
|
||||
int IsCurrentMainFieldStage::doQuery() {
|
||||
return GameScene::getCurrentMapType() == "MainField";
|
||||
return StageInfo::getCurrentMapType() == "MainField";
|
||||
}
|
||||
|
||||
void IsCurrentMainFieldStage::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
#include "Game/Scene/gameScene.h"
|
||||
#include "KingSystem/System/StageInfo.h"
|
||||
|
||||
namespace uking {
|
||||
|
||||
bool GameScene::sIsOpenWorldDemo{};
|
||||
|
||||
const sead::SafeString& GameScene::getCurrentMapType() {
|
||||
return ksys::StageInfo::getCurrentMapType();
|
||||
}
|
||||
|
||||
const sead::SafeString& GameScene::getCurrentMapName() {
|
||||
return ksys::StageInfo::getCurrentMapName();
|
||||
}
|
||||
|
||||
} // namespace uking
|
||||
|
||||
@@ -9,12 +9,6 @@ class GameScene {
|
||||
public:
|
||||
static bool isOpenWorldDemo() { return sIsOpenWorldDemo; }
|
||||
|
||||
/// Get the current map type (e.g. MainFieldDungeon)
|
||||
static const sead::SafeString& getCurrentMapType();
|
||||
|
||||
/// Get the current map name (e.g. RemainsWind, FinalTrial, ...)
|
||||
static const sead::SafeString& getCurrentMapName();
|
||||
|
||||
private:
|
||||
static bool sIsOpenWorldDemo;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "Game/Scene/gameStageInfo.h"
|
||||
#include "KingSystem/System/StageInfo.h"
|
||||
#include "KingSystem/Utils/InitTimeInfo.h"
|
||||
|
||||
namespace uking {
|
||||
@@ -7,4 +8,12 @@ static ksys::util::InitConstants sConstants;
|
||||
sead::FixedSafeString<256> StageInfo::sStr;
|
||||
StageInfo StageInfo::sInfo;
|
||||
|
||||
const sead::SafeString& StageInfo::getCurrentMapType() {
|
||||
return ksys::StageInfo::getCurrentMapType();
|
||||
}
|
||||
|
||||
const sead::SafeString& StageInfo::getCurrentMapName() {
|
||||
return ksys::StageInfo::getCurrentMapName();
|
||||
}
|
||||
|
||||
} // namespace uking
|
||||
|
||||
@@ -28,6 +28,12 @@ public:
|
||||
static bool isAocField() { return sInfo.mIsAocField; }
|
||||
static bool isMainField() { return sInfo.mIsMainField; }
|
||||
|
||||
/// Get the current map type (e.g. MainFieldDungeon)
|
||||
static const sead::SafeString& getCurrentMapType();
|
||||
|
||||
/// Get the current map name (e.g. RemainsWind, FinalTrial, ...)
|
||||
static const sead::SafeString& getCurrentMapName();
|
||||
|
||||
static sead::FixedSafeString<256> sStr;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user