mirror of https://github.com/hykilpikonna/AquaDX
Merge branch 'v1-dev' into feat/CustomVersionString
commit
8dc3035b66
|
@ -266,6 +266,7 @@
|
||||||
<Compile Include="Cheat\TicketUnlock.cs" />
|
<Compile Include="Cheat\TicketUnlock.cs" />
|
||||||
<Compile Include="Config.cs" />
|
<Compile Include="Config.cs" />
|
||||||
<Compile Include="Fix\FixCharaCrash.cs" />
|
<Compile Include="Fix\FixCharaCrash.cs" />
|
||||||
|
<Compile Include="Performance\ImproveLoadSpeed.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Main.cs" />
|
<Compile Include="Main.cs" />
|
||||||
<Compile Include="UX\CustomVersionString.cs" />
|
<Compile Include="UX\CustomVersionString.cs" />
|
||||||
|
|
|
@ -15,4 +15,9 @@ SinglePlayer=true
|
||||||
# !!EXPERIMENTAL!! Skip from the card-scanning screen directly to music selection screen
|
# !!EXPERIMENTAL!! Skip from the card-scanning screen directly to music selection screen
|
||||||
SkipToMusicSelection=false
|
SkipToMusicSelection=false
|
||||||
# Set the version string displayed at the top-right corner of the screen
|
# Set the version string displayed at the top-right corner of the screen
|
||||||
CustomVersionString=""
|
CustomVersionString=""
|
||||||
|
|
||||||
|
[Performance]
|
||||||
|
# Disable some useless checks and delays to speed up the game boot process
|
||||||
|
# !! Known issue: The game may crash if DX Pass scanning is enabled
|
||||||
|
ImproveLoadSpeed=false
|
|
@ -7,6 +7,7 @@ namespace AquaMai
|
||||||
{
|
{
|
||||||
public UXConfig UX { get; set; }
|
public UXConfig UX { get; set; }
|
||||||
public CheatConfig Cheat { get; set; }
|
public CheatConfig Cheat { get; set; }
|
||||||
|
public PerformanceConfig Performance { get; set; }
|
||||||
|
|
||||||
public class CheatConfig
|
public class CheatConfig
|
||||||
{
|
{
|
||||||
|
@ -20,5 +21,10 @@ namespace AquaMai
|
||||||
public bool SkipToMusicSelection { get; set; }
|
public bool SkipToMusicSelection { get; set; }
|
||||||
public string CustomVersionString { get; set; }
|
public string CustomVersionString { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class PerformanceConfig
|
||||||
|
{
|
||||||
|
public bool ImproveLoadSpeed { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
using System.Diagnostics;
|
||||||
|
using HarmonyLib;
|
||||||
|
using MelonLoader;
|
||||||
|
using Process;
|
||||||
|
|
||||||
|
namespace AquaMai.Performance
|
||||||
|
{
|
||||||
|
public class ImproveLoadSpeed
|
||||||
|
{
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(PowerOnProcess), "OnUpdate")]
|
||||||
|
public static bool PrePowerOnUpdate(PowerOnProcess __instance)
|
||||||
|
{
|
||||||
|
var traverse = Traverse.Create(__instance);
|
||||||
|
var state = traverse.Field("_state").GetValue<byte>();
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case 3:
|
||||||
|
traverse.Field("_state").SetValue((byte)4);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
traverse.Field("_state").SetValue((byte)8);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
traverse.Field("_state").SetValue((byte)10);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(StartupProcess), "OnUpdate")]
|
||||||
|
public static bool PreStartupUpdate(StartupProcess __instance)
|
||||||
|
{
|
||||||
|
var traverse = Traverse.Create(__instance);
|
||||||
|
var state = traverse.Field("_state").GetValue<byte>();
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
traverse.Field("_state").SetValue((byte)3);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
traverse.Field("_state").SetValue((byte)5);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
var timer = traverse.Field("timer").GetValue<Stopwatch>();
|
||||||
|
Traverse.Create(timer).Field("elapsed").SetValue(2 * 10000000L);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue