WorldMgr/zh: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
imported>Simple
(大概翻譯一下)
(No difference)

Revision as of 23:14, 9 May 2020

World Manager (WorldMgr) 是游戏里的一个子系统。 它控制时间、血月、气候、天气、雾、风、闪电、云、山林之王的出现等等。

这个子系统很大/复杂,它的功能被切成九个部分。


WorldMgr

小主管们

小主管 (Sub-managers) 由 WorldMgr::init (0x71010F43C0) 生成, and inserted into a pointer array (@WorldMgr+0x5c0). (注意以下名称不是官方名称。)

Sub-managers by ID
ID Description
0 TimeMgr: 时间、血月、山林之王
1 CloudPrMgr: 云
2 ShootingStarMgr: 流星跟异度神剑流星 (in 1.3.3+)
3 WeatherMgr: Handles "rain splash" and 气候、天气
4 TempMgr: 温度 [check].
5 ?
6 SkyMgr: 天空、雾 [check]。Holds the configuration for all EnvPalettes, EnvAttributes, WeatherInfluences, Remains palettes, Indoor palettes and dungeon fogs.
7 DofMgr: Handles depth of field[check]. Holds depth of field related parameters.
8 ?

气候

WorldMgr 本身(而不是小主管)负责处理气候那一类的事情。 气候显然是由玩家所在的位置决定的(在火山很热、在山上很冷), 有趣的是,它是用摄影机所在的位置而不是林克所在的位置来决定气候的。


TimeMgr

TimeMgr 管理所有跟时间有关的事情,例如血月何时出现,山林之王何时出现。 时间(小时跟分钟)是一个 [0.0, 360.0] 范围内的浮点数。 0.0 代表子夜,180.0 代表中午。

TimeMgr::init

(init 代表初始化设定)

  • 时间浮点数令为 78.75 早上 05:15 的意思)。
  • Time for TotS environment is set to 78.75 (05:15) as well.
  • 血月计时器令为 0(越大代表离血月越近).

TimeMgr::reset

This is called whenever a stage is unloaded (essentially every time the loading screen is shown).(意思是只要读档就会呼叫这个成员函数)

  • Blood Moon checks are delayed.
  • The AnimalMaster_Appearance flag is cleared.

(跟山林之王 flag 会被设为 false,意思是不要出现。)

TimeMgr::calc

这个函数每帧呼叫一次。

  • (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.)(好像是没用到的功能。)
  • 如果某两个过场动画 Demo103_0 and Demo997_0 还没播过的话,时间会被固定在 78.75(早上 05:15)。

(那两个过场动画,前一个应该是林克走出复苏神庙环顾海拉鲁,后一个不知道)