A project to reverse Grand Theft Auto San Andreas completely, and to rewrite and document every function.
Building this project will result in a DLL file that can be injected into GTA:SA using any ASI loader out there. After the DLL file has been injected, the ingame functions will be replaced by the reversed ones. The game will behave the same. Now if we make any changes to the reversed code, it will take effect in the game. The goal is to keep reversing until we have the entire game reversed to compile a standalone executable.
The progress of reversed classes can be tracked here. (needs to be updated) We currently estimate that about 50-60% of the code is done. Since this project is done as a hobby, and worked on at irregular intervals, there's no real time estimate.
Before you start writing code, please make sure to read the coding guidelines for this project.
- Visual Studio 2022 (Community Edition is enough)
- CMake (for those who want to use CMake instead of premake5)
You can either build with Premake5 or CMake; that's up to you, but a C++20 capable compiler [with <ranges>
, <format>
support] is required.
First clone the project, including the submodules:
git clone --recurse-submodules https://github.com/gta-reversed/gta-reversed-modern.git
Premake5
-
Execute
premake5.bat
-
You'll find gta_reversed.sln shortcut in the same folder as premake5.
-
Open it, and once the project has loaded, just hit
CTRL + SHIFT + B
CMake
-
Sadly CMake requires VS22, because since CMake v3.20.4
cxx_20
maps tostd=c++20
instead ofstd=c++latest
. If you really want to avoid VS22, you can either downgrade your CMake, or changec++20
toc++latest
manually in the project settings... Or just use premake5 instead. -
Download and install the latest version of CMake for windows from HERE and make sure to add it to your PATH.
-
Open CMake GUI
-
Set the Source and Build directories (Don't forget to append "Bin" after the path for build), like this:
- Click configure, then you will see a dialogue box. Choose the IDE you have (In the image below it's VS2019) and "Win32", then click Finish.
-
Once the configuration is complete, click the Generate button.
-
You'll find GTASA.sln in the Bin folder.
-
Open Command Prompt in the
gta-reversed
directory and runcmake -Bbuild -H. -A Win32
. -
To open the Visual Studio project, simply run
cmake --open build
or openbuild/GTASA.sln
manually. -
Once the configuration is complete, click the Generate button.
-
You'll find GTASA.sln in Bin folder.
To install all the necessary files, run install.py
with administrator privileges [Necessary to create symlinks on Windows] in the root directory.
Alternatively, you can install them by yourself:
- GTA SA Compact exe
- ASI Loader
- III.VC.SA.WindowedMode.asi
- Mouse Fix (dinput8.dll) [Can be found in the zip in
./contrib
]
You can download them in a single archive. Using other plugins is strongly discouraged and we provide no support.
[If you have ran install.py
in the previous step then this step is already done]
Instructions
You can create symbolic links [symlinks] for artifacts [the .asi
] to need not copy them every time you compile the project.
Open a console with administrator privileges in the git repo's directory and run contrib\link_asi.bat
or right click link_asi.bat
file and click Run as administrator
, then
follow instructions at the command window.
Check this out for some inspiration ;)
- All contributors of the plugin-sdk project.
- All contributors of the original project.
- Hundreds of great people on gtaforums.com.
- re3 team.
- And everyone who contributed to GTA:SA reversing.