How izawartka/gta2-trainer-cpp works
This is a Windows/MFC GTA2 trainer DLL: the user manipulates gameplay through trainer dialogs while GTA2 is running, and the trainer reads or changes GTA2 state through fixed-address game bindings and hooks. The principal workflow branches into player/vehicle controls, spawning and AI setup, camera/render changes, and live entity inspection. The README documents additional gameplay controls that the sampled excerpts do not fully expose; those are represented at the MainWindow level. Edges reflect only documented behavior and visible calls; unsampled implementation limits finer wiring.
Main entry points: MainWindow.cpp Trainer controls · gta2-helper.h GTA2 bindings · LiveTableWindow.cpp Live entity table · CameraHooks.cpp Camera transforms
Components 18
Trainer interface
- Trainer controls
MainWindow.cpp - Ped spawner
PedSpawnerWindow.cpp - Camera controls
CameraWindow.cpp - Advanced settings
ACSWindow.cpp
Gameplay controls
- Player and vehicle edits
MainWindow.cpp - Ped creation and AI
PedSpawnerWindow.cpp - Gameplay actions
MainWindow.cpp
Camera and rendering
- Camera transforms
CameraHooks.cpp - Render hooks
Hooks.cpp
Live inspection
- Live entity table
LiveTable/LiveTableWindow.cpp - Column editor
LiveTable/LiveTableEditWindow.cpp - Entity memory reader
LiveTable/LiveTableHelper.cpp - Table field definitions
LiveTable/LiveTableData.cpp
Game integration
- GTA2 bindings
gta2-helper.h - GTA2 memory layouts
gta2.h - Hook utilities
HookHelper.cpp
Other components
- Trainer user
- GTA2 runtime
Connections 24
- Trainer user → Trainer controls: uses controls
- Trainer controls → Player and vehicle edits: edits gameplay
- Trainer controls → Gameplay actions: dispatches actions
- Trainer controls → Ped spawner: opens spawner
- Ped spawner → Ped creation and AI: submits settings
- Trainer controls → Camera controls: opens controls
- Camera controls → Camera transforms: sets camera options
- Trainer controls → Advanced settings: opens settings
- Trainer controls → Live entity table: opens table
- Live entity table → Column editor: opens editor
- Column editor → Live entity table: updates columns
- Live entity table → Entity memory reader: reads entity data
- Entity memory reader → Table field definitions: uses field offsets
- Entity memory reader → GTA2 memory layouts: indexes game structures
- Trainer controls → GTA2 bindings: calls game functions
- Player and vehicle edits → GTA2 bindings: uses game bindings
- Ped creation and AI → GTA2 bindings: spawns and configures
- Gameplay actions → GTA2 bindings: invokes game actions
- GTA2 bindings → GTA2 runtime: reads and writes
- Camera transforms → Hook utilities: installs hooks
- Render hooks → Hook utilities: patches call sites
- Hook utilities → GTA2 runtime: patches runtime
- Camera transforms → GTA2 runtime: reads camera state
- Render hooks → GTA2 runtime: intercepts rendering