WorldMgr: Difference between revisions

imported>Leoetlino
imported>Leoetlino
Line 8: Line 8:
{{empty section}}
{{empty section}}


== Sub-managers ==
=== Sub-managers ===
Sub-managers are created in WorldMgr::init (0x71010F43C0) and inserted into a pointer array (@WorldMgr+0x5c0). All names below are unofficial.
Sub-managers are created in WorldMgr::init (0x71010F43C0) and inserted into a pointer array (@WorldMgr+0x5c0). All names below are unofficial.


Line 34: Line 34:
|}
|}


=== TimeMgr ===
== TimeMgr ==
TimeMgr handles everything to do with time, including Blood Moons and the Lord of the Mountain's apparition.
TimeMgr handles everything to do with time, including Blood Moons and the Lord of the Mountain's apparition.


Internally, time of day is stored as a float in the [0.0, 360.0] range.
Internally, time of day is stored as a float in the [0.0, 360.0] range.


==== TimeMgr::init ====
=== TimeMgr::init ===
* Time is set to 78.75 (05:15).
* Time is set to 78.75 (05:15).
* Time for TotS environment is set to 78.75 (05:15) as well.
* Time for TotS environment is set to 78.75 (05:15) as well.
* "Bloody Moon end reserve timer" is set to 0.
* "Bloody Moon end reserve timer" is set to 0.


==== TimeMgr::reset ====
=== TimeMgr::reset ===
This is called whenever a stage is unloaded (essentially every time the loading screen is shown).
This is called whenever a stage is unloaded (essentially every time the loading screen is shown).
* Blood Moon checks are delayed.
* Blood Moon checks are delayed.
* The AnimalMaster_Appearance flag is cleared, meaning the Lord of the Mountain will not appear.
* The AnimalMaster_Appearance flag is cleared, meaning the Lord of the Mountain will not appear.


==== TimeMgr::calc ====
=== TimeMgr::calc ===
This is called every frame.
This is called every frame.
* Reload some internal state from GameDataMgr.
* Reload some internal state from GameDataMgr.
Line 64: Line 64:
* Update Lord of the Mountain flags (in particular, determine if it should appear).
* Update Lord of the Mountain flags (in particular, determine if it should appear).


==== Blood Moon ====
=== Blood Moon ===


==== Time division, IsMorning, IsNoon, etc. ====
=== Time division, IsMorning, IsNoon, etc. ===
{|class="wikitable"
{|class="wikitable"
! Start !! End !! Division !! Flag
! Start !! End !! Division !! Flag
Line 88: Line 88:
Note: all intervals include the start time and exclude the end time.
Note: all intervals include the start time and exclude the end time.


==== Lord of the Mountain ====
=== Lord of the Mountain ===


[[Category:Internals]]
[[Category:Internals]]
[[Category:Subsystems (BotW)]]
[[Category:Subsystems (BotW)]]
Anonymous user