REDCODE changes

This commit is contained in:
lewd_alt
2026-06-13 11:34:36 -05:00
parent dc27a5cf59
commit f34795a82d
10 changed files with 41 additions and 16 deletions

View File

@@ -3,26 +3,26 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>2DGAMELIB</AssemblyName> <AssemblyName>2DGAMELIB</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<UseWindowsForms>True</UseWindowsForms> <TargetFramework>net8.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU</Platforms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<LangVersion>9.0</LangVersion> <LangVersion>9.0</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources> <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<GenerateResourceWarnOnBinaryFormatterUse>false</GenerateResourceWarnOnBinaryFormatterUse>
<NoWarn>SYSLIB0011;CA1416</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<RootNamespace /> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="glfw-net" Version="3.3.1" /> <PackageReference Include="glfw-net" Version="3.3.1" />
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Silk.NET.OpenGL" Version="2.22.0" /> <PackageReference Include="Silk.NET.OpenGL" Version="2.22.0" />
<PackageReference Include="System.Collections" Version="4.3.0" /> <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.3" /> <PackageReference Include="System.Resources.Extensions" Version="8.0.0">
<PackageReference Include="System.Resources.Extensions" Version="7.0.1" /> <NoWarn>NU1603</NoWarn>
</PackageReference>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -2,7 +2,6 @@ using Newtonsoft.Json;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using static System.Net.Mime.MediaTypeNames;
namespace _2DGAMELIB namespace _2DGAMELIB
{ {

View File

@@ -2,7 +2,10 @@
"profiles": { "profiles": {
"SlaveMatrix": { "SlaveMatrix": {
"commandName": "Project", "commandName": "Project",
"workingDirectory": "$(SolutionDir)\\game_folder" "workingDirectory": "../game_folder",
"environmentVariables": {
"DOTNET_SYSTEM_GLOBALIZATION_INVARIANT": "true"
}
}, },
"WSL": { "WSL": {
"commandName": "WSL2", "commandName": "WSL2",

View File

@@ -4,7 +4,7 @@
<AssemblyName>SlaveMatrix</AssemblyName> <AssemblyName>SlaveMatrix</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@@ -14,10 +14,17 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>app.ico</ApplicationIcon> <ApplicationIcon>app.ico</ApplicationIcon>
<RootNamespace /> <RootNamespace />
<InvariantGlobalization>true</InvariantGlobalization>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<NoWarn>CA1416</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\2DGAMELIB\2DGAMELIB.csproj" /> <ProjectReference Include="..\2DGAMELIB\2DGAMELIB.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="..\game_folder\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Properties\Resources.Designer.cs"> <Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>

View File

@@ -628,7 +628,7 @@ namespace SlaveMatrix
private static void AutoSave() private static void AutoSave()
{ {
string s = Sta.SavePath + "\\0 "; string s = Path.Combine(Sta.SavePath, "0 ");
foreach (string item in from e in Directory.EnumerateFiles(Sta.SavePath) foreach (string item in from e in Directory.EnumerateFiles(Sta.SavePath)
where e.StartsWith(s) where e.StartsWith(s)
select e) select e)

View File

@@ -1,15 +1,19 @@
using System; using System;
using System.Reflection;
using _2DGAMELIB; using _2DGAMELIB;
namespace SlaveMatrix namespace SlaveMatrix
{ {
internal static class Program internal static class Program
{ {
static Program()
{
AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);
}
[STAThread] [STAThread]
private static void Main(string[] A_0) private static void Main(string[] A_0)
{ {
Sta.LoadConfig(); Sta.LoadConfig();
double percent = 35.0; double percent = 35.0;

View File

@@ -880,7 +880,7 @@ namespace SlaveMatrix
{ {
//if (!EncryptSave) //if (!EncryptSave)
{ {
GameData.SaveExMod(SavePath + "\\" + i + " " + GameData.GetSaveDateString().Replace("/", "_") + ".sav"); GameData.SaveExMod(Path.Combine(SavePath, i + " " + GameData.GetSaveDateString().Replace("/", "_") + ".sav"));
} }
/*else /*else
{ {
@@ -1410,7 +1410,7 @@ namespace SlaveMatrix
B_クロス初期化 = default(B_クロス情報); B_クロス初期化 = default(B_クロス情報);
B_前掛け初期化 = default(B_前掛け情報); B_前掛け初期化 = default(B_前掛け情報);
= default(); = default();
CurrentDirectory = Directory.GetCurrentDirectory(); CurrentDirectory = AppContext.BaseDirectory;
GameData = new GameState(); GameData = new GameState();
SavePath = Path.Combine(CurrentDirectory, "save"); SavePath = Path.Combine(CurrentDirectory, "save");
ImiPath = Path.Combine(CurrentDirectory, "text", "Basement", "Training", "Imitation.txt"); ImiPath = Path.Combine(CurrentDirectory, "text", "Basement", "Training", "Imitation.txt");

View File

@@ -2440,7 +2440,7 @@ namespace SlaveMatrix
{ {
((IDisposable)font)?.Dispose(); ((IDisposable)font)?.Dispose();
} }
調UI2.Film.DisplayLayer.Save(Path + "\\" + now.ToString("yyyy_MM_dd_HH_mm_ss") + ".png", ImageFormat.Png); 調UI2.Film.DisplayLayer.Save(System.IO.Path.Combine(Path, now.ToString("yyyy_MM_dd_HH_mm_ss") + ".png"), ImageFormat.Png);
ip.SubInfoIm = GameText. + "\r\n" + GameText.Photoフォルダに保存されます; ip.SubInfoIm = GameText. + "\r\n" + GameText.Photoフォルダに保存されます;
if (Sta.GameData.TrainingTarget.Trained && !調UI2.Cha.Body.Is拘束 && 調UI2.Cha.Body.Is腕人 && !Sta.GameData.TrainingTarget.ChaD.) if (Sta.GameData.TrainingTarget.Trained && !調UI2.Cha.Body.Is拘束 && 調UI2.Cha.Body.Is腕人 && !Sta.GameData.TrainingTarget.ChaD.)
{ {

View File

@@ -0,0 +1,5 @@
{
"configProperties": {
"System.Drawing.EnableUnixSupport": true
}
}

7
global.json Normal file
View File

@@ -0,0 +1,7 @@
{
"sdk": {
"version": "8.0.0",
"rollForward": "latestMajor",
"allowPrerelease": true
}
}