Skip to content

Commit

Permalink
v12.10 update
Browse files Browse the repository at this point in the history
  • Loading branch information
argonlefou committed Aug 15, 2024
1 parent b549fa4 commit e8f910a
Show file tree
Hide file tree
Showing 21 changed files with 1,139 additions and 54 deletions.
1 change: 1 addition & 0 deletions DemulShooter/DemulShooter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<Compile Include="Games\Game_TtxGundam_V2.cs" />
<Compile Include="Games\Game_WaxAkuma.cs" />
<Compile Include="Games\Game_WndAdCop95.cs" />
<Compile Include="Games\Game_WndAdCopOverseas.cs" />
<Compile Include="Games\Game_WndAlienSafari.cs" />
<Compile Include="Games\Game_WndBonbon95.cs" />
<Compile Include="Games\Game_WndBugBusters.cs" />
Expand Down
4 changes: 4 additions & 0 deletions DemulShooter/DemulShooterWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,10 @@ public DemulShooterWindow(string[] Args, bool isVerbose, bool enableTrace)
{
_Game = new Game_WndAdCop95(_Rom.ToLower(), _HideGameCrosshair, _NoInput, isVerbose);
}; break;
case "adcopsea":
{
_Game = new Game_WndAdCopOverseas(_Rom.ToLower(), _HideGameCrosshair, _NoInput, isVerbose);
}; break;
case "bonbon":
{
_Game = new Game_WndBonbon95(_Rom.ToLower(), _HideGameCrosshair, _NoInput, isVerbose);
Expand Down
8 changes: 4 additions & 4 deletions DemulShooter/Games/Game_CoastalWws.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ protected override void CreateOutputList()
_Outputs.Add(new GameOutput(OutputDesciption.P2_Life, OutputId.P2_Life));
_Outputs.Add(new AsyncGameOutput(OutputDesciption.P1_Damaged, OutputId.P1_Damaged, Configurator.GetInstance().OutputCustomDamagedDelay, 100, 0));
_Outputs.Add(new AsyncGameOutput(OutputDesciption.P2_Damaged, OutputId.P2_Damaged, Configurator.GetInstance().OutputCustomDamagedDelay, 100, 0));
_Outputs.Add(new GameOutput(OutputDesciption.P1_Credits, OutputId.P1_Credit));
_Outputs.Add(new GameOutput(OutputDesciption.P2_Credits, OutputId.P2_Credit));
_Outputs.Add(new GameOutput(OutputDesciption.P1_Credits, OutputId.P1_Credits));
_Outputs.Add(new GameOutput(OutputDesciption.P2_Credits, OutputId.P2_Credits));
}

/// <summary>
Expand Down Expand Up @@ -378,8 +378,8 @@ public override void UpdateOutputValues()
SetOutputValue(OutputId.P1_Life, _P1_Life);
SetOutputValue(OutputId.P2_Life, _P2_Life);

SetOutputValue(OutputId.P1_Credit, BitConverter.ToInt32(_Mmfh.Payload, MMFH_WildWestShoutout.INDEX_P1_CREDITS));
SetOutputValue(OutputId.P2_Credit, BitConverter.ToInt32(_Mmfh.Payload, MMFH_WildWestShoutout.INDEX_P2_CREDITS));
SetOutputValue(OutputId.P1_Credits, BitConverter.ToInt32(_Mmfh.Payload, MMFH_WildWestShoutout.INDEX_P1_CREDITS));
SetOutputValue(OutputId.P2_Credits, BitConverter.ToInt32(_Mmfh.Payload, MMFH_WildWestShoutout.INDEX_P2_CREDITS));

_Mmfh.Writeall();
}
Expand Down
12 changes: 5 additions & 7 deletions DemulShooter/Games/Game_RwOpGhost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ class Game_RwOpGhost : Game
//Credits settings (these are defaults values)
private int _Credits_Freeplay = 0; //0 or 1

private HardwareScanCode _P2_Action_Key = HardwareScanCode.DIK_H;

/// <summary>
/// Constructor
/// </summary>
Expand Down Expand Up @@ -409,7 +407,7 @@ private void SetHack_Jvs()
//jmp dword ptr [edx*4+gs2.exe+1AF274]
CaveMemory.Write_StrBytes("FF 24 95 74 F2 5A 00");

Logger.WriteLog("Adding JVS Buttons CodeCave at : 0x" + CaveMemory.CaveAddress.ToString("X8"));
Logger.WriteLog("Adding CodeCave at : 0x" + CaveMemory.CaveAddress.ToString("X8"));

//Code injection
IntPtr ProcessHandle = _TargetProcess.Handle;
Expand Down Expand Up @@ -625,7 +623,7 @@ public override IntPtr KeyboardHookCallback(IntPtr KeyboardHookID, int nCode, In
{
Apply_OR_ByteMask(_Buttons_CaveAddress + 1, 0x80);
}
else if (s.scanCode == _P2_Action_Key)
else if (s.scanCode == Configurator.GetInstance().DIK_OpGhost_Action_P2)
{
Apply_OR_ByteMask(_Buttons_CaveAddress + 3, 0x80);
}
Expand All @@ -639,7 +637,7 @@ public override IntPtr KeyboardHookCallback(IntPtr KeyboardHookID, int nCode, In
{
WriteByte(_P1_Action_CaveAddress, 0x80);
}
else if (s.scanCode == _P2_Action_Key)
else if (s.scanCode == Configurator.GetInstance().DIK_OpGhost_Action_P2)
{
Send_VK_KeyDown(_P2_Action_VK);
}
Expand All @@ -664,7 +662,7 @@ public override IntPtr KeyboardHookCallback(IntPtr KeyboardHookID, int nCode, In
{
Apply_AND_ByteMask(_Buttons_CaveAddress + 1, 0x7F);
}
else if (s.scanCode == _P2_Action_Key)
else if (s.scanCode == Configurator.GetInstance().DIK_OpGhost_Action_P2)
{
Apply_AND_ByteMask(_Buttons_CaveAddress + 3, 0x7F);
}
Expand All @@ -678,7 +676,7 @@ public override IntPtr KeyboardHookCallback(IntPtr KeyboardHookID, int nCode, In
{
WriteByte(_P1_Action_CaveAddress, 0x00);
}
else if (s.scanCode == _P2_Action_Key)
else if (s.scanCode == Configurator.GetInstance().DIK_OpGhost_Action_P2)
{
Send_VK_KeyUp(_P2_Action_VK);
}
Expand Down
2 changes: 1 addition & 1 deletion DemulShooter/Games/Game_WndAdCop95.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using DsCore.Config;
using DsCore.MameOutput;
using DsCore.Memory;
using DsCore.Win32;
using DsCore.RawInput;
using DsCore.Win32;

namespace DemulShooter
{
Expand Down
Loading

0 comments on commit e8f910a

Please sign in to comment.