imrove readme; enable screenshots with F12

aap 2 years ago
parent a6b56e6b7a
commit f3bfdd7857
  1. 118
  2. 13
  3. 37
  4. 4
  5. 1
  6. 1
  7. 2

@ -5,26 +5,91 @@
## Intro
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.
In this repository you'll find the fully reversed source code for GTA III ([master](tree/master) branch) and GTA VC ([miami](tree/miami) branch).
## How can I try it?
It has been tested and works on Windows, Linux and FreeBSD, on x86, amd64, arm and arm64.\
Rendering is handled either by original RenderWare (D3D8)
or the reimplementation [librw]( (D3D9, OpenGL 2.1 or above, OpenGL ES 2.0 or above).\
Audio is done with MSS (using dlls from original GTA) or OpenAL.
- re3 requires game assets to work, so you **must** own [a copy of GTA III](
- Build re3 or download [the latest nightly build]( (You must be logged in.)
- (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 executable to GTA 3 directory and run it.
The project has also been ported to the [Nintendo Switch](,
[Playstation Vita]( and
[Nintendo Wii U](
We cannot build for PS2 or Xbox yet. If you're interested in doing so, get in touch with us.
## Latest standalone executables to download
## Installation
(Put content of selected archive into gamedir)
- re3 requires PC game assets to work, so you **must** own [a copy of GTA III](
- Build re3 or download the latest nightly build:
- [Windows D3D9 MSS 32bit](
- [Windows D3D9 64bit](
- [Windows OpenGL 64bit](
- [Linux 64bit](
- [MacOS 64bit](
- Copy the files from the `gamefiles` directory to your game root directory. (This is not strictly necessary but very much recommended)
- Move re3 executable to GTA 3 directory and run it.
- [Windows D3D9 MSS 32bit](
- [Windows D3D9 64bit](
- [Windows OpenGL 64bit](
- [Linux 64bit](
- [MacOS 64bit](
## Screenshots
![re3 2021-02-11 22-57-03-23](
![re3 2021-02-11 22-43-44-98](
![re3 2021-02-11 22-46-33-76](
![re3 2021-02-11 22-50-29-54](
## Improvements
We have implemented a number of changes and improvements to the original game.
They can be configured in `core/config.h`.
Some of them can be toggled at runtime, some cannot.
* Fixed a lot of smaller and bigger bugs
* User files (saves and settings) stored in GTA root directory
* Settings stored in re3.ini file instead of gta3.set
* Debug menu to do and change various things (Ctrl-M to open)
* Debug camera (Ctrl-B to toggle)
* Rotatable camera
* Xinput controller support (Windows)
* No loading screens between islands ("map memory usage" in menu)
* Skinned ped support (models from Xbox or Mobile)
* Rendering
* Widescreen support (properly scaled HUD, Menu and FOV)
* PS2 MatFX (vehicle reflections)
* PS2 alpha test (better rendering of transparency)
* PS2 particles
* Xbox vehicle rendering
* Xbox world lightmap rendering (needs Xbox map)
* Xbox ped rim light
* Xbox screen rain droplets
* More customizable colourfilter
* Menu
* Map
* More options
* Controller configuration menu
* ...
* Can load DFFs and TXDs from other platforms, possibly with a performance penalty
* ...
## To-Do
The following things would be nice to have/do:
* Fix physics for high FPS
* Compare code with PS2 code (tedious, no good decompiler)
* [PS2 port](
* Xbox port (not quite as important)
* reverse remaining unused/debug functions
* compare Codewarrior build with original binary for more accurate code (very tedious)
## Modding
Asset modifications (models, texture, handling, script, ...) should work the same way as with original GTA for the most part.
Mods that make changes to the code (dll/asi, CLEO, limit adjusters) will *not* work.
Some things these mods do are already implemented in re3 (much of SkyGFX, GInput, SilentPatch, Widescreen fix),
others can easily be achieved (increasing limis, see `config.h`),
others will simply have to be rewritten and integrated into the code directly.
Sorry for the inconvenience.
## Building from Source
@ -78,21 +143,12 @@ Assuming you have Visual Studio:
> :information_source: **Did you notice librw?** 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.
## Contributing
Please read the [Coding Style]( Document
We have a [Coding Style]( document that isn't followed or enforced very well.
### Unreversed / incomplete classes (at least the ones we know)
The following classes have only unused or practically unused code left:
NameGrid.cpp - only on mobile (a player name grid, either a very early player name code ala GTA1 or a multiplayer leftover)
PedDebug.cpp - only on mobile (debug code)
HandlingMgr.cpp - debug functions from mobile
CFormationInfo - unused PedAI class that could be found on mobile
CVehicle::ProcessBikeWheel - early bike code (only on mobile)
CAutomobile::DebugCode - debug function from mobile
CBoat::DebugCode - debug function from mobile
CBoat::ModifyHandlingValue - debug function from mobile
CBoat::DisplayHandlingData - debug function from mobile
CStreaming::PrintRequestList - debug function from mobile
d3d8raster.c - only on PC (slight RW modification that we don't actually need)
Do not use features from C++11 or later.
## License
We don't feel like we're in a position to give this code a license.
If we were, it would be MIT licensed.

@ -1,8 +1,10 @@
#include "common.h"
#include <time.h>
#include "rpmatfx.h"
#include "rphanim.h"
#include "rpskin.h"
#include "rtbmp.h"
#include "rtpng.h"
#include "rpanisot.h"
@ -354,7 +356,11 @@ RwGrabScreen(RwCamera *camera, RwChar *filename)
strcpy(temp, CFileMgr::GetRootDirName());
strcat(temp, filename);
if (RtBMPImageWrite(pImage, &temp[0]) == nil)
if (RtPNGImageWrite(pImage, &temp[0]) == nil)
result = false;
return result;
@ -373,6 +379,7 @@ DoRWStuffEndOfFrame(void)
#ifndef MASTER
char s[48];
if (CPad::GetPad(1)->GetLeftShockJustDown()) {
// try using both controllers for this thing... crazy bastards
if (CPad::GetPad(0)->GetRightStickY() > 0) {
@ -384,6 +391,12 @@ DoRWStuffEndOfFrame(void)
RwGrabScreen(, s);
if (CPad::GetPad(1)->GetLeftShockJustDown() || CPad::GetPad(0)->GetFJustDown(11)) {
sprintf(s, "screen_%11lld.png", time(nil));
RwGrabScreen(, s);
#endif // !MASTER

@ -945,6 +945,43 @@ RtBMPImageRead(const RwChar *imageName)
RwImage *
RtPNGImageWrite(RwImage *image, const RwChar *imageName)
#ifndef _WIN32
char *r = casepath(imageName);
if (r) {
rw::writePNG(image, r);
} else {
rw::writePNG(image, imageName);
rw::writePNG(image, imageName);
return image;
RwImage *
RtPNGImageRead(const RwChar *imageName)
#ifndef _WIN32
RwImage *image;
char *r = casepath(imageName);
if (r) {
image = rw::readPNG(r);
} else {
image = rw::readPNG(imageName);
return image;
return rw::readPNG(imageName);
#include "rtquat.h"
RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp) { return (RtQuat*)((rw::Quat*)quat)->rotate(axis, angle/180.0f*3.14159f, (CombineOp)combineOp); }

@ -0,0 +1,4 @@
#pragma once
RwImage *RtPNGImageWrite(RwImage * image, const RwChar * imageName);
RwImage *RtPNGImageRead(const RwChar * imageName);

@ -204,6 +204,7 @@ psGrabScreen(RwCamera *pCamera)
rw::Image *image = RwCameraGetRaster(pCamera)->toImage();
return image;

@ -259,6 +259,7 @@ psGrabScreen(RwCamera *pCamera)
rw::Image *image = RwCameraGetRaster(pCamera)->toImage();
return image;

vendor/librw vendored

@ -1 +1 @@
Subproject commit 5c95300890559c85a2764bc200361f904cd4f9f4
Subproject commit 4c77fb57546e89da1e6f3bad3c582848de9f5c93