Resolve DAT-authored particle ranges from the hardware GfxObj, apply retail distance and completed-cell visibility gates, and preserve the exact finite/infinite off-view update semantics. This removes dense-world simulation work without shortening terrain, entity, fog, or streaming distance. Publish doorway-clipped outdoor cells through a focused frame controller, retain effect cell identity for outdoor statics, reject hidden emitters before particle-slot scans, and offer an explicit opt-in Extended particle range. Release build succeeds and all 5,857 tests pass with five intentional skips. Retail-conformance, architecture, and adversarial review cycles are clean; connected Aerlinthe visual/performance gate pending. Co-authored-by: OpenAI Codex <codex@openai.com>
64 lines
2.1 KiB
C#
64 lines
2.1 KiB
C#
using System.Collections.Generic;
|
||
using AcDream.UI.Abstractions.Settings;
|
||
|
||
namespace AcDream.UI.Abstractions.Panels.Settings;
|
||
|
||
/// <summary>
|
||
/// Particle visibility distance policy. Retail uses the GfxObj-authored
|
||
/// distance exactly; Extended is an explicit acdream adaptation for players
|
||
/// who prefer longer-lived distant effects with the corresponding CPU cost.
|
||
/// </summary>
|
||
public enum ParticleRange
|
||
{
|
||
Retail = 0,
|
||
Extended = 1,
|
||
}
|
||
|
||
/// <summary>
|
||
/// Display-related preferences persisted to <c>settings.json</c>.
|
||
/// Modern addition (no retail equivalent for FOV / vsync etc) — replaces
|
||
/// the various <c>ACDREAM_*</c> environment variables for resolution +
|
||
/// windowed mode with an in-game UI.
|
||
///
|
||
/// <para>
|
||
/// Records are immutable; mutation goes through
|
||
/// <see cref="SettingsVM.SetDisplay"/> which assigns a new instance via
|
||
/// <c>with</c>-expressions.
|
||
/// </para>
|
||
/// </summary>
|
||
public sealed record DisplaySettings(
|
||
string Resolution,
|
||
bool Fullscreen,
|
||
bool VSync,
|
||
float FieldOfView,
|
||
float Gamma,
|
||
bool ShowFps,
|
||
QualityPreset Quality,
|
||
ParticleRange ParticleRange)
|
||
{
|
||
/// <summary>Values used on first launch / when settings.json is absent.
|
||
/// Geometry/render defaults preserve the pre-L.0 runtime state — Resolution
|
||
/// matches the WindowOptions startup size (1280×720), FieldOfView
|
||
/// matches camera FovY (60°), VSync matches WindowOptions (false),
|
||
/// ShowFps matches retail's initially-hidden SmartBox FPS readout.</summary>
|
||
public static DisplaySettings Default { get; } = new(
|
||
Resolution: "1280x720",
|
||
Fullscreen: false,
|
||
VSync: false,
|
||
FieldOfView: 60f,
|
||
Gamma: 1.0f,
|
||
ShowFps: false,
|
||
Quality: QualityPreset.High,
|
||
ParticleRange: ParticleRange.Retail);
|
||
|
||
/// <summary>16:9 resolution presets offered in the dropdown.</summary>
|
||
public static IReadOnlyList<string> AvailableResolutions { get; } = new[]
|
||
{
|
||
"1280x720",
|
||
"1366x768",
|
||
"1600x900",
|
||
"1920x1080",
|
||
"2560x1440",
|
||
"3840x2160",
|
||
};
|
||
}
|