feat(render) Campaign FW1: SIX OF TEN FIXTURES FULLY CONFORMANT
Three final pins complete the still-fixture set: (1) the CELL portal side decode is the INVERSE of the 0x2 bit (uniform with the building convention; the doorway-still flood proved it - ov=2 n=3 exact, and foundry-deep stays green); (2) interior frames key the landscape order off the OUTSIDE-projected landcell (get_outside_cell_id - derived from the camera origin); (3) the outdoor pview has draw_landscape=FALSE so look-in floods discard exit portals - the ov=0 pattern of every traced look-in. CONFORMANT: foundry-deep (every frame), doorway-still, street-outdoor, terrace-center, terrace-edge (the #456 acceptance pose), cathedral-arrival - full frames identical to retail. The moving four diverge only at punch-edge frames (walkabout F9, foundry-entry F67) - pose-timing sensitivity parked in the driver Skip note. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
28475d0544
commit
66f9e0d459
6 changed files with 158 additions and 14 deletions
|
|
@ -33,7 +33,25 @@ public static class WalkLandscapeDatBuilder
|
|||
private static int SideCellCountForRing(int ring)
|
||||
=> ring <= 1 ? 8 : ring == 2 ? 4 : ring <= 4 ? 2 : 1;
|
||||
|
||||
public static BuiltWorld Build(DatCollection dats, uint cameraCellId)
|
||||
/// <summary>Per-frame viewer placement for moving replays (the camera
|
||||
/// stays within the anchor block in every moving fixture).</summary>
|
||||
public static void SetViewer(WalkLandscape landscape, uint cameraCellId, Vector3 cameraOrigin)
|
||||
{
|
||||
uint low = cameraCellId & 0xFFFFu;
|
||||
if (low >= 1 && low <= 0x40)
|
||||
{
|
||||
int cellIndex = (int)low - 1;
|
||||
landscape.ViewerCellX = cellIndex / 8;
|
||||
landscape.ViewerCellY = cellIndex % 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
landscape.ViewerCellX = Math.Clamp((int)MathF.Floor(cameraOrigin.X / 24f), 0, 7);
|
||||
landscape.ViewerCellY = Math.Clamp((int)MathF.Floor(cameraOrigin.Y / 24f), 0, 7);
|
||||
}
|
||||
}
|
||||
|
||||
public static BuiltWorld Build(DatCollection dats, uint cameraCellId, Vector3 cameraOrigin = default)
|
||||
{
|
||||
Region region = (Region)dats.Get<Region>(0x13000000u)!;
|
||||
float[] heightTable = region.LandDefs.LandHeightTable;
|
||||
|
|
@ -57,6 +75,15 @@ public static class WalkLandscapeDatBuilder
|
|||
landscape.ViewerCellX = cellIndex / 8;
|
||||
landscape.ViewerCellY = cellIndex % 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Interior camera: retail keys the landscape order off the
|
||||
// OUTSIDE-projected landcell (Position::get_outside_cell_id via
|
||||
// SmartBox::RenderNormalMode seen_outside arm) - derive it from
|
||||
// the camera origin (block-local, 24 m cells).
|
||||
landscape.ViewerCellX = Math.Clamp((int)MathF.Floor(cameraOrigin.X / 24f), 0, 7);
|
||||
landscape.ViewerCellY = Math.Clamp((int)MathF.Floor(cameraOrigin.Y / 24f), 0, 7);
|
||||
}
|
||||
|
||||
var cells = new Dictionary<uint, WalkCell>();
|
||||
var buildings = new Dictionary<WalkBuilding, WalkWorldDatAdapter.BuildingEntry>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue