daily update on 20240828 by nitload youmu, autotexture added

This commit is contained in:
Nitload
2024-08-28 10:58:31 +08:00
parent d082071f2d
commit 1ee4e4a42f
586 changed files with 60910 additions and 123106 deletions
@@ -32,12 +32,13 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Security.Authentication.ExtendedProtection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace StgSharp.Logic
namespace StgSharp.BluePrint
{
public class BlueprintPipeline
@@ -59,26 +60,13 @@ namespace StgSharp.Logic
public BlueprintNode Former => former;
public int Level => former.Level;
public BlueprintPipelineArgs Args
{
get => args;
set => args = value;
}
public void CompleteAndSkip()
{
//Console.WriteLine($"Complete\t{former.ContextName}\t->\t{after.ContextName}");
formerCompleteSemaphore.Release();
}
public void CompleteAndWriteData(BlueprintPipelineArgs args)
{
this.args = args;
//Console.WriteLine($"Complete\t{former.ContextName}\t->\t{after.ContextName}");
formerCompleteSemaphore.Release();
}
public int Level => former.Level;
public static void SkipAll(Dictionary<string, BlueprintPipeline> ports)
{
@@ -86,9 +74,9 @@ namespace StgSharp.Logic
{
throw new ArgumentNullException(nameof(ports));
}
foreach (var item in ports)
foreach (KeyValuePair<string, BlueprintPipeline> item in ports)
{
if (item.Value!=null)
if (item.Value != null)
{
item.Value.CompleteAndSkip();
}
@@ -101,9 +89,9 @@ namespace StgSharp.Logic
{
throw new ArgumentNullException(nameof(ports));
}
foreach (var item in ports)
foreach (KeyValuePair<string, BlueprintPipeline> item in ports)
{
if (item.Value!=null)
if (item.Value != null)
{
item.Value.WaitForStart();
}
@@ -116,10 +104,36 @@ namespace StgSharp.Logic
formerCompleteSemaphore.Wait();
}
~BlueprintPipeline()
{
formerCompleteSemaphore.Dispose();
}
#region pipline op
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void CompleteAndSkip()
{
//Console.WriteLine($"Complete\t{former.Name}\t->\t{after.Name}");
formerCompleteSemaphore.Release();
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void CompleteAndWriteData(BlueprintPipelineArgs args)
{
this.args = args;
CompleteAndSkip();
}
#endregion
}
public abstract class BlueprintPipelineArgs
{
public object? Value { get; set; }
}