mirror of
https://github.com/zeldaret/botw
synced 2026-10-09 13:37:01 -04:00
world: implement Manager::isRaining (#214)
* world: implement Manager::isRaining Implement the position-based rain check for Rain, HeavyRain, ThunderRain, and BlueskyRain. Declare the climate weather lookup dependency and name both functions in the function table. The rain check matches the original function at 0x71010f33a4. * world: keep rainfall queries const Restore const on Manager::isRaining and make its climate weather helper const. Both queries only read Manager state. Update their function-table symbols; the rain check still matches the original.
This commit is contained in:
@@ -90131,13 +90131,13 @@ Address,Quality,Size,Name
|
||||
0x00000071010f2f24,O,000008,_ZNK4ksys5world7Manager17getCurrentClimateEv
|
||||
0x00000071010f2f2c,O,000008,_ZNK4ksys5world7Manager14getPrevClimateEv
|
||||
0x00000071010f2f34,O,000008,_ZNK4ksys5world7Manager28getClimateTransitionProgressEv
|
||||
0x00000071010f2f3c,U,000972,WorldMgr::someWeatherStuff_0
|
||||
0x00000071010f2f3c,U,000972,_ZNK4ksys5world7Manager14getWeatherTypeENS0_7ClimateE
|
||||
0x00000071010f3308,U,000044,WorldMgr::x_14
|
||||
0x00000071010f3334,O,000032,_ZNK4ksys5world7Manager16isDayLockBlueSkyENS0_7ClimateE
|
||||
0x00000071010f3354,O,000032,_ZNK4ksys5world7Manager18isNightLockBlueSkyENS0_7ClimateE
|
||||
0x00000071010f3374,U,000008,WorldMgr::__auto13
|
||||
0x00000071010f337c,U,000040,_ZN4ksys5world7Manager14sub_71010F337CERKN4sead7Vector3IfEE
|
||||
0x00000071010f33a4,U,000084,WorldMgr::isRaining
|
||||
0x00000071010f33a4,O,000084,_ZNK4ksys5world7Manager9isRainingERKN4sead7Vector3IfEE
|
||||
0x00000071010f33f8,O,000452,_ZNK4ksys5world7Manager11calcTempDayEf
|
||||
0x00000071010f35bc,O,000452,_ZNK4ksys5world7Manager13calcTempNightEf
|
||||
0x00000071010f3780,O,000068,_ZNK4ksys5world7Manager14getMoistureMaxEv
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -136,6 +136,19 @@ bool Manager::isNightLockBlueSky(Climate climate) const {
|
||||
return mWorldInfo.mClimates[int(climate)].NightLockBlueSky.ref();
|
||||
}
|
||||
|
||||
bool Manager::isRaining(const sead::Vector3f& pos) const {
|
||||
const Climate climate = getClimate(pos);
|
||||
switch (getWeatherType(climate)) {
|
||||
case WeatherType::Rain:
|
||||
case WeatherType::HeavyRain:
|
||||
case WeatherType::ThunderRain:
|
||||
case WeatherType::BlueskyRain:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
float Manager::calcTempDay(float height) const {
|
||||
float normal_temp = 23.0f;
|
||||
|
||||
|
||||
@@ -221,6 +221,8 @@ private:
|
||||
Unloaded,
|
||||
};
|
||||
|
||||
WeatherType getWeatherType(Climate climate) const;
|
||||
|
||||
void overrideWindSpeed(float* wind_speed) const;
|
||||
|
||||
void calcManagers(sead::WorkerMgr* worker_mgr);
|
||||
|
||||
Reference in New Issue
Block a user