36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
namespace AcDream.App.Streaming;
|
|
|
|
/// <summary>
|
|
/// Immutable world-origin center captured by the update thread when a
|
|
/// landblock load is admitted. Worker construction and render publication use
|
|
/// this same value, so a later recenter cannot combine two coordinate frames.
|
|
/// </summary>
|
|
public readonly record struct LandblockBuildOrigin
|
|
{
|
|
public LandblockBuildOrigin(int centerX, int centerY)
|
|
{
|
|
CenterX = centerX;
|
|
CenterY = centerY;
|
|
IsSpecified = true;
|
|
}
|
|
|
|
public int CenterX { get; }
|
|
public int CenterY { get; }
|
|
|
|
/// <summary>
|
|
/// Distinguishes a captured origin at the valid map coordinate (0,0)
|
|
/// from an old compatibility request that carries no origin at all.
|
|
/// </summary>
|
|
public bool IsSpecified { get; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Complete immutable input to one CPU-side landblock build.
|
|
/// <see cref="Generation"/> is carried for matching and diagnostics only;
|
|
/// residency policy remains owned by <see cref="StreamingController"/>.
|
|
/// </summary>
|
|
public readonly record struct LandblockBuildRequest(
|
|
uint LandblockId,
|
|
LandblockStreamJobKind Kind,
|
|
ulong Generation,
|
|
LandblockBuildOrigin Origin);
|