Document RenderSession

This commit is contained in:
copecone committed 2026-08-17 21:46:14 +09:00
1 parent a98617b7a2
commit 1fda8b09a7
1 file changed
+26 -2
+26 -2
View File
@@ -1,4 +1,4 @@
using System;
using System;
using ADOFAIRenderer.Core;
using ADOFAIRenderer.Data;
@@ -11,7 +11,22 @@ public class RenderSession
{
private bool _auto = true;
public enum PatchType { Time, Screen }
/// <summary>
/// Specifies the types of patches that can be configured for a render session.
/// </summary>
public enum PatchType
{
/// <summary>
/// Time-related patch controlling frame timing and clock synchronization.
/// </summary>
Time,
/// <summary>
/// Screen-related patch controlling screen resolution.
/// </summary>
Screen
}
private bool _timePatch = true;
private bool _screenPatch = true;
@@ -26,6 +41,13 @@ public class RenderSession
return this;
}
/// <summary>
/// Sets whether a specific patch type is enabled for the render session.
/// </summary>
/// <param name="patchType">The <see cref="PatchType"/> to configure.</param>
/// <param name="enabled"><c>true</c> to enable the specified patch; otherwise, <c>false</c>. Default is <c>true</c>.</param>
/// <returns>The current <see cref="RenderSession"/> instance for method chaining.</returns>
/// <exception cref="ArgumentOutOfRangeException">Thrown when an unsupported <see cref="PatchType"/> is provided.</exception>
public RenderSession WithPatch(PatchType patchType, bool enabled = true)
{
switch (patchType)
@@ -41,6 +63,8 @@ public class RenderSession
/// <summary>
/// Applies the configured flags and initiates the render session.
/// </summary>
/// <param name="renderConfig">The configuration settings for the render session.</param>
/// <param name="levelPath">The file path of the level to render.</param>
public void Start(RenderConfig renderConfig, string levelPath)
{
RenderContext.Auto = _auto;