mirror of https://github.com/zeldaret/botw.git
ksys/world: Add more EnvMgr functions
This commit is contained in:
parent
d090c3881b
commit
84b14bc8f2
|
@ -89271,22 +89271,22 @@
|
|||
0x00000071010db9fc,wm::SkyMgr::isFadeOrFadeDemoScreenOpened,352,
|
||||
0x00000071010dbb5c,wm::SkyMgr::updateBloodMoon,792,
|
||||
0x00000071010dbe74,wm::SkyMgr::updateBloodMoonFlags,964,_ZN4ksys5world6EnvMgr20updateBloodMoonFlagsEv
|
||||
0x00000071010dc238,wm::SkyMgr::return0,8,
|
||||
0x00000071010dc240,wm::SkyMgr::x_4,56,
|
||||
0x00000071010dc278,wm::SkyMgr::x,52,
|
||||
0x00000071010dc2ac,wm::SkyMgr::getConcentrationDarkness,28,
|
||||
0x00000071010dc2c8,nullsub_6151,4,
|
||||
0x00000071010dc238,wm::SkyMgr::return0,8,_ZNK4ksys5world6EnvMgr11returnFalseEv
|
||||
0x00000071010dc240,wm::SkyMgr::x_4,56,_ZNK4ksys5world6EnvMgr13isInSandstormEv
|
||||
0x00000071010dc278,wm::SkyMgr::x,52,_ZNK4ksys5world6EnvMgr23isInYigaClanHideoutAreaEv
|
||||
0x00000071010dc2ac,wm::SkyMgr::getConcentrationDarkness,28,_ZNK4ksys5world6EnvMgr24getConcentrationDarknessEv
|
||||
0x00000071010dc2c8,nullsub_6151,4,_ZN4ksys5world6EnvMgr13worldMgrCalc2Ev
|
||||
0x00000071010dc2cc,wm::SkyMgr::x_8,508,
|
||||
0x00000071010dc4c8,wm::SkyMgr::getPaletteSel,36,
|
||||
0x00000071010dc4c8,wm::SkyMgr::getPaletteSel,36,_ZNK4ksys5world6EnvMgr13getPaletteSetEv
|
||||
0x00000071010dc4ec,wm::SkyMgr::isWaterRelicRainOn,164,_ZNK4ksys5world6EnvMgr18isWaterRelicRainOnENS0_7ClimateE
|
||||
0x00000071010dc590,wm::SkyMgr::x_0,32,
|
||||
0x00000071010dc5b0,wm::SkyMgr::setPaletteSel,92,
|
||||
0x00000071010dc60c,wm::SkyMgr::x_1,68,
|
||||
0x00000071010dc650,wm::SkyMgr::x_2,68,
|
||||
0x00000071010dc694,wm::SkyMgr::setWarpMistTimer,68,
|
||||
0x00000071010dc6d8,wm::SkyMgr::setFogDirect,104,
|
||||
0x00000071010dc590,wm::SkyMgr::x_0,32,_ZN4ksys5world6EnvMgr18setPaletteSelSpeedEi
|
||||
0x00000071010dc5b0,wm::SkyMgr::setPaletteSel,92,_ZN4ksys5world6EnvMgr13setPaletteSetEi
|
||||
0x00000071010dc60c,wm::SkyMgr::x_1,68,_ZN4ksys5world6EnvMgr19setCharAmbientScaleEN4sead7Color4fE
|
||||
0x00000071010dc650,wm::SkyMgr::x_2,68,_ZN4ksys5world6EnvMgr21setCharMainLightScaleEN4sead7Color4fE
|
||||
0x00000071010dc694,wm::SkyMgr::setWarpMistTimer,68,_ZN4ksys5world6EnvMgr20setWarpMistIntensityEf
|
||||
0x00000071010dc6d8,wm::SkyMgr::setFogDirect,104,_ZN4ksys5world6EnvMgr12setFogDirectEbbbfff
|
||||
0x00000071010dc740,wm::SkyMgr::getBloodMoonProgress,56,_ZNK4ksys5world6EnvMgr20getBloodMoonProgressEv
|
||||
0x00000071010dc778,sub_71010DC778,16,
|
||||
0x00000071010dc778,sub_71010DC778,16,_ZN4ksys5world6EnvMgr20allowPaletteOverrideEv
|
||||
0x00000071010dc788,wm::SkyMgr::rtti1,204,_ZNK4ksys5world6EnvMgr27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x00000071010dc854,wm::SkyMgr::rtti2,92,_ZNK4ksys5world6EnvMgr18getRuntimeTypeInfoEv
|
||||
0x00000071010dc8b0,wm::SkyMgr::getType,8,_ZNK4ksys5world6EnvMgr7getTypeEv
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -456,6 +456,45 @@ void EnvMgr::updateBloodMoonFlags() {
|
|||
mConcentrationBM = concentration;
|
||||
}
|
||||
|
||||
bool EnvMgr::returnFalse() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EnvMgr::isInSandstorm() const {
|
||||
if (mActivePaletteSet != 4 && mActivePaletteSet != 8)
|
||||
return false;
|
||||
return isPaletteSetTransitionDone();
|
||||
}
|
||||
|
||||
bool EnvMgr::isInYigaClanHideoutArea() const {
|
||||
if (mActivePaletteSet != 15)
|
||||
return false;
|
||||
return isPaletteSetTransitionDone();
|
||||
}
|
||||
|
||||
float EnvMgr::getConcentrationDarkness() const {
|
||||
if (mActivePaletteSet == 7)
|
||||
return mPaletteSetTransition;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
bool EnvMgr::isPaletteSetTransitionDone() const {
|
||||
if (mPaletteSetTransition >= 1.0f)
|
||||
return true;
|
||||
#ifdef MATCHING_HACK_NX_CLANG
|
||||
asm("");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnvMgr::worldMgrCalc2() {}
|
||||
|
||||
int EnvMgr::getPaletteSet() const {
|
||||
if (mPaletteSetOverride >= 0)
|
||||
return mPaletteSetOverride;
|
||||
return mPaletteSetForClimate;
|
||||
}
|
||||
|
||||
bool EnvMgr::isWaterRelicRainOn(Climate climate) const {
|
||||
if (climate != Climate::ZoraTemperateClimate)
|
||||
return false;
|
||||
|
@ -468,6 +507,49 @@ bool EnvMgr::isWaterRelicRainOn(Climate climate) const {
|
|||
return !on;
|
||||
}
|
||||
|
||||
void EnvMgr::setPaletteSelSpeed(int speed) {
|
||||
mPaletteSelSpeed = speed;
|
||||
mPaletteSelSpeedTimer = 4;
|
||||
}
|
||||
|
||||
void EnvMgr::setPaletteSet(int palette) {
|
||||
if (mBlockPaletteSetOverride)
|
||||
return;
|
||||
mPaletteSetOverride = palette;
|
||||
mPaletteSetOverrideTimer = 4;
|
||||
_6b5c8 = 1;
|
||||
_6b5cc = 1;
|
||||
_6b550 = 1.0;
|
||||
}
|
||||
|
||||
void EnvMgr::setCharAmbientScale(sead::Color4f color) {
|
||||
mCharAmbientScaleTimer = 2;
|
||||
mCharAmbientScale = color;
|
||||
}
|
||||
|
||||
void EnvMgr::setCharMainLightScale(sead::Color4f color) {
|
||||
mCharMainLightScaleTimer = 2;
|
||||
mCharMainLightScale = color;
|
||||
}
|
||||
|
||||
void EnvMgr::setWarpMistIntensity(float intensity) {
|
||||
if (mWarpMistIntensity <= intensity && !(intensity >= 1.0 && mWarpMistIntensity <= 0.0)) {
|
||||
mWarpMistIntensity = intensity;
|
||||
mWarpMistTimer = 4;
|
||||
}
|
||||
}
|
||||
|
||||
void EnvMgr::setFogDirect(bool fog_near_use, bool fog_instant_sw, bool fog_far_use, float fog_ratio,
|
||||
float fog_near, float fog_far) {
|
||||
mFogSetDirectTimer = 2;
|
||||
mFogRatio = fog_ratio;
|
||||
mFogNear = fog_near;
|
||||
mFogNearUse = fog_near_use;
|
||||
mFogFar = fog_far;
|
||||
mFogFagUse = fog_far_use;
|
||||
mFogInstantSW = fog_instant_sw;
|
||||
}
|
||||
|
||||
float EnvMgr::getBloodMoonProgress() const {
|
||||
if (mBloodMoonStartState == 2)
|
||||
return mBloodMoonProgress;
|
||||
|
@ -476,4 +558,8 @@ float EnvMgr::getBloodMoonProgress() const {
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
void EnvMgr::allowPaletteOverride() {
|
||||
mBlockPaletteSetOverride = false;
|
||||
}
|
||||
|
||||
} // namespace ksys::world
|
||||
|
|
|
@ -180,8 +180,6 @@ public:
|
|||
void reset();
|
||||
void resetForStageUnload();
|
||||
|
||||
bool checkConcentrationDarkness() const;
|
||||
|
||||
bool isBloodMoonNight() const;
|
||||
bool isInBloodMoonTimeRange() const;
|
||||
float getConcentrationBM() const;
|
||||
|
@ -189,9 +187,26 @@ public:
|
|||
void setBloodMoonProhibition(bool prohibited);
|
||||
bool isLoadingScreenOpened() const;
|
||||
|
||||
bool returnFalse() const;
|
||||
bool isInSandstorm() const;
|
||||
bool isInYigaClanHideoutArea() const;
|
||||
float getConcentrationDarkness() const;
|
||||
bool isPaletteSetTransitionDone() const;
|
||||
|
||||
void worldMgrCalc2();
|
||||
int getPaletteSet() const;
|
||||
bool isWaterRelicRainOn(Climate climate) const;
|
||||
void setPaletteSelSpeed(int speed);
|
||||
void setPaletteSet(int palette);
|
||||
void setCharAmbientScale(sead::Color4f color);
|
||||
void setCharMainLightScale(sead::Color4f color);
|
||||
void setWarpMistIntensity(float intensity);
|
||||
void setFogDirect(bool fog_near_use, bool fog_instant_sw, bool fog_far_use, float fog_ratio,
|
||||
float fog_near, float fog_far);
|
||||
float getBloodMoonProgress() const;
|
||||
|
||||
void allowPaletteOverride();
|
||||
|
||||
protected:
|
||||
void init_(sead::Heap* heap) override;
|
||||
void calc_() override;
|
||||
|
@ -217,9 +232,9 @@ private:
|
|||
u32 mBloodMoonEndState = 0;
|
||||
u32 mBloodMoonStartState = 0;
|
||||
float mBloodMoonProgress = 0.0;
|
||||
u32 _2b0 = 0;
|
||||
u32 _2b4 = 0;
|
||||
float mConcentrationDarkness = 0.0;
|
||||
int mPreviousPaletteSet = 0;
|
||||
int mActivePaletteSet = 0;
|
||||
float mPaletteSetTransition = 0.0;
|
||||
sead::SafeArray<EnvPalette, 207> mEnvPalettes;
|
||||
sead::SafeArray<CdanAddFog, 4> mCdanAddFog;
|
||||
EnvPaletteStatic mEnvPaletteStaticUnused;
|
||||
|
@ -231,8 +246,8 @@ private:
|
|||
sead::Color4f _6b4f8;
|
||||
sead::Color4f _6b508;
|
||||
sead::Color4f _6b518;
|
||||
sead::Color4f _6b528;
|
||||
sead::Color4f _6b538;
|
||||
sead::Color4f mCharAmbientScale;
|
||||
sead::Color4f mCharMainLightScale;
|
||||
float _6b548;
|
||||
float _6b54c;
|
||||
float _6b550;
|
||||
|
@ -247,7 +262,7 @@ private:
|
|||
float _6b574;
|
||||
float _6b578;
|
||||
float _6b57c;
|
||||
float mWarpMistTimer;
|
||||
float mWarpMistIntensity;
|
||||
float mExposure;
|
||||
float mForcedBloodMoonTimer;
|
||||
float _6b58c;
|
||||
|
@ -261,25 +276,25 @@ private:
|
|||
float mFogFar;
|
||||
float _6b5b0;
|
||||
float _6b5b4;
|
||||
int mPaletteSelMaybe;
|
||||
u32 _6b5bc;
|
||||
u32 _6b5c0;
|
||||
u32 _6b5c4;
|
||||
int mPaletteSetOverride;
|
||||
int mPaletteSetOverrideTimer;
|
||||
int mPaletteSetForClimate;
|
||||
int mPaletteSetForClimateTimer;
|
||||
u32 _6b5c8;
|
||||
u32 _6b5cc;
|
||||
u32 _6b5d0;
|
||||
u32 _6b5d4;
|
||||
u32 _6b5d8;
|
||||
int mWarpMistTimer;
|
||||
u32 _6b5dc;
|
||||
u32 _6b5e0;
|
||||
u32 _6b5e4;
|
||||
u32 _6b5e8;
|
||||
u32 _6b5ec;
|
||||
u32 _6b5f0;
|
||||
int mPaletteSelSpeed;
|
||||
int mPaletteSelSpeedTimer;
|
||||
int mForcedBloodMoonStatus;
|
||||
u32 _6b5f8;
|
||||
u32 _6b5fc;
|
||||
u32 mFogMode;
|
||||
int mCharAmbientScaleTimer;
|
||||
int mCharMainLightScaleTimer;
|
||||
int mFogSetDirectTimer;
|
||||
u8 mDungeonSizeType;
|
||||
bool mForcedBloodMoonRequested;
|
||||
bool mForcedBloodMoonReady;
|
||||
|
@ -290,9 +305,10 @@ private:
|
|||
bool _6b60b;
|
||||
bool mBloodMoonProhibited;
|
||||
bool mDeactivateForcedBloodMoon;
|
||||
u16 _6b60e;
|
||||
bool _6b60e;
|
||||
bool _6b60f;
|
||||
bool _6b610;
|
||||
bool _6b611;
|
||||
bool mBlockPaletteSetOverride;
|
||||
u32 _6b614;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(EnvMgr, 0x6b618);
|
||||
|
|
|
@ -188,7 +188,7 @@ bool TimeMgr::isInRelicBattle() const {
|
|||
in_battle = true;
|
||||
}
|
||||
|
||||
if (wm->getSkyMgr()->checkConcentrationDarkness())
|
||||
if (wm->getSkyMgr()->isInYigaClanHideoutArea())
|
||||
in_battle = true;
|
||||
|
||||
return in_battle;
|
||||
|
|
Loading…
Reference in New Issue