SHA256
Compare commits
4
Commits
fa0f175bae
...
d7b3f48d32
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
d7b3f48d32
|
||
|
|
1fda8b09a7
|
||
|
|
a98617b7a2
|
||
|
|
3b06343c19
|
No files matched your search
+26
-2
@@ -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.
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user