WorldMgr/en: Difference between revisions

Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
<!--T:1-->
{{Subsystem infobox|name=WorldMgr|init_addr_switch150=00000071010F2920|is_name_official=1|description=Manages world state (time, blood moons, climates, weather, etc.)}}
{{Subsystem infobox|name=WorldMgr|init_addr_switch150=00000071010F2920|is_name_official=1|description=Manages world state (time, blood moons, climates, weather, etc.)}}


Line 7: Line 8:


== WorldMgr ==
== WorldMgr ==
=== 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.


<!--T:5-->
{|class="wikitable"
{|class="wikitable"
|+ Sub-managers by ID
|+ Sub-managers by ID
Line 56: Line 59:
* (If field 0x14A is set to 99, WM_BloodyDay is set to true. [[AIDef:Action/SetBloodyMoonEnv]] uses this to force a Blood Moon to be scheduled. This feature appears to be unused.)
* (If field 0x14A is set to 99, WM_BloodyDay is set to true. [[AIDef:Action/SetBloodyMoonEnv]] uses this to force a Blood Moon to be scheduled. This feature appears to be unused.)
* If both [[Demo]]103_0 and Demo997_0 have not been played, time of day is reset to 78.75 (05:15).
* If both [[Demo]]103_0 and Demo997_0 have not been played, time of day is reset to 78.75 (05:15).
** Demo103_0 is the "leaving Shrine of Resurrection" cutscene, and Demo997_0 is a cutscene that doesn't exist anymore.
* If [[AIDef:Action/AdvanceTime]] or anything else that changes time of day was called, the actual time is updated at this moment.
* If [[AIDef:Action/AdvanceTime]] or anything else that changes time of day was called, the actual time is updated at this moment.
* [[#Midnight checks]].
* The game then performs [[#Midnight checks]].


* '''Update time of day''': there are several possible update modes. In most cases, the update mode is 0.
* '''Update time of day''': there are several possible update modes. In most cases, the update mode is 0.
Line 117: Line 121:
| 32 || Freeze time to 23:00
| 32 || Freeze time to 23:00
|-
|-
| 34 ||
| 34 ||* Add (0.0083333 * elapsed frames) to the Time of Day timer.
* Add (0.0083333 * elapsed frames) to the Time of Day timer.
* If the timer is >= 360.0, which means that a day has passed, the game subtracts 360 from the timer.
* If the timer is >= 360.0, which means that a day has passed, the game subtracts 360 from the timer.


'''Note''': In this state, the blood moon timer is never updated and its value is never checked either.  
'''Note''': In this state, the blood moon timer is never updated and its value is never checked either.  
|}
|}
* Update the [[#Day/night time flag]], the [[#Time division, IsMorning, IsNoon, etc.]]
* Update the [[#Day/night time flag]], the [[#Time division, IsMorning, IsNoon, etc.]]
* If the "Bloody Moon end reserve timer" is non zero, decrement it. If the new value is zero, the WM_BloodyDay flag is cleared.
* If the "Bloody Moon end reserve timer" is non zero, decrement it. If the new value is zero, the WM_BloodyDay flag is cleared.
Line 164: Line 166:
In any other case, WM_DaytimeFlag is set to true and WM_NighttimeFlag to false.
In any other case, WM_DaytimeFlag is set to true and WM_NighttimeFlag to false.


=== Time division, IsMorning, IsNoon, etc. ===
=== Time division, IsMorning, IsNoon, etc. === <!--T:26-->
{|class="wikitable"
{|class="wikitable"
! Start !! End !! Division !! Time type (1) !! Time type (2)
! Start !! End !! Division !! Time type (1) !! Time type (2)
Line 186: Line 188:
| 00:00 || 04:00 || 7 || NightB || Night_B
| 00:00 || 04:00 || 7 || NightB || Night_B
|}
|}
Note: all intervals include the start time and exclude the end time.
Note: all intervals include the start time and exclude the end time.


Line 247: Line 250:
|}
|}


<!--T:40-->
[[Category:Internals]]
[[Category:Internals]]
[[Category:Subsystems (BotW)]]
[[Category:Subsystems (BotW)]]
826

edits