GTA2 Structs and enums
Reversed by h0x91b and masuo.
Not all reversed structs and enums appear here, mostly car related ones.
Last updated: 2022.08.29
Please see also:
my gta2 trainer
h0x91b's discord server
my videos about GTA2 reversing
h0x91b's YouTube channel
thanks!
Sprite struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
ushort rotation |
? |
? |
Sprite* prev |
GameObject* gameObject |
Sprite* next |
0x10 |
CollisionBox* collisionBox |
uint x |
uint y |
uint z |
0x20 |
? |
ushort spriteID |
short remap |
? |
? |
uint layer |
INVISIBILITY invisibility |
? |
? |
? |
0x30 |
SPRITE_TYPE spriteType |
int lockPallete |
char zoomInSprite |
char zOfTileOn |
? |
? |
(not sure if that's the end)
CarPhysics struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
int xVelocityReadOnly |
int yVelocityReadOnly |
uint totalDamageMaybe |
CarPhysics next |
0x10 |
uint rr_skid_x |
uint rr_skid_y |
uint rl_skid_x |
uint rl_skid_y |
0x20 |
uint fl_skid_x |
uint fl_skid_y |
uint fr_skid_x |
uint fr_skid_y |
0x30 |
uint xPos |
uint yPos |
uint xPosReadOnly |
uint yPosReadOnly |
0x40 |
int xVelocity |
int yVelocity |
int xJumpFromEdgeForce |
int yJumpFromEdgeForce |
0x50 |
? |
? |
ushort rotation |
? |
CarPhysics prev |
0x60 |
uint gasPedal |
CarPhysics ? |
int zVelocityRelated |
uint zPos |
0x70 |
int zVelocityReadOnly |
int rotationForce |
int pointingAngle |
? |
0x80 |
? |
uint frontSkid |
uint rearSkid |
? |
0x90 |
uchar timerSinceLastMove |
bool isBrakeOn |
bool isHandbrakeOn |
bool isForwardGas |
bool isBackwardGas |
? |
? |
? |
CAR_SURFACE surfaceType |
CAR_SURFACE2 surfaceType2 |
0xA0 |
? |
? |
uchar currentSlopeLength |
uchar currentSlopeStageOn |
uchar currentTileZ |
uchar handbrakeForce |
CAR_MODEL carModel |
? |
? |
uchar driveWheelsLocked |
char steering |
? |
? |
Roof struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
Sprite* sprite |
Roof* next |
int xOffset |
int yOffset |
0x10 |
short rotation |
Sprite* next |
? |
? |
? |
? |
? |
? |
CollisionBox struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
uint xSize |
uint ySize |
uint zSizeMaybe |
uint rr_corner_x |
0x10 |
uint rr_corner_y |
uint rl_corner_x |
uint rl_corner_y |
uint fl_corner_x |
0x20 |
uint fl_corner_y |
uint fr_corner_x |
uint fr_corner_y |
(there is more)
Passenger struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
Ped* ped |
Passenger* prev |
TrailerController struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
? |
? |
? |
Car* trailer |
CarDoor struct
|
0x00 |
0x01 |
0x02 |
0x03 |
0x04 |
0x05 |
0x06 |
0x07 |
0x08 |
0x09 |
0x0A |
0x0B |
0x0C |
0x0D |
0x0E |
0x0F |
0x00 |
char animationFrame |
? |
char deltaOffset |
? |
Ped* pedInDoor |
? |
? |
? |
? |
? |
CarLightsAndDoors struct
|
bit 0 |
bit 1 |
bit 2 |
bit 3 |
bit 4 |
bit 5 |
bit 6 |
bit 7 |
0x0 |
rear right light broken |
rear left light broken |
front left broken |
front right light broken |
front glass broken |
brakes left light |
front left light |
left door open 1 |
0x1 |
left door open 2 |
left door open 3 |
left door open 4 |
3rd door open 1 |
3rd door open 2 |
3rd door open 3 |
3rd door open 4 |
front right cabin light |
0x2 |
front left cabin light |
rear right cabin light |
rear left cabin light |
? |
? |
? |
brakes right light |
front right light |
0x3 |
right door open 1 |
right door open 2 |
right door open 3 |
right door open 4 |
4th door open 1 |
4th door open 2 |
4th door open 3 |
4th door open 4 |
SPRITE_TYPE enum 4
value |
description |
1 |
invisible |
2 |
car |
4 |
turret |
CAR_WEAPON enum 4
value |
description |
15 |
bomb |
16 |
oil |
17 |
mine |
18 |
gun |
19 |
tank turret |
20 |
water gun |
21 |
flamethrower |
22 |
jeep gun |
23 |
instant bomb |
24 |
letter J |
25 |
letter K |
26 |
letter L |
27 |
letter M |
INVISIBILITY enum 1
value |
description |
0 |
visible |
1 |
invisible |
2 |
ghost |
3 |
no transparency |
CAR_SURFACE enum 4
value |
description |
0 |
flat |
1 |
slope up |
2 |
slope down |
3 |
slope left |
4 |
slope right |
6 |
in air |
8 |
in water |
9 |
wet |
CAR_SURFACE2 enum 4
value |
description |
0 |
air or slope |
1 |
concrete |
2 |
grass |
4 |
wet |
8 |
metal |
CAR_ENGINE_STATE enum 4
value |
description |
0 |
broken |
1 |
off |
2 |
turning off |
3 |
on |
4 |
related to siren |
5 |
turn off |
6 |
off 2 |
7 |
lights on, engine off |
TRAFFIC_CAR_TYPE enum 4
value |
description |
1 |
regular |
2 |
prot. recycled |
4 |
ambulance |
6 |
police car |
CAR_SIREN enum 1
value |
description |
2 |
off |
4 |
on |
8 |
alarm |