refactor(world): own live environment state
Move the DAT sky, selected day group, world clock, weather, AdminEnvirons bridge, and debug cycles into a one-shot WorldEnvironmentController while preserving GameWindow's public aliases and accepted startup/session/render order. Correct the named retail citations and register the remaining environment audio and fog/radar gaps. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
557eb7ef6b
commit
d09e246d3a
19 changed files with 606 additions and 368 deletions
|
|
@ -61,8 +61,9 @@ public static class DerethDateTime
|
|||
/// Base/anchor year for the Portal Year calendar (retail
|
||||
/// <c>GameTime.ZeroYear</c> = 10). Tick 0 corresponds to PY 10,
|
||||
/// Morningthaw 1, Morntide-and-Half. Retail's <c>TimeOfDay+0x64</c>
|
||||
/// ("absolute year") includes this offset, and <c>SkyDesc::PickCurrentDayGroup</c>
|
||||
/// (<c>FUN_00501990</c>) feeds the absolute year into its LCG seed.
|
||||
/// ("absolute year") includes this offset, and
|
||||
/// <c>SkyDesc::CalcPresentDayGroup @ 0x00500E10</c> feeds the absolute year
|
||||
/// into its LCG seed (older-build cross-reference <c>FUN_00501990</c>).
|
||||
/// </summary>
|
||||
public const int ZeroYear = 10;
|
||||
|
||||
|
|
@ -244,7 +245,8 @@ public static class DerethDateTime
|
|||
/// Matches retail's <c>TimeOfDay + 0x64</c> field
|
||||
/// (<c>FUN_005a7510:5300</c>:
|
||||
/// <c>floor((worldTime+base)/secsPerYear) + baseYear</c>). This is
|
||||
/// the value the retail DayGroup picker (<c>FUN_00501990</c>) feeds
|
||||
/// the value the retail DayGroup picker
|
||||
/// (<c>SkyDesc::CalcPresentDayGroup @ 0x00500E10</c>) feeds
|
||||
/// into its LCG seed, so acdream must match for identical weather
|
||||
/// picks vs retail.
|
||||
/// </summary>
|
||||
|
|
@ -256,7 +258,7 @@ public static class DerethDateTime
|
|||
/// (dat's ZeroTimeOfYear) to match retail's <c>TimeOfDay + 0x68</c>
|
||||
/// field (<c>FUN_005a7510:5304</c>:
|
||||
/// <c>floor(withinYearSec / secsPerDay)</c>). Consumed by
|
||||
/// <c>SkyDesc.PickCurrentDayGroup</c> as part of the per-day seed.
|
||||
/// <c>SkyDesc::CalcPresentDayGroup</c> as part of the per-day seed.
|
||||
/// </summary>
|
||||
public static int DayOfYear(double ticks)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue