Skip to content

Commit

Permalink
ddd
Browse files Browse the repository at this point in the history
  • Loading branch information
Sui committed Oct 27, 2016
1 parent fa43d1b commit 7e64f09
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 141 deletions.
Binary file modified AVPPH_CustomLauncher.sdf
Binary file not shown.
10 changes: 7 additions & 3 deletions GameHack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class GameHack
int[] offsetFovY = new int[] { 0x4, 0xC8 };

int bgScalingAddress = 0x001F70C4;
int[] bgScalingOffsets = new int[] { 0x2BC, 0x1c4 };
int[] bgScalingOffsetsX = new int[] { 0x2BC, 0x1c0 };
int[] bgScalingOffsetsY = new int[] { 0x2BC, 0x1c4 };

public void DoWork()
{
Expand Down Expand Up @@ -86,7 +87,7 @@ public void DoWork()
{
ReadFovX = Trainer.ReadPointerFloat(myProcess, cshellBaseAdress + fovAddress, offsetFovX);
ReadFovY = Trainer.ReadPointerFloat(myProcess, cshellBaseAdress + fovAddress, offsetFovY);
readBgValue = Trainer.ReadPointerFloat(myProcess, cshellBaseAdress + bgScalingAddress, bgScalingOffsets);
readBgValue = Trainer.ReadPointerFloat(myProcess, cshellBaseAdress + bgScalingAddress, bgScalingOffsetsY);



Expand All @@ -96,7 +97,10 @@ public void DoWork()
Trainer.WritePointerFloat(myProcess, cshellBaseAdress + fovAddress, offsetFovY, fovY);

if (readBgValue != bgCorrectedValue && readBgValue != 0x0000000)
Trainer.WritePointerFloat(myProcess, cshellBaseAdress + bgScalingAddress, bgScalingOffsets, bgCorrectedValue);
{
Trainer.WritePointerFloat(myProcess, cshellBaseAdress + bgScalingAddress, bgScalingOffsetsX, 1.570796f);
Trainer.WritePointerFloat(myProcess, cshellBaseAdress + bgScalingAddress, bgScalingOffsetsY, bgCorrectedValue);
}

if (!dllInjected && LithTechBaseAdress != 0x0 && cshellBaseAdress != 0x0 && d3dren != 0x0)
{
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.6.3.0")]
[assembly: AssemblyFileVersion("0.6.3.0")]
[assembly: AssemblyVersion("0.6.4.0")]
[assembly: AssemblyFileVersion("0.6.4.0")]
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ Features
* Built in aspect ratio hack for easy access to widescreen resolutions.
* Built in FOV changer, tied directly to aspect ratio hack (calculated as the most common Horizontal+ FOV).

Requirements
-------
* Aliens vs. Predator 2: Primal Hunt
* Windows Vista / 7 / 8 / 10
* [Microsoft .NET Framework 4.5](https://www.microsoft.com/en-US/download/details.aspx?id=30653)
* [Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/en-US/download/details.aspx?id=48145) 32-bit
* Administrator rights on the system (due to writting to memory of other program / injecting DLL libraries etc.)

Installation
-------
Patch the game if you haven't already. Download the program from [releases page](https://github.com/SuiMachine/AVP2PH-Custom-Launcher/releases). Copy it to AVP2 directory. To get rid of annoying question from Windows about download files, right click on **AVP_CustomLauncher.exe**, and choose Properties. In the General tab, click Unlock.
Expand All @@ -18,6 +26,10 @@ Patch the game if you haven't already. Download the program from [releases page]

**Note 2**: For running the game on resolutions wider than 2048px you'll need "special" D3DIM700.DLL by jackfuste. It can be found [here](http://www.wsgf.org/forums/viewtopic.php?p=155982#p155982).

**Note 3**: While it may be surprising some some people, I have not tested the launcher with multiplayer. With the master servers being dead for a long time and projects to restore them having suspecious files (says the one, who literally injects DLLs into memory), for me, it's dead.

Credits
-------
* [SuicideMachine](http://www.twitch.tv/suicidemachine/)
* [SuicideMachine](http://www.twitch.tv/suicidemachine/)
* evolution536 - who wrote the DLL injector class
* Cless - who wrote the trainer class
Binary file modified Release/AVP2PH_CustomLauncher.exe
Binary file not shown.
Binary file modified Release/widescreenfix.dll
Binary file not shown.
Loading

0 comments on commit 7e64f09

Please sign in to comment.