using System.Globalization; namespace AcDream.Core.Rendering; /// Permanent rendering diagnostics and retail render-route helpers. public static class RenderingDiagnostics { /// /// #176 stripe-hunt shader isolation mode. Zero disables the override; /// values 1-3 retain the established lighting diagnostic modes. /// public static int LightDebugMode { get; set; } = int.TryParse( Environment.GetEnvironmentVariable("ACDREAM_LIGHT_DEBUG"), NumberStyles.Integer, CultureInfo.InvariantCulture, out int mode) ? mode : 0; /// Returns true for AC indoor EnvCell ids. public static bool IsEnvCellId(ulong id) => (id & 0xFFFFu) >= 0x0100u; /// /// Retail chooses the indoor path from the player's cell, provided the /// transition-owned render root is available. /// public static bool ShouldRenderIndoor(uint playerCellId, bool renderRootResolved) => renderRootResolved && IsEnvCellId(playerCellId); /// Permanent frame-profiler toggle. public static bool FrameProfEnabled { get; set; } = Environment.GetEnvironmentVariable("ACDREAM_FRAME_PROF") == "1"; /// Optional per-frame CSV history path for the frame profiler. public static string? FrameHistoryPath { get; } = Environment.GetEnvironmentVariable("ACDREAM_FRAME_HISTORY"); /// /// Print-only production walk transcript gate. RuntimeOptions owns the /// sole environment read and assigns this property during construction. /// public static bool DumpWalkTranscriptEnabled { get; set; } }