Compare commits

4 Commits
Author SHA256 Message Date
copecone d7b3f48d32 Add RenderContext Reset Mechanism 2026-08-17 21:46:53 +09:00
copecone 1fda8b09a7 Document RenderSession 2026-08-17 21:46:14 +09:00
copecone a98617b7a2 Fix Bundles 2026-08-17 21:40:17 +09:00
copecone 3b06343c19 Update Bundles 2026-08-17 21:29:12 +09:00
5 changed files with 29 additions and 3 deletions

No files matched your search

+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;
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
+3 -1
View File
@@ -67,7 +67,7 @@ namespace ADOFAIRenderer.Core
public int frameCountBase;
public OfflineAudioMixer? AudioMixer { get; private set; }
public AudioSyncCalculator SyncCalculator { get; private set; } = null!;
private AudioSyncCalculator SyncCalculator { get; set; } = null!;
private FrameReader? _frameReader;
public bool renderCheck = true;
@@ -825,6 +825,8 @@ namespace ADOFAIRenderer.Core
AudioMixer?.Reset(); AudioMixer = null;
SyncCalculator.Reset();
RenderContext.Reset();
ADOBase.loader.LoadSceneWithTransition(WipeDirection.StartsFromRight, "scnEditor");
Cursor.visible = true;
}