mirror of https://github.com/zeldaret/botw.git
ksys/world: Implement WorldMgr::onStageInit
This commit is contained in:
parent
98ace1a751
commit
47ae6e2b0b
|
@ -63761,8 +63761,8 @@
|
|||
0x0000007100b1b98c,sub_7100B1B98C,92,
|
||||
0x0000007100b1b9e8,nullsub_3238,4,
|
||||
0x0000007100b1b9ec,j__ZdlPv_606,4,
|
||||
0x0000007100b1b9f0,_ZN4sead6CameraD2Ev,4,
|
||||
0x0000007100b1b9f4,j__ZdlPv_607,4,
|
||||
0x0000007100b1b9f0,_ZN4sead6CameraD2Ev,4,_ZN4sead6CameraD1Ev
|
||||
0x0000007100b1b9f4,j__ZdlPv_607,4,_ZN4sead6CameraD0Ev
|
||||
0x0000007100b1b9f8,_ZNK4sead6Camera19getWorldPosByMatrixEPNS_7Vector3IfEE,96,
|
||||
0x0000007100b1ba58,sead::Camera::x,20,
|
||||
0x0000007100b1ba6c,sub_7100B1BA6C,20,
|
||||
|
@ -63771,7 +63771,7 @@
|
|||
0x0000007100b1bb0c,_ZNK4sead6Camera27cameraPosToWorldPosByMatrixEPNS_7Vector3IfEERKS2_,176,
|
||||
0x0000007100b1bbbc,sub_7100B1BBBC,156,
|
||||
0x0000007100b1bc58,sub_7100B1BC58,304,
|
||||
0x0000007100b1bd88,_ZN4sead12LookAtCameraC1ERKNS_7Vector3IfEES4_S4_,240,
|
||||
0x0000007100b1bd88,_ZN4sead12LookAtCameraC1ERKNS_7Vector3IfEES4_S4_,240,_ZN4sead12LookAtCameraC1ERKNS_7Vector3IfEES4_S4_
|
||||
0x0000007100b1be78,j__ZdlPv_608,4,
|
||||
0x0000007100b1be7c,_ZNK4sead12LookAtCamera14doUpdateMatrixEPNS_8Matrix34IfEE,432,
|
||||
0x0000007100b1c02c,sub_7100B1C02C,104,
|
||||
|
@ -63779,8 +63779,8 @@
|
|||
0x0000007100b1c178,j__ZdlPv_609,4,
|
||||
0x0000007100b1c17c,sub_7100B1C17C,168,
|
||||
0x0000007100b1c224,j__ZdlPv_610,4,
|
||||
0x0000007100b1c228,sub_7100B1C228,112,
|
||||
0x0000007100b1c298,sub_7100B1C298,92,
|
||||
0x0000007100b1c228,sub_7100B1C228,112,_ZNK4sead6Camera27checkDerivedRuntimeTypeInfoEPKNS_15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100b1c298,sub_7100B1C298,92,_ZNK4sead6Camera18getRuntimeTypeInfoEv
|
||||
0x0000007100b1c2f4,sead::LookAtCamera::rtti1,204,
|
||||
0x0000007100b1c3c0,sead::LookAtCamera::rtti2,92,
|
||||
0x0000007100b1c41c,sub_7100B1C41C,204,
|
||||
|
@ -74977,8 +74977,8 @@
|
|||
0x0000007100d8b954,sub_7100D8B954,912,
|
||||
0x0000007100d8bce4,sub_7100D8BCE4,384,
|
||||
0x0000007100d8be64,sub_7100D8BE64,1008,
|
||||
0x0000007100d8c254,sub_7100D8C254,100,
|
||||
0x0000007100d8c2b8,sub_7100D8C2B8,108,
|
||||
0x0000007100d8c254,sub_7100D8C254,100,_ZN4ksys9CameraMgr18SingletonDisposer_D1Ev
|
||||
0x0000007100d8c2b8,sub_7100D8C2B8,108,_ZN4ksys9CameraMgr18SingletonDisposer_D0Ev
|
||||
0x0000007100d8c324,Camera::createInstance,168,
|
||||
0x0000007100d8c3cc,sub_7100D8C3CC,56,
|
||||
0x0000007100d8c404,sub_7100D8C404,68,
|
||||
|
@ -89360,7 +89360,7 @@
|
|||
0x00000071010e60f4,wm::TimeMgr::ctor,228,_ZN4ksys5world7TimeMgrC1Ev
|
||||
0x00000071010e61d8,wm::TimeMgr::init,36,_ZN4ksys5world7TimeMgr5init_EPN4sead4HeapE
|
||||
0x00000071010e61fc,wm::TimeMgr::resetForStageUnload,124,_ZN4ksys5world7TimeMgr19resetForStageUnloadEv
|
||||
0x00000071010e6278,wm::TimeMgr::loadInfo,388,_ZN4ksys5world7TimeMgr8loadInfoEv
|
||||
0x00000071010e6278,wm::TimeMgr::loadInfo,388,_ZN4ksys5world7TimeMgr5resetEv
|
||||
0x00000071010e63fc,wm::TimeMgr::loadFlags,1632,_ZN4ksys5world7TimeMgr9loadFlagsEv
|
||||
0x00000071010e6a5c,wm::TimeMgr::dtor,172,_ZN4ksys5world7TimeMgrD1Ev
|
||||
0x00000071010e6b08,sub_71010E6B08,132,_ZN4sead13DelegateEventIRKN4ksys5world7TimeMgr11NewDayEventEED2Ev
|
||||
|
@ -89580,7 +89580,7 @@
|
|||
0x00000071010f40bc,WorldMgr::init,836,_ZN4ksys5world7Manager4initEPN4sead4HeapE
|
||||
0x00000071010f4400,WorldMgr::resetForStageUnload,84,_ZN4ksys5world7Manager19resetForStageUnloadEv
|
||||
0x00000071010f4454,WorldMgr::loadBwinfo,148,_ZN4ksys5world7Manager16loadWorldInfoResEv
|
||||
0x00000071010f44e8,WorldMgr::loadWorldInfo,8668,
|
||||
0x00000071010f44e8,WorldMgr::loadWorldInfo,8668,_ZN4ksys5world7Manager11onStageInitENS_9StageTypeEbb
|
||||
0x00000071010f66c4,WorldMgr::updateRemainsType,268,_ZN4ksys5world7Manager17updateRemainsTypeEv
|
||||
0x00000071010f67d0,WorldMgr::updateGraphicsMap,164,
|
||||
0x00000071010f6874,sub_71010F6874,680,_ZN4ksys5world7ManagerD1Ev
|
||||
|
|
Can't render this file because it is too large.
|
2
lib/sead
2
lib/sead
|
@ -1 +1 @@
|
|||
Subproject commit 7357a8dd63f94094aff52292243f84c09b159a81
|
||||
Subproject commit 9361c60f9a187080d7febb53d03279bb6e7454df
|
|
@ -5,6 +5,8 @@ target_sources(uking PRIVATE
|
|||
BasicProfiler.h
|
||||
CameraEditor.cpp
|
||||
CameraEditor.h
|
||||
CameraMgr.cpp
|
||||
CameraMgr.h
|
||||
DebugMessage.h
|
||||
HavokWorkerMgr.cpp
|
||||
HavokWorkerMgr.h
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#include "KingSystem/System/CameraMgr.h"
|
||||
|
||||
namespace ksys {
|
||||
|
||||
SEAD_SINGLETON_DISPOSER_IMPL(CameraMgr)
|
||||
|
||||
} // namespace ksys
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <heap/seadDisposer.h>
|
||||
#include <hostio/seadHostIONode.h>
|
||||
|
||||
namespace sead {
|
||||
class LookAtCamera;
|
||||
}
|
||||
|
||||
namespace ksys {
|
||||
|
||||
// FIXME: incomplete
|
||||
class CameraMgr : public sead::hostio::Node {
|
||||
SEAD_SINGLETON_DISPOSER(CameraMgr)
|
||||
CameraMgr() = default;
|
||||
virtual ~CameraMgr() = default;
|
||||
|
||||
public:
|
||||
sead::LookAtCamera* getLookAtCamera() const;
|
||||
};
|
||||
|
||||
} // namespace ksys
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <agl/Utils/aglParameterObj.h>
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
#include "KingSystem/World/worldJob.h"
|
||||
|
||||
|
@ -12,7 +13,14 @@ public:
|
|||
|
||||
JobType getType() const override { return JobType::Dof; }
|
||||
|
||||
u8 _20[0x1c0 - 0x20];
|
||||
void reset();
|
||||
|
||||
private:
|
||||
friend class Manager;
|
||||
|
||||
u8 _20[0x138 - 0x20];
|
||||
agl::utl::ParameterObj mDofMgrParamObj;
|
||||
u8 _168[0x1c0 - 0x168];
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(DofMgr, 0x1c0);
|
||||
|
||||
|
|
|
@ -212,6 +212,14 @@ protected:
|
|||
void calc_() override;
|
||||
|
||||
private:
|
||||
friend class Manager;
|
||||
|
||||
static constexpr int NumEnvPalettes = 207;
|
||||
static constexpr int NumCdanAddFog = 4;
|
||||
static constexpr int NumEnvAttributes = 59;
|
||||
static constexpr int NumWeatherInfluences = 4;
|
||||
static constexpr int NumRemains = 7;
|
||||
|
||||
void initEnvAttribute(int idx);
|
||||
void initEnvPalette(int idx);
|
||||
void initWeatherInfluence(int idx);
|
||||
|
@ -235,12 +243,12 @@ private:
|
|||
int mPreviousPaletteSet = 0;
|
||||
int mActivePaletteSet = 0;
|
||||
float mPaletteSetTransition = 0.0;
|
||||
sead::SafeArray<EnvPalette, 207> mEnvPalettes;
|
||||
sead::SafeArray<CdanAddFog, 4> mCdanAddFog;
|
||||
sead::SafeArray<EnvPalette, NumEnvPalettes> mEnvPalettes;
|
||||
sead::SafeArray<CdanAddFog, NumCdanAddFog> mCdanAddFog;
|
||||
EnvPaletteStatic mEnvPaletteStaticUnused;
|
||||
sead::SafeArray<EnvAttribute, 59> mEnvAttributes;
|
||||
sead::SafeArray<WeatherInfluence, 4> mWeatherInfluences;
|
||||
sead::SafeArray<Remains, 7> mRemains;
|
||||
sead::SafeArray<EnvAttribute, NumEnvAttributes> mEnvAttributes;
|
||||
sead::SafeArray<WeatherInfluence, NumWeatherInfluences> mWeatherInfluences;
|
||||
sead::SafeArray<Remains, NumRemains> mRemains;
|
||||
IndoorPalette mIndoorPalette;
|
||||
sead::Color4f _6b4e8;
|
||||
sead::Color4f _6b4f8;
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
#include "KingSystem/World/worldManager.h"
|
||||
#include <cmath>
|
||||
#include <container/seadSafeArray.h>
|
||||
#include <gfx/seadCamera.h>
|
||||
#include <math/seadMathCalcCommon.h>
|
||||
#include <mc/seadWorkerMgr.h>
|
||||
#include "KingSystem/ActorSystem/actActorConstDataAccess.h"
|
||||
#include "KingSystem/ActorSystem/actActorSystem.h"
|
||||
#include "KingSystem/Ecosystem/ecoSystem.h"
|
||||
#include "KingSystem/Event/evtManager.h"
|
||||
#include "KingSystem/Resource/resLoadRequest.h"
|
||||
#include "KingSystem/Resource/resResource.h"
|
||||
#include "KingSystem/System/CameraMgr.h"
|
||||
#include "KingSystem/Utils/InitTimeInfo.h"
|
||||
|
||||
namespace ksys::world {
|
||||
|
@ -69,11 +74,11 @@ void Manager::setWeatherType(WeatherType weather_type, bool x, bool y, bool for_
|
|||
if (mWeatherSetForDemo && !for_demo)
|
||||
return;
|
||||
|
||||
if (_794 != 0 && y && mWeatherType.mValue > u8(weather_type))
|
||||
if (mWeatherTypeTimer != 0 && y && mWeatherType.mValue > u8(weather_type))
|
||||
return;
|
||||
|
||||
mWeatherType = weather_type;
|
||||
_794 = 4;
|
||||
mWeatherTypeTimer = 4;
|
||||
_7d5 = x;
|
||||
mWeatherSetForDemo = for_demo;
|
||||
}
|
||||
|
@ -124,11 +129,11 @@ float Manager::getClimateTransitionProgress() const {
|
|||
}
|
||||
|
||||
bool Manager::isDayLockBlueSky(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].dayLockBlueSky.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].DayLockBlueSky.ref();
|
||||
}
|
||||
|
||||
bool Manager::isNightLockBlueSky(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].nightLockBlueSky.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].NightLockBlueSky.ref();
|
||||
}
|
||||
|
||||
float Manager::calcTempDay(float height) const {
|
||||
|
@ -155,7 +160,7 @@ float Manager::calcTempDay(float height) const {
|
|||
}
|
||||
|
||||
if (a != -1) {
|
||||
const auto& temps = mWorldInfo.mClimates[int(mCurrentClimate)].climateTempDay;
|
||||
const auto& temps = mWorldInfo.mClimates[int(mCurrentClimate)].ClimateTempDay;
|
||||
const float v = *temps[b];
|
||||
const float u = *temps[a];
|
||||
normal_temp = u + t * (v - u);
|
||||
|
@ -197,7 +202,7 @@ float Manager::calcTempNight(float height) const {
|
|||
}
|
||||
|
||||
if (a != -1) {
|
||||
const auto& temps = mWorldInfo.mClimates[int(mCurrentClimate)].climateTempNight;
|
||||
const auto& temps = mWorldInfo.mClimates[int(mCurrentClimate)].ClimateTempNight;
|
||||
const float v = *temps[b];
|
||||
const float u = *temps[a];
|
||||
normal_temp = u + t * (v - u);
|
||||
|
@ -218,13 +223,13 @@ float Manager::calcTempNight(float height) const {
|
|||
float Manager::getMoistureMax() const {
|
||||
if (!isMainField() || !worldInfoLoaded())
|
||||
return 0.0;
|
||||
return mWorldInfo.mClimates[int(mCurrentClimate)].moistureMax.ref();
|
||||
return mWorldInfo.mClimates[int(mCurrentClimate)].MoistureMax.ref();
|
||||
}
|
||||
|
||||
float Manager::getMoistureMin() const {
|
||||
if (!isMainField() || !worldInfoLoaded())
|
||||
return 0.0;
|
||||
return mWorldInfo.mClimates[int(mCurrentClimate)].moistureMin.ref();
|
||||
return mWorldInfo.mClimates[int(mCurrentClimate)].MoistureMin.ref();
|
||||
}
|
||||
|
||||
sead::Vector3f Manager::getWindDirection() const {
|
||||
|
@ -243,8 +248,8 @@ sead::Vector3f Manager::getWindDirection() const {
|
|||
float Manager::getWindSpeed() const {
|
||||
float value = 0.0;
|
||||
if (isMainField() && worldInfoLoaded()) {
|
||||
value = mWorldInfo.mClimates[int(mCurrentClimate)].windPower.ref();
|
||||
value *= mWorldInfo.mClimates[int(mCurrentClimate)].windPowerMultiplier;
|
||||
value = mWorldInfo.mClimates[int(mCurrentClimate)].WindPower.ref();
|
||||
value *= mWorldInfo.mClimates[int(mCurrentClimate)].WindPowerMultiplier;
|
||||
}
|
||||
overrideWindSpeed(&value);
|
||||
return value;
|
||||
|
@ -253,8 +258,8 @@ float Manager::getWindSpeed() const {
|
|||
float Manager::getWindSpeed(const sead::Vector3f& pos) const {
|
||||
float value = 0.0;
|
||||
if (isMainField() && worldInfoLoaded()) {
|
||||
value = mWorldInfo.mClimates[int(getClimate(pos))].windPower.ref();
|
||||
value *= mWorldInfo.mClimates[int(getClimate(pos))].windPowerMultiplier;
|
||||
value = mWorldInfo.mClimates[int(getClimate(pos))].WindPower.ref();
|
||||
value *= mWorldInfo.mClimates[int(getClimate(pos))].WindPowerMultiplier;
|
||||
}
|
||||
overrideWindSpeed(&value);
|
||||
return value;
|
||||
|
@ -284,7 +289,7 @@ int Manager::getPaletteSetSelect() const {
|
|||
if (isAocField())
|
||||
return 0;
|
||||
|
||||
return mWorldInfo.mClimates[int(climate)].paletteSetSelect.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].PaletteSetSelect.ref();
|
||||
}
|
||||
|
||||
int Manager::getFogType() const {
|
||||
|
@ -296,7 +301,7 @@ int Manager::getFogType() const {
|
|||
if (isAocField())
|
||||
return 0;
|
||||
|
||||
return mWorldInfo.mClimates[int(climate)].fogType.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].FogType.ref();
|
||||
}
|
||||
|
||||
bool Manager::isForbidComeback() const {
|
||||
|
@ -306,7 +311,7 @@ bool Manager::isForbidComeback() const {
|
|||
bool Manager::isForbidComeback(Climate climate) const {
|
||||
if (!worldInfoLoaded() || !isMainField())
|
||||
return false;
|
||||
return mWorldInfo.mClimates[int(climate)].forbidComeback.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].ForbidComeback.ref();
|
||||
}
|
||||
|
||||
void Manager::unload() {
|
||||
|
@ -366,7 +371,7 @@ void Manager::init(sead::Heap* heap) {
|
|||
|
||||
void Manager::resetForStageUnload() {
|
||||
getTimeMgr()->resetForStageUnload();
|
||||
getSkyMgr()->resetForStageUnload();
|
||||
getEnvMgr()->resetForStageUnload();
|
||||
}
|
||||
|
||||
void Manager::loadWorldInfoRes() {
|
||||
|
@ -375,6 +380,308 @@ void Manager::loadWorldInfoRes() {
|
|||
mInfoRes = mWorldInfo.mResHandle.load("WorldMgr/normal.bwinfo", &req);
|
||||
}
|
||||
|
||||
void Manager::onStageInit(StageType stage_type, bool is_demo, bool is_main_field) {
|
||||
mTimer = 30;
|
||||
mTicks = 0;
|
||||
_6c8 = 0;
|
||||
_6cc = true;
|
||||
mStageType = mStageType2 = stage_type;
|
||||
mIsDemo = is_demo;
|
||||
mIsMainField = is_main_field;
|
||||
mIsBattleCurseR = false;
|
||||
mInFinalTrialBossBattleArea = false;
|
||||
|
||||
if (auto* camera = CameraMgr::instance()->getLookAtCamera()) {
|
||||
mCameraPos = camera->getPos();
|
||||
mPrevCameraPos = mCameraPos;
|
||||
mPrevCameraPos.y += 200.0f;
|
||||
mCurrentClimate = getClimate(mCameraPos);
|
||||
act::ActorConstDataAccess accessor;
|
||||
act::ActorSystem::instance()->getPlayer(&accessor);
|
||||
if (accessor.hasProc()) {
|
||||
mPlayerPos = accessor.getPreviousPos();
|
||||
mPrevPlayerPos = mPlayerPos;
|
||||
}
|
||||
mPrevClimate = mCurrentClimate;
|
||||
mClimateTransitionProgress = 1.0f;
|
||||
}
|
||||
|
||||
res::LoadRequest req(0x2000, 1, false);
|
||||
req.mRequester = "wiWorldMgr";
|
||||
if (mInfoRes) {
|
||||
auto* res = sead::DynamicCast<sead::DirectResource>(mInfoRes);
|
||||
if (!worldInfoLoaded()) {
|
||||
auto& climates = mWorldInfo.mClimates;
|
||||
for (int i = 0; i < climates.size(); ++i) {
|
||||
climates[i].WeatherType.init(0, "WeatherType", "天候状態 0:晴 1:曇 2:雨 3:雪",
|
||||
"Min=0, Max=10", &climates[i].obj);
|
||||
climates[i].WeatherBlueskyRate.init(60, "WeatherBlueskyRate", "晴天確率",
|
||||
"Min=0, Max=60", &climates[i].obj);
|
||||
climates[i].WeatherCloudyRate.init(20, "WeatherCloudyRate", "曇天確率",
|
||||
"Min=0, Max=20", &climates[i].obj);
|
||||
climates[i].WeatherRainRate.init(15, "WeatherRainRate", "雨天確率", "Min=0, Max=20",
|
||||
&climates[i].obj);
|
||||
climates[i].WeatherHeavyRainRate.init(5, "WeatherHeavyRainRate", "大雨確率",
|
||||
"Min=0, Max=20", &climates[i].obj);
|
||||
climates[i].WeatherStormRate.init(0, "WeatherStormRate", "嵐天確率",
|
||||
"Min=0, Max=20", &climates[i].obj);
|
||||
climates[i].DayLockBlueSky.init(false, "DayLockBlueSky", "昼間晴天固定",
|
||||
"Min=0, Max=1", &climates[i].obj);
|
||||
climates[i].NightLockBlueSky.init(false, "NightLockBlueSky", "夜間晴天固定",
|
||||
"Min=0, Max=1", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[0].init(-60.0f, "ClimateTemperatureDay_1000", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[1].init(-60.0f, "ClimateTemperatureDay_0900", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[2].init(-60.0f, "ClimateTemperatureDay_0800", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[3].init(-45.0f, "ClimateTemperatureDay_0700", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[4].init(-30.0f, "ClimateTemperatureDay_0600", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[5].init(-10.0f, "ClimateTemperatureDay_0500", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[6].init(0.0f, "ClimateTemperatureDay_0400", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[7].init(10.0f, "ClimateTemperatureDay_0300", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[8].init(20.0f, "ClimateTemperatureDay_0200", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[9].init(23.0f, "ClimateTemperatureDay_0100", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempDay[10].init(25.0f, "ClimateTemperatureDay_0000", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[0].init(-63.0f, "ClimateTemperatureNight_1000", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[1].init(-63.0f, "ClimateTemperatureNight_0900", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[2].init(-63.0f, "ClimateTemperatureNight_0800", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[3].init(-48.0f, "ClimateTemperatureNight_0700", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[4].init(-33.0f, "ClimateTemperatureNight_0600", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[5].init(-13.0f, "ClimateTemperatureNight_0500", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[6].init(-3.0f, "ClimateTemperatureNight_0400", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[7].init(7.0f, "ClimateTemperatureNight_0300", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[8].init(17.0f, "ClimateTemperatureNight_0200", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[9].init(20.0f, "ClimateTemperatureNight_0100", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].ClimateTempNight[10].init(23.0f, "ClimateTemperatureNight_0000", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].MoistureMax.init(0.0, "MoistureMax", "最高湿度", "Min=0.0f, Max=100.0f",
|
||||
&climates[i].obj);
|
||||
climates[i].MoistureMin.init(0.0, "MoistureMin", "最低湿度", "Min=0.0f, Max=100.0f",
|
||||
&climates[i].obj);
|
||||
climates[i].WindPower.init(5.0, "WindPower", "風力", "Min=0.0f, Max=100.0f",
|
||||
&climates[i].obj);
|
||||
climates[i].IgnitedLevel.init(0, "IgnitedLevel", "着火レベル", "Min=0, Max=3",
|
||||
&climates[i].obj);
|
||||
climates[i].FeatureColor.init({1, 1, 1, 1}, "FeatureColor", "", &climates[i].obj);
|
||||
climates[i].CalcRayleigh.init(1.0, "CalcRayleigh", "", "Min=-100.0f, Max=100.0f",
|
||||
&climates[i].obj);
|
||||
climates[i].CalcMieSymmetrical.init(1.0, "CalcMieSymmetrical", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].CalcMie.init(1.0, "CalcMie", "", "Min=-100.0f, Max=100.0f",
|
||||
&climates[i].obj);
|
||||
climates[i].CalcSfParamNear.init(0.0, "CalcSfParamNear", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].CalcSfParamAttenuation.init(
|
||||
0.0, "CalcSfParamAttenuation", "", "Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].CalcAmbientIntencity.init(1.0, "CalcAmbientIntencity", "",
|
||||
"Min=-100.0f, Max=100.0f", &climates[i].obj);
|
||||
climates[i].CalcVolumeMaskIntencity.init(1.0, "CalcVolumeMaskIntencity", "",
|
||||
"Min=-100.0f, Max=100.0f",
|
||||
&climates[i].obj);
|
||||
climates[i].PaletteSetSelect.init(0, "PaletteSetSelect", "", "Min=0, Max=12",
|
||||
&climates[i].obj);
|
||||
climates[i].FogType.init(0, "FogType", "", "Min=0, Max=1", &climates[i].obj);
|
||||
climates[i].ForbidComeback.init(false, "ForbidComeback", "", "Min=0, Max=1",
|
||||
&climates[i].obj);
|
||||
climates[i].BlueSkyRainPat.init(0, "BlueSkyRainPat", "", "Min=0, Max=3",
|
||||
&climates[i].obj);
|
||||
|
||||
mWorldInfo.addObj(&climates[i].obj,
|
||||
sead::FormatFixedSafeString<128>("ClimateDefines_%d", i));
|
||||
}
|
||||
|
||||
auto* env_mgr = getEnvMgr();
|
||||
|
||||
for (int i = 0; i < EnvMgr::NumEnvAttributes; ++i) {
|
||||
mWorldInfo.addObj(&getEnvMgr()->mEnvAttributes[i].obj,
|
||||
sead::FormatFixedSafeString<128>("EnvAttribute_%d", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < EnvMgr::NumWeatherInfluences; ++i) {
|
||||
mWorldInfo.addObj(&getEnvMgr()->mWeatherInfluences[i].obj,
|
||||
sead::FormatFixedSafeString<128>("WeatherInfluence_%d", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < EnvMgr::NumRemains; ++i) {
|
||||
mWorldInfo.addObj(&getEnvMgr()->mRemains[i].obj,
|
||||
sead::FormatFixedSafeString<128>("Remains_%d", i));
|
||||
}
|
||||
|
||||
auto& palettes = env_mgr->mEnvPalettes;
|
||||
for (int i = 0; i < EnvMgr::NumEnvPalettes; ++i) {
|
||||
mWorldInfo.addObj(&palettes(i).obj,
|
||||
sead::FormatFixedSafeString<128>("EnvPalette_%d", i));
|
||||
}
|
||||
|
||||
mWorldInfo.addObj(&getEnvMgr()->mEnvPaletteStatic.obj,
|
||||
sead::FormatFixedSafeString<128>("EnvPaletteStatic"));
|
||||
|
||||
for (int i = 0; i < EnvMgr::NumCdanAddFog; ++i) {
|
||||
mWorldInfo.addObj(&getEnvMgr()->mCdanAddFog[i].obj,
|
||||
sead::FormatFixedSafeString<128>("EnvPalette_CdanAddFog%d", i));
|
||||
}
|
||||
|
||||
mWorldInfo.addObj(&getEnvMgr()->mIndoorPalette.obj,
|
||||
sead::FormatFixedSafeString<128>("IndoorPalette"));
|
||||
|
||||
mWorldInfo.addObj(&getDofMgr()->mDofMgrParamObj,
|
||||
sead::FormatFixedSafeString<128>("DofMgrParam"));
|
||||
|
||||
auto* sky_mgr = getSkyMgr();
|
||||
auto& prc = getSkyMgr()->mPrCloud;
|
||||
auto& prcv = getSkyMgr()->mPrCloudV;
|
||||
auto& skypal0 = getSkyMgr()->mSkyPalette0;
|
||||
auto& skypal2 = getSkyMgr()->mSkyPalette2;
|
||||
auto& cloudpat0 = getSkyMgr()->mCloudPat0;
|
||||
auto& cloudpat2 = getSkyMgr()->mCloudPat2;
|
||||
auto& cloudspd = getSkyMgr()->mCloudSpd;
|
||||
|
||||
for (int i = 0; i < SkyMgr::NumCloudPats; ++i) {
|
||||
mWorldInfo.addObj(&prc[i].mObj, sead::FormatFixedSafeString<128>("PrCloud_%d", i));
|
||||
mWorldInfo.addObj(&prcv[i][0].mObj,
|
||||
sead::FormatFixedSafeString<128>("PrCloudV0_%d", i));
|
||||
mWorldInfo.addObj(&prcv[i][1].mObj,
|
||||
sead::FormatFixedSafeString<128>("PrCloudV1_%d", i));
|
||||
}
|
||||
|
||||
mWorldInfo.addObj(&Manager::instance()->getSkyMgr()->mSunParamObj,
|
||||
sead::FormatFixedSafeString<128>("SunParam"));
|
||||
|
||||
for (int i = 0; i < SkyMgr::NumSkyPalettes; ++i) {
|
||||
mWorldInfo.addObj(&skypal0[i].mObj,
|
||||
sead::FormatFixedSafeString<128>("SkyPalette0_%d", i));
|
||||
mWorldInfo.addObj(&skypal2[i].mObj,
|
||||
sead::FormatFixedSafeString<128>("SkyPalette2_%d", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < SkyMgr::NumCloudPats; ++i) {
|
||||
mWorldInfo.addObj(&cloudpat0[i].mObj,
|
||||
sead::FormatFixedSafeString<128>("CloudPat0_%d", i));
|
||||
mWorldInfo.addObj(&cloudpat2[i].mObj,
|
||||
sead::FormatFixedSafeString<128>("CloudPat2_%d", i));
|
||||
mWorldInfo.addObj(&cloudspd[i].mObj,
|
||||
sead::FormatFixedSafeString<128>("CloudSpd_%d", i));
|
||||
}
|
||||
|
||||
mDungeonEnv.mLightLongitude.init(135.0, "LightLongitude", "", "Min=-360.0f, Max=360.0f",
|
||||
&mDungeonEnv.mDungeonEnvObj);
|
||||
mDungeonEnv.mDungeonSize.init(sead::FormatFixedSafeString<128>("S"),
|
||||
sead::FormatFixedSafeString<128>("DungeonSize"), "",
|
||||
&mDungeonEnv.mDungeonEnvObj);
|
||||
mDungeonEnv.mDungeonType.init(sead::FormatFixedSafeString<128>("Gimmick"),
|
||||
sead::FormatFixedSafeString<128>("DungeonType"), "",
|
||||
&mDungeonEnv.mDungeonEnvObj);
|
||||
mDungeonEnv.addObj(&mDungeonEnv.mDungeonEnvObj,
|
||||
sead::FormatFixedSafeString<128>("DungeonEnv"));
|
||||
}
|
||||
|
||||
if (res)
|
||||
mWorldInfo.applyResParameterArchive(agl::utl::ResParameterArchive(res->getRawData()));
|
||||
}
|
||||
|
||||
if (mStageType2 == StageType::Indoor) {
|
||||
sead::FixedSafeString<64> path;
|
||||
path.format("Map/DungeonData/CDungeon/%s", StageInfo::getCurrentMapName().cstr());
|
||||
path.appendWithFormat(".bdgnenv");
|
||||
auto* ksys_res =
|
||||
sead::DynamicCast<res::Resource>(mDungeonEnv.mResHandle.load(path.cstr(), &req));
|
||||
auto* res = sead::DynamicCast<sead::DirectResource>(ksys_res);
|
||||
if (res)
|
||||
mDungeonEnv.applyResParameterArchive(agl::utl::ResParameterArchive(res->getRawData()));
|
||||
}
|
||||
|
||||
for (int i = 0; i < mWorldInfo.mClimates.size(); ++i) {
|
||||
mWorldInfo.mClimates[i].WindDirectionType = 0;
|
||||
mWorldInfo.mClimates[i].WindPowerMultiplier = 1.0f;
|
||||
mWindDirections[i] = 0.0f;
|
||||
}
|
||||
|
||||
mWorldInfoLoadStatus = WorldInfoLoadStatus::Loaded;
|
||||
mManualWindSpeed = 5.0f;
|
||||
mEnableAutoWind = true;
|
||||
mWeatherType = WeatherType::Invalid;
|
||||
mTempDirectDayExtra = PlaceholderTemp;
|
||||
#ifdef MATCHING_HACK_NX_CLANG
|
||||
auto s = mMgrs.size();
|
||||
// the optimiser can't do anything with this knowledge, but it forces s not to be optimized out
|
||||
__builtin_assume(s >= 0);
|
||||
#endif
|
||||
mTempDirectNightExtra = PlaceholderTemp;
|
||||
mTempDirectDay = PlaceholderTemp;
|
||||
mTempDirectNight = PlaceholderTemp;
|
||||
mWindDir.x = 0;
|
||||
mWindDir.y = 0;
|
||||
mWindDir.z = -1;
|
||||
mWindDirectionType = 0;
|
||||
mManualWindTimer = 0;
|
||||
mWindChangeFinalTimer = 0;
|
||||
mWeatherTypeTimer = 0;
|
||||
_7d5 = false;
|
||||
mWeatherSetForDemo = false;
|
||||
mTempDirectTimer = 0;
|
||||
mTempDirectDayTimer = 0;
|
||||
mTempDirectNightTimer = 0;
|
||||
mDirectionalLightVecA = {0, 1, 0};
|
||||
mDirectionalLightVecB = {0, 1, 0};
|
||||
mDirectionalLightTimer = 0;
|
||||
_798 = -1;
|
||||
_79c = 0;
|
||||
|
||||
getTimeMgr()->reset();
|
||||
getSkyMgr()->reset();
|
||||
getTempMgr()->reset();
|
||||
getWeatherMgr()->reset();
|
||||
getEnvMgr()->reset();
|
||||
getShootingStarMgr()->reset();
|
||||
getDofMgr()->reset();
|
||||
|
||||
_7ac = 0;
|
||||
_770 = 0.0f;
|
||||
mIgnitedTimer = 0;
|
||||
mIgnitedLevel = 0;
|
||||
mIgnitedRadius = -1.0f;
|
||||
mIgnitedCenter = {0, 0, 0};
|
||||
updateRemainsType();
|
||||
updateGraphicsMap(mStageType);
|
||||
_720 = 0;
|
||||
_7b8 = 0;
|
||||
mFocusDist = 100.0f;
|
||||
updateFieldType();
|
||||
mMapEdgeWindDirectionType = 0;
|
||||
mMapEdgeWindSpeed = 1.0f;
|
||||
mMapEdgeWindEnabled = false;
|
||||
}
|
||||
|
||||
void Manager::updateFieldType() {
|
||||
mScalingMode = ScalingMode::Enabled;
|
||||
|
||||
if (StageInfo::getCurrentMapType().include("MainField")) {
|
||||
mFieldType = FieldType::MainField;
|
||||
} else if (StageInfo::getCurrentMapType().include("AocField")) {
|
||||
mFieldType = FieldType::AocField;
|
||||
mScalingMode = ScalingMode::Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::updateRemainsType() {
|
||||
if (StageInfo::getCurrentMapName().include("RemainsWind")) {
|
||||
mRemainsType = RemainsType::Wind;
|
||||
|
@ -411,23 +718,23 @@ void Manager::clearArray() {
|
|||
}
|
||||
|
||||
int Manager::getWeatherBlueskyRate(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].weatherBlueskyRate.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].WeatherBlueskyRate.ref();
|
||||
}
|
||||
|
||||
int Manager::getWeatherCloudyRate(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].weatherCloudyRate.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].WeatherCloudyRate.ref();
|
||||
}
|
||||
|
||||
int Manager::getWeatherRainRate(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].weatherRainRate.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].WeatherRainRate.ref();
|
||||
}
|
||||
|
||||
int Manager::getWeatherHeavyRainRate(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].weatherHeavyRainRate.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].WeatherHeavyRainRate.ref();
|
||||
}
|
||||
|
||||
int Manager::getWeatherStormRate(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].weatherStormRate.ref();
|
||||
return mWorldInfo.mClimates[int(climate)].WeatherStormRate.ref();
|
||||
}
|
||||
|
||||
void Manager::calcManagers(sead::WorkerMgr* worker_mgr) {
|
||||
|
|
|
@ -33,35 +33,35 @@ namespace ksys::world {
|
|||
struct ClimateInfo {
|
||||
static constexpr int NumClimateTemp = 11;
|
||||
|
||||
agl::utl::Parameter<int> weatherType;
|
||||
agl::utl::Parameter<int> weatherBlueskyRate;
|
||||
agl::utl::Parameter<int> weatherCloudyRate;
|
||||
agl::utl::Parameter<int> weatherRainRate;
|
||||
agl::utl::Parameter<int> weatherHeavyRainRate;
|
||||
agl::utl::Parameter<int> weatherStormRate;
|
||||
agl::utl::Parameter<bool> dayLockBlueSky;
|
||||
agl::utl::Parameter<bool> nightLockBlueSky;
|
||||
sead::SafeArray<agl::utl::Parameter<float>, NumClimateTemp> climateTempDay;
|
||||
sead::SafeArray<agl::utl::Parameter<float>, NumClimateTemp> climateTempNight;
|
||||
agl::utl::Parameter<float> moistureMax;
|
||||
agl::utl::Parameter<float> moistureMin;
|
||||
agl::utl::Parameter<float> windPower;
|
||||
agl::utl::Parameter<int> WeatherType;
|
||||
agl::utl::Parameter<int> WeatherBlueskyRate;
|
||||
agl::utl::Parameter<int> WeatherCloudyRate;
|
||||
agl::utl::Parameter<int> WeatherRainRate;
|
||||
agl::utl::Parameter<int> WeatherHeavyRainRate;
|
||||
agl::utl::Parameter<int> WeatherStormRate;
|
||||
agl::utl::Parameter<bool> DayLockBlueSky;
|
||||
agl::utl::Parameter<bool> NightLockBlueSky;
|
||||
sead::SafeArray<agl::utl::Parameter<float>, NumClimateTemp> ClimateTempDay;
|
||||
sead::SafeArray<agl::utl::Parameter<float>, NumClimateTemp> ClimateTempNight;
|
||||
agl::utl::Parameter<float> MoistureMax;
|
||||
agl::utl::Parameter<float> MoistureMin;
|
||||
agl::utl::Parameter<float> WindPower;
|
||||
agl::utl::ParameterObj obj;
|
||||
u32 windDirectionType;
|
||||
float windPowerMultiplier;
|
||||
agl::utl::Parameter<int> ignitedLevel;
|
||||
agl::utl::Parameter<sead::Color4f> featureColor;
|
||||
agl::utl::Parameter<float> _4a0;
|
||||
agl::utl::Parameter<float> _4c0;
|
||||
agl::utl::Parameter<float> _4e0;
|
||||
agl::utl::Parameter<float> _500;
|
||||
agl::utl::Parameter<float> _520;
|
||||
agl::utl::Parameter<float> _540;
|
||||
agl::utl::Parameter<float> _560;
|
||||
agl::utl::Parameter<int> paletteSetSelect;
|
||||
agl::utl::Parameter<int> fogType;
|
||||
agl::utl::Parameter<bool> forbidComeback;
|
||||
agl::utl::Parameter<int> _5e0;
|
||||
u32 WindDirectionType;
|
||||
float WindPowerMultiplier;
|
||||
agl::utl::Parameter<int> IgnitedLevel;
|
||||
agl::utl::Parameter<sead::Color4f> FeatureColor;
|
||||
agl::utl::Parameter<float> CalcRayleigh;
|
||||
agl::utl::Parameter<float> CalcMieSymmetrical;
|
||||
agl::utl::Parameter<float> CalcMie;
|
||||
agl::utl::Parameter<float> CalcSfParamNear;
|
||||
agl::utl::Parameter<float> CalcSfParamAttenuation;
|
||||
agl::utl::Parameter<float> CalcAmbientIntencity;
|
||||
agl::utl::Parameter<float> CalcVolumeMaskIntencity;
|
||||
agl::utl::Parameter<int> PaletteSetSelect;
|
||||
agl::utl::Parameter<int> FogType;
|
||||
agl::utl::Parameter<bool> ForbidComeback;
|
||||
agl::utl::Parameter<int> BlueSkyRainPat;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ClimateInfo, 0x600);
|
||||
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
void init(sead::Heap* heap);
|
||||
void resetForStageUnload();
|
||||
void loadWorldInfoRes();
|
||||
void loadWorldInfo();
|
||||
void onStageInit(StageType stage_type, bool is_demo, bool is_main_field);
|
||||
void updateRemainsType();
|
||||
void updateGraphicsMap(StageType type);
|
||||
|
||||
|
@ -196,12 +196,12 @@ public:
|
|||
CalcType getCalcType() const { return mCalcType; }
|
||||
|
||||
TimeMgr* getTimeMgr() const { return static_cast<TimeMgr*>(mMgrs[0]); }
|
||||
SkyMgr* getCloudMgr() const { return static_cast<SkyMgr*>(mMgrs[1]); }
|
||||
SkyMgr* getSkyMgr() const { return static_cast<SkyMgr*>(mMgrs[1]); }
|
||||
ShootingStarMgr* getShootingStarMgr() const { return static_cast<ShootingStarMgr*>(mMgrs[2]); }
|
||||
WeatherMgr* getWeatherMgr() const { return static_cast<WeatherMgr*>(mMgrs[3]); }
|
||||
TempMgr* getTempMgr() const { return static_cast<TempMgr*>(mMgrs[4]); }
|
||||
WindMgr* getWindMgr() const { return static_cast<WindMgr*>(mMgrs[5]); }
|
||||
EnvMgr* getSkyMgr() const { return static_cast<EnvMgr*>(mMgrs[6]); }
|
||||
EnvMgr* getEnvMgr() const { return static_cast<EnvMgr*>(mMgrs[6]); }
|
||||
DofMgr* getDofMgr() const { return static_cast<DofMgr*>(mMgrs[7]); }
|
||||
ChemicalMgr* getChemicalMgr() const { return static_cast<ChemicalMgr*>(mMgrs[8]); }
|
||||
|
||||
|
@ -220,6 +220,9 @@ private:
|
|||
void updateOverrides();
|
||||
void updateTimers();
|
||||
void updateWindDirections();
|
||||
void updateFieldType();
|
||||
|
||||
static constexpr float PlaceholderTemp = 99999.9;
|
||||
|
||||
WorldInfo mWorldInfo;
|
||||
DungeonEnv mDungeonEnv;
|
||||
|
@ -239,8 +242,8 @@ private:
|
|||
StageType mStageType{};
|
||||
StageType mStageType2{};
|
||||
|
||||
u32 _6c0 = 0;
|
||||
u32 _6c4 = 30;
|
||||
u32 mTicks = 0;
|
||||
int mTimer = 30;
|
||||
u32 _6c8 = 0;
|
||||
bool _6cc = false;
|
||||
bool mGameSceneInitialized = false;
|
||||
|
@ -254,10 +257,10 @@ private:
|
|||
float mClimateTransitionProgress = 1.0;
|
||||
float mMapEdgeWindSpeed = 1.0;
|
||||
float mManualWindSpeed = 5.0;
|
||||
float mTempDirectDayExtra = 99999.9;
|
||||
float mTempDirectNightExtra = 99999.9;
|
||||
float mTempDirectDay = 99999.9;
|
||||
float mTempDirectNight = 99999.9;
|
||||
float mTempDirectDayExtra = PlaceholderTemp;
|
||||
float mTempDirectNightExtra = PlaceholderTemp;
|
||||
float mTempDirectDay = PlaceholderTemp;
|
||||
float mTempDirectNight = PlaceholderTemp;
|
||||
float _770 = 0.0;
|
||||
float mFocusDist = 100.0;
|
||||
float mIgnitedRadius = -1.0;
|
||||
|
@ -267,10 +270,10 @@ private:
|
|||
int mWindDirectionType = 0;
|
||||
int mManualWindTimer = 0;
|
||||
u32 mMapEdgeWindDirectionType = 0;
|
||||
u32 _794 = 0;
|
||||
int mWeatherTypeTimer = 0;
|
||||
int _798 = -1;
|
||||
u32 _79c = 0;
|
||||
u32 _7a0 = 0;
|
||||
int _79c = 0;
|
||||
int mTempDirectTimer = 0;
|
||||
int mTempDirectDayTimer = 0;
|
||||
int mTempDirectNightTimer = 0;
|
||||
u32 _7ac = 0;
|
||||
|
@ -280,7 +283,7 @@ private:
|
|||
RemainsType mRemainsType{};
|
||||
FieldType mFieldType{};
|
||||
ScalingMode mScalingMode{};
|
||||
u32 mWindChangeFinalTimer = 0;
|
||||
int mWindChangeFinalTimer = 0;
|
||||
float mWindSpeedAocField = 0.75;
|
||||
WorldInfoLoadStatus mWorldInfoLoadStatus = WorldInfoLoadStatus::NotLoaded;
|
||||
sead::SizedEnum<WeatherType, u8> mWeatherType = WeatherType::Invalid;
|
||||
|
|
|
@ -12,6 +12,8 @@ public:
|
|||
|
||||
JobType getType() const override { return JobType::ShootingStar; }
|
||||
|
||||
virtual void reset();
|
||||
|
||||
u8 _20[0x30 - 0x20];
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ShootingStarMgr, 0x30);
|
||||
|
|
|
@ -394,7 +394,7 @@ SkyMgr::SkyMgr() {
|
|||
mCloudSpd[i].mCloudPatWindPow.init(0.004, "CLOUDPAT_windPow", "", &mCloudSpd[i].mObj);
|
||||
}
|
||||
|
||||
loadInfo();
|
||||
reset();
|
||||
}
|
||||
|
||||
SkyMgr::~SkyMgr() = default;
|
||||
|
|
|
@ -132,10 +132,11 @@ public:
|
|||
void calcType2_() override;
|
||||
JobType getType() const override { return JobType::Sky; }
|
||||
|
||||
void reset();
|
||||
void onTimeUpdate();
|
||||
|
||||
private:
|
||||
void loadInfo();
|
||||
friend class Manager;
|
||||
|
||||
struct StructA {
|
||||
sead::Vector3f _0;
|
||||
|
|
|
@ -12,6 +12,8 @@ public:
|
|||
|
||||
JobType getType() const override { return JobType::Temp; }
|
||||
|
||||
void reset();
|
||||
|
||||
u8 _20[0x90 - 0x20];
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(TempMgr, 0x90);
|
||||
|
|
|
@ -53,7 +53,7 @@ void TimeMgr::resetForStageUnload() {
|
|||
mAnimalMasterCtrl.resetState();
|
||||
}
|
||||
|
||||
void TimeMgr::loadInfo() {
|
||||
void TimeMgr::reset() {
|
||||
mTimeStep = DefaultTimeStep;
|
||||
mTimeUpdateMode = TimeUpdateMode::Normal;
|
||||
mBloodMoonForceMode = {};
|
||||
|
@ -188,7 +188,7 @@ bool TimeMgr::isInRelicBattle() const {
|
|||
in_battle = true;
|
||||
}
|
||||
|
||||
if (wm->getSkyMgr()->isInYigaClanHideoutArea())
|
||||
if (wm->getEnvMgr()->isInYigaClanHideoutArea())
|
||||
in_battle = true;
|
||||
|
||||
return in_battle;
|
||||
|
@ -206,7 +206,7 @@ void TimeMgr::handleNewDay(HandleNewDayMode mode) {
|
|||
|
||||
++mNumberOfDays;
|
||||
|
||||
if (mode == HandleNewDayMode::Normal && wm->getSkyMgr()->isBloodMoonNight()) {
|
||||
if (mode == HandleNewDayMode::Normal && wm->getEnvMgr()->isBloodMoonNight()) {
|
||||
if (isBloodMoonProhibited() || isInRelicBattle()) {
|
||||
mBloodMoonTimer = 8_days;
|
||||
} else {
|
||||
|
@ -270,7 +270,7 @@ void TimeMgr::calc_() {
|
|||
(mTimeUpdateMode == TimeUpdateMode::Forced || mTimeUpdateMode == TimeUpdateMode::Normal)) {
|
||||
mTime = mNewTime;
|
||||
mNewTime = -1.0;
|
||||
wm->getCloudMgr()->onTimeUpdate();
|
||||
wm->getSkyMgr()->onTimeUpdate();
|
||||
}
|
||||
|
||||
if (mNeedToHandleNewDay) {
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
JobType getType() const override { return JobType::Time; }
|
||||
|
||||
void loadInfo();
|
||||
void reset();
|
||||
void resetForStageUnload();
|
||||
|
||||
void callBloodMoonDemo();
|
||||
|
|
|
@ -12,6 +12,7 @@ public:
|
|||
|
||||
JobType getType() const override { return JobType::Weather; }
|
||||
|
||||
void reset();
|
||||
void onUnload();
|
||||
void rerollClimateWindPowers();
|
||||
|
||||
|
|
Loading…
Reference in New Issue