Go to file
aap fdb262bca0 update librw 2020-07-22 14:02:43 +02:00
dxsdk Cleanup project a bit 2019-06-30 12:56:50 +02:00
eax I am an idiot 2020-05-22 21:14:38 +03:00
gamefiles Add GXT util 2020-05-05 15:47:18 +03:00
librw@4883b03f2b update librw 2020-07-22 14:02:43 +02:00
libsndfile oal wav/mp3 stream update 2020-05-07 09:26:16 +03:00
milessdk switch out milessdk with fake miles header and lib 2020-04-21 15:09:08 +02:00
mpg123 rem mpg123_pre header 2020-05-07 09:35:34 +03:00
openal-soft openal-soft added 2020-05-04 21:06:14 +03:00
rwsdk/include/d3d8 removed windows.h for most .cpps 2020-03-27 20:53:47 +01:00
src update librw 2020-07-22 14:02:43 +02:00
utils/gxt Add GXT util 2020-05-05 15:47:18 +03:00
.appveyor.yml Fix linux build 2020-05-22 21:00:59 +03:00
.gitignore premake and appveyor update 2019-07-20 16:13:16 +03:00
.gitmodules librw submodule 2020-04-17 11:09:26 +03:00
.travis.yml Add basic linux build on travis 2020-05-18 19:43:02 +02:00
README.md Update README.md 2020-05-12 03:41:41 +03:00
premake-vs2015.cmd improvements (?) to premakefile 2020-04-29 11:44:26 +02:00
premake-vs2017.cmd improvements (?) to premakefile 2020-04-29 11:44:26 +02:00
premake-vs2019.cmd improvements (?) to premakefile 2020-04-29 11:44:26 +02:00
premake5.exe fixed CParticle crash && RandTable 2019-05-31 00:49:06 +03:00
premake5.lua Fix OAL crash 2020-05-24 01:06:19 +03:00
premake5Linux Linux build support 2020-05-11 21:00:55 +03:00



Build status

Platform Debug Release
Windows Direct3D9 Download Download
Windows OpenGL3.3 Download Download


The aim of this project is to reverse GTA III for PC by replacing parts of the game one by one such that we have a working game at all times.

How can I try it?

  • re3 requires game assets to work, so you must own a copy of GTA III.
  • Build re3 or download it from one of the above links (Debug or Release).
  • (Optional) If you want to use optional features like Russian language or menu map, copy the files in /gamefiles folder to your game root folder.
  • Move re3.exe to GTA 3 directory and run it.

Preparing the environment for building

Currently only building on VS2015/2017/2019 (Windows) and GCC (Linux) is tested.

  • Clone the repo.
  • Run git submodule init and git submodule update.
  • Point GTA_III_RE_DIR environment variable to GTA3 root folder.
  • Run premake
    • On Windows: one of the premake-vsXXXX.cmd variants on root folder
    • On Linux: proceed to Building on Linux.
  • There are various settings at the very bottom of config.h, you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.

Rendering engine re3 uses completely homebrew RenderWare-replacement rendering engine; librw. librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.


Unreversed / incomplete classes (at least the ones we know)

The following classes have only unused or practically unused code left:

CCullZone - only mobile stuff
CCullZones - only mobile stuff

Coding style

I started writing in Plan 9 style, but realize that this is not the most popular style, so I'm willing to compromise. Try not to deviate too much so the code will look similar across the whole project.

To give examples, these two styles (or anything in between) are fine:

	if(a == b){
	if(x != y)

type functionname(args)
	if (a == b) {
	} else {
	if (x != y)

This one (or anything more extreme) is heavily discouraged:

type functionname ( args )
  if ( a == b )
  if ( x != y )


  • Put the brace on the same line as control statements

  • Put the brace on the next line after function definitions and structs/classes

  • Put an else on the same line with the braces

  • Don't put braces around single statements

  • Put the function return type on a separate line

  • Indent with TABS

As for the less cosmetic choices, here are some guidelines how the code should look:

  • Don't use magic numbers where the original source code would have had an enum or similar. Even if you don't know the exact meaning it's better to call something FOOBAR_TYPE_4 than just 4, since 4 will be used in other places and you can't easily see where else the enum value is used.

  • Don't just copy paste code from IDA, make it look nice

  • Use the right types. In particular:

    • don't use types like __int16, we have int16 for that

    • don't use unsigned, we have typedefs for that

    • don't use char for anything but actual characters, use int8, uint8 or bool

    • don't even think about using win32 types (BYTE, WORD, &c.) unless you're writing win32 specific code

    • declare pointers like int *ptr;, not int* ptr;

  • As for variable names, the original gta source code was not written in a uniform style, but here are some observations:

    • many variables employ a form of hungarian notation, i.e.:

    • m_ may be used for class member variables (mostly those that are considered private)

    • ms_ for (mostly private) static members

    • f is a float, i or n is an integer, b is a boolean, a is an array

    • do not use dw for DWORD or so, we're not programming win32

  • Generally, try to make the code look as if R* could have written it