{"id":13529349,"url":"https://github.com/halpz/re3","last_synced_at":"2025-05-14T18:07:25.926Z","repository":{"id":45005683,"uuid":"340708628","full_name":"halpz/re3","owner":"halpz","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-20T00:38:38.000Z","size":47937,"stargazers_count":2856,"open_issues_count":30,"forks_count":468,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-04-11T10:00:37.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halpz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-20T17:10:37.000Z","updated_at":"2025-04-10T01:25:34.000Z","dependencies_parsed_at":"2024-10-14T23:40:50.385Z","dependency_job_id":"527988f6-8184-42a2-8224-28f00a30ea30","html_url":"https://github.com/halpz/re3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halpz%2Fre3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halpz%2Fre3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halpz%2Fre3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halpz%2Fre3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halpz","download_url":"https://codeload.github.com/halpz/re3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198515,"owners_count":22030966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:00:35.589Z","updated_at":"2025-05-14T18:07:20.918Z","avatar_url":"https://github.com/halpz.png","language":"C++","readme":"\u003cimg src=\"https://github.com/halpz/re3/blob/master/res/images/logo_1024.png?raw=true\" alt=\"re3 logo\" width=\"200\"\u003e\n\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGTAmodding%2Fre3%2Fbadge%3Fref%3Dmaster\u0026style=flat)](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=master)\n\u003ca href=\"https://discord.gg/RFNbjsUMGg\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord\u0026longCache=true\u0026style=flat\" /\u003e\u003c/a\u003e\n\n## Intro\n\nIn this repository you'll find the fully reversed source code for GTA III ([master](https://github.com/halpz/re3/tree/master/) branch) and GTA VC ([miami](https://github.com/halpz/re3/tree/miami/) branch).\n\nIt has been tested and works on Windows, Linux, MacOS and FreeBSD, on x86, amd64, arm and arm64.\\\nRendering is handled either by original RenderWare (D3D8)\nor the reimplementation [librw](https://github.com/aap/librw) (D3D9, OpenGL 2.1 or above, OpenGL ES 2.0 or above).\\\nAudio is done with MSS (using dlls from original GTA) or OpenAL.\n\nThe project has also been ported to the [Nintendo Switch](https://github.com/AGraber/re3-nx/),\n[Playstation Vita](https://github.com/Rinnegatamante/re3) and\n[Nintendo Wii U](https://github.com/GaryOderNichts/re3-wiiu/).\n\nWe cannot build for PS2 or Xbox yet. If you're interested in doing so, get in touch with us.\n\n## Installation\n\n- re3 requires PC game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).\n- Build re3 or download the latest build:\n  - [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_x86/master/re3_Release_win-x86-librw_d3d9-mss.zip)\n  - [Windows D3D9 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_d3d9-oal.zip)\n  - [Windows OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_gl3_glfw-oal.zip)\n  - [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/ubuntu-18.04-gl3.zip)\n  - [MacOS 64bit x86-64](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/macos-latest-gl3.zip)\n- Extract the downloaded zip over your GTA 3 directory and run re3. The zip includes the binary, updated and additional gamefiles and in case of OpenAL the required dlls.\n\n## Screenshots\n\n![re3 2021-02-11 22-57-03-23](https://user-images.githubusercontent.com/1521437/107704085-fbdabd00-6cbc-11eb-8406-8951a80ccb16.png)\n![re3 2021-02-11 22-43-44-98](https://user-images.githubusercontent.com/1521437/107703339-cbdeea00-6cbb-11eb-8f0b-07daa105d470.png)\n![re3 2021-02-11 22-46-33-76](https://user-images.githubusercontent.com/1521437/107703343-cd101700-6cbb-11eb-9ccd-012cb90524b7.png)\n![re3 2021-02-11 22-50-29-54](https://user-images.githubusercontent.com/1521437/107703348-d00b0780-6cbb-11eb-8afd-054249c2b95e.png)\n\n## Improvements\n\nWe have implemented a number of changes and improvements to the original game.\nThey can be configured in `core/config.h`.\nSome of them can be toggled at runtime, some cannot.\n\n* Fixed a lot of smaller and bigger bugs\n* User files (saves and settings) stored in GTA root directory\n* Settings stored in re3.ini file instead of gta3.set\n* Debug menu to do and change various things (Ctrl-M to open)\n* Debug camera (Ctrl-B to toggle)\n* Rotatable camera\n* XInput controller support (Windows)\n* No loading screens between islands (\"map memory usage\" in menu)\n* Skinned ped support (models from Xbox or Mobile)\n* Rendering\n  * Widescreen support (properly scaled HUD, Menu and FOV)\n  * PS2 MatFX (vehicle reflections)\n  * PS2 alpha test (better rendering of transparency)\n  * PS2 particles\n  * Xbox vehicle rendering\n  * Xbox world lightmap rendering (needs Xbox map)\n  * Xbox ped rim light\n  * Xbox screen rain droplets\n  * More customizable colourfilter\n* Menu\n  * Map\n  * More options\n  * Controller configuration menu\n  * ...\n* Can load DFFs and TXDs from other platforms, possibly with a performance penalty\n* ...\n\n## To-Do\n\nThe following things would be nice to have/do:\n\n* Fix physics for high FPS\n* Improve performance on lower end devices, especially the OpenGL layer on the Raspberry Pi (if you have experience with this, please get in touch)\n* Compare code with PS2 code (tedious, no good decompiler)\n* [PS2 port](https://web.archive.org/web/20210217192931/https://github.com/GTAmodding/re3/wiki/PS2-port)\n* Xbox port (not quite as important)\n* reverse remaining unused/debug functions\n* compare CodeWarrior build with original binary for more accurate code (very tedious)\n\n## Modding\n\nAsset modifications (models, texture, handling, script, ...) should work the same way as with original GTA for the most part.\n\nCLEO scripts work with [CLEO Redux](https://github.com/cleolibrary/CLEO-Redux).\n\nMods that make changes to the code (dll/asi, limit adjusters) will *not* work.\nSome things these mods do are already implemented in re3 (much of SkyGFX, GInput, SilentPatch, Widescreen fix),\nothers can easily be achieved (increasing limis, see `config.h`),\nothers will simply have to be rewritten and integrated into the code directly.\nSorry for the inconvenience.\n\n## Building from Source  \n\nWhen using premake, you may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if you want the executable to be moved there via post-build script.\n\nClone the repository with `git clone --recursive https://github.com/halpz/re3.git`. Then `cd re3` into the cloned repository.\n\n\u003cdetails\u003e\u003csummary\u003eLinux Premake\u003c/summary\u003e\n\nFor Linux using premake, proceed: [Building on Linux](https://web.archive.org/web/20210217192751/https://github.com/GTAmodding/re3/wiki/Building-on-Linux)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eLinux Conan\u003c/summary\u003e\n\nInstall python and conan, and then run build.\n```\nconan export vendor/librw librw/master@\nmkdir build\ncd build\nconan install .. re3/master@ -if build -o re3:audio=openal -o librw:platform=gl3 -o librw:gl3_gfxlib=glfw --build missing -s re3:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo\nconan build .. -if build -bf build -pf package\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eMacOS Premake\u003c/summary\u003e\n\nFor MacOS using premake, proceed: [Building on MacOS](https://web.archive.org/web/20210717004757/https://github.com/GTAmodding/re3/wiki/Building-on-MacOS)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eFreeBSD\u003c/summary\u003e\n\nFor FreeBSD using premake, proceed: [Building on FreeBSD](https://web.archive.org/web/20210217192740/https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eWindows\u003c/summary\u003e\n\nAssuming you have Visual Studio 2015/2017/2019:\n- Run one of the `premake-vsXXXX.cmd` variants on root folder.\n- Open build/re3.sln with Visual Studio and compile the solution.\n\nMicrosoft recently discontinued its downloads of the DX9 SDK. You can download an archived version here: https://archive.org/details/dxsdk_jun10\n\n**If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://web.archive.org/web/20210217192855/https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).\n\u003c/details\u003e\n\n\u003e :information_source: premake has an `--with-lto` option if you want the project to be compiled with Link Time Optimization.\n\n\u003e :information_source: There are various settings in [config.h](https://github.com/halpz/re3/tree/master/src/core/config.h), you may want to take a look there.\n\n\u003e :information_source: re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.\n\nIf you feel the need, you can also use CodeWarrior 7 to compile re3 using the supplied codewarrior/re3.mcp project - this requires the original RW33 libraries, and the DX8 SDK. The build is unstable compared to the MSVC builds though, and is mostly meant to serve as a reference.\n\n## Contributing\nAs long as it's not linux/cross-platform skeleton/compatibility layer, all of the code on the repo that's not behind a preprocessor condition(like FIX_BUGS) are **completely** reversed code from original binaries.  \n\nWe **don't** accept custom codes, as long as it's not wrapped via preprocessor conditions, or it's linux/cross-platform skeleton/compatibility layer.\n\nWe accept only these kinds of PRs;\n\n- A new feature that exists in at least one of the GTAs (if it wasn't in III/VC then it doesn't have to be decompilation)  \n- Game, UI or UX bug fixes (if it's a fix to original code, it should be behind FIX_BUGS)\n- Platform-specific and/or unused code that's not been reversed yet\n- Makes reversed code more understandable/accurate, as in \"which code would produce this assembly\".\n- A new cross-platform skeleton/compatibility layer, or improvements to them\n- Translation fixes, for languages original game supported\n- Code that increase maintainability  \n\nWe have a [Coding Style](https://github.com/halpz/re3/blob/master/CODING_STYLE.md) document that isn't followed or enforced very well.\n\nDo not use features from C++11 or later.\n\n\n## History\n\nre3 was started sometime in the spring of 2018,\ninitially as a way to test reversed collision and physics code\ninside the game.\nThis was done by replacing single functions of the game\nwith their reversed counterparts using a dll.\n\nAfter a bit of work the project lay dormant for about a year\nand was picked up again and pushed to github in May 2019.\nAt the time I (aap) had reversed around 10k lines of code and estimated\nthe final game to have around 200-250k.\nOthers quickly joined the effort (Fire_Head, shfil, erorcun and Nick007J\nin time order, and Serge a bit later) and we made very quick progress\nthroughout the summer of 2019\nafter which the pace slowed down a bit.\n\nDue to everyone staying home during the start of the Corona pandemic\neverybody had a lot of time to work on re3 again and\nwe finally got a standalone exe in April 2020 (around 180k lines by then).\n\nAfter the initial excitement and fixing and polishing the code further,\nreVC was started in early May 2020 by starting from re3 code,\nnot by starting from scratch replacing functions with a dll.\nAfter a few months of mostly steady progress we considered reVC\nfinished in December.\n\nSince then we have started reLCS, which is currently work in progress.\n\n\n## License\n\nWe don't feel like we're in a position to give this code a license.\\\nThe code should only be used for educational, documentation and modding purposes.\\\nWe do not encourage piracy or commercial use.\\\nPlease keep derivate work open source and give proper credit.\n","funding_links":[],"categories":["Action","Third-Person games"],"sub_categories":["**[Westwood Studios](https://en.wikipedia.org/wiki/Westwood_Studios) and [EA](https://en.wikipedia.org/wiki/Electronic_Arts) Games from [Command \u0026 Conquer](https://en.wikipedia.org/wiki/Command_%26_Conquer) Series**"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalpz%2Fre3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalpz%2Fre3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalpz%2Fre3/lists"}