Skip to content

Commit

Permalink
v10.9.8 update
Browse files Browse the repository at this point in the history
  • Loading branch information
argonlefou committed Apr 13, 2023
1 parent 705a86f commit dcbadc8
Show file tree
Hide file tree
Showing 57 changed files with 12,672 additions and 260 deletions.
28 changes: 28 additions & 0 deletions DemulShooter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityPlugin_BepInEx_RHA", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityPlugin_BepInEx_TRA", "UnityPlugin_BepInEx_TRA\UnityPlugin_BepInEx_TRA.csproj", "{76E588AE-0F09-42AE-9D6B-F738780916A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityPlugin_BepInEx_NHA2", "UnityPlugin_BepInEx_NHA2\UnityPlugin_BepInEx_NHA2.csproj", "{CE8D6901-EED9-4966-B9D4-D63397E1535D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityPlugin_BepInEx_NHA2_Configurator", "UnityPlugin_BepInEx_NHA2_Configurator\UnityPlugin_BepInEx_NHA2_Configurator.csproj", "{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -129,6 +133,30 @@ Global
{76E588AE-0F09-42AE-9D6B-F738780916A5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{76E588AE-0F09-42AE-9D6B-F738780916A5}.Release|x64.ActiveCfg = Release|Any CPU
{76E588AE-0F09-42AE-9D6B-F738780916A5}.Release|x86.ActiveCfg = Release|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Debug|x64.ActiveCfg = Debug|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Debug|x86.ActiveCfg = Debug|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Release|Any CPU.Build.0 = Release|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Release|x64.ActiveCfg = Release|Any CPU
{CE8D6901-EED9-4966-B9D4-D63397E1535D}.Release|x86.ActiveCfg = Release|Any CPU
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Debug|Any CPU.ActiveCfg = Debug|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Debug|Mixed Platforms.Build.0 = Debug|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Debug|x64.ActiveCfg = Debug|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Debug|x86.ActiveCfg = Debug|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Debug|x86.Build.0 = Debug|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Release|Any CPU.ActiveCfg = Release|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Release|Mixed Platforms.ActiveCfg = Release|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Release|Mixed Platforms.Build.0 = Release|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Release|x64.ActiveCfg = Release|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Release|x86.ActiveCfg = Release|x86
{FB7FF287-8EFA-4EA0-8C6F-4867B15DB1FB}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion DemulShooter/DemulShooter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<Compile Include="Games\Game_Dolphin5.cs" />
<Compile Include="Games\Game_GvrAliens.cs" />
<Compile Include="Games\Game_GvrAliensHasp.cs" />
<Compile Include="Games\Game_GvrFarCryV2.cs" />
<Compile Include="Games\Game_GvrFarCry.cs" />
<Compile Include="Games\Game_GvrFearLand.cs" />
<Compile Include="Games\Game_WndHeavyFire3Pc.cs" />
<Compile Include="Games\Game_WndHeavyFire4Pc.cs" />
Expand Down
2 changes: 1 addition & 1 deletion DemulShooter/DemulShooterWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public DemulShooterWindow(string[] Args, bool isVerbose)
} break;
case "farcry":
{
_Game = new Game_GvrFarCryV2(_Rom.ToLower(), _NoInput, isVerbose);
_Game = new Game_GvrFarCry(_Rom.ToLower(), _NoInput, isVerbose);
} break;
case "fearland":
{
Expand Down
21 changes: 21 additions & 0 deletions DemulShooter/Games/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,12 @@ protected virtual void ReadGameDataFromMd5Hash(String GameData_Folder)
this.GetType().GetField(FieldName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.IgnoreCase).SetValue(this, n);
Logger.WriteLog(FieldName + " successfully set to following value : 0x" + n.MemoryOffset.ToString("X8") + "|" + n.Length.ToString());
}
else if (buffer[0].Contains("InjectionStruct"))
{
InjectionStruct n = new InjectionStruct(buffer[1].Trim());
this.GetType().GetField(FieldName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.IgnoreCase).SetValue(this, n);
Logger.WriteLog(FieldName + " successfully set to following value : 0x" + n.InjectionOffset.ToString("X8") + "|" + n.Length.ToString());
}
else if (buffer[0].Contains("DIK"))
{
HardwareScanCode sc = (HardwareScanCode)Enum.Parse(typeof(HardwareScanCode), buffer[1].Trim());
Expand Down Expand Up @@ -554,6 +560,21 @@ protected bool WriteBytes(UInt32 Address, byte[] Buffer)
return false;
}

protected void Write_Codecave(Codecave CodecaveToWrite, InjectionStruct Injection)
{
UInt32 bytesWritten = 0;
UInt32 jumpTo = 0;
jumpTo = CodecaveToWrite.CaveAddress - ((UInt32)_TargetProcess.MainModule.BaseAddress + Injection.InjectionOffset) - 5;
List<byte> Buffer = new List<byte>();
Buffer.Add(0xE9);
Buffer.AddRange(BitConverter.GetBytes(jumpTo));
for (int i = 0; i < Injection.NeededNops; i++)
{
Buffer.Add(0x90);
}
Win32API.WriteProcessMemory(_TargetProcess.Handle, (UInt32)_TargetProcess.MainModule.BaseAddress + Injection.InjectionOffset, Buffer.ToArray(), (UInt32)Buffer.Count, ref bytesWritten);
}

protected void SetNops(UInt32 BaseAddress, NopStruct Nop)
{
for (UInt32 i = 0; i < Nop.Length; i++)
Expand Down
Loading

0 comments on commit dcbadc8

Please sign in to comment.