Common Data Types: Difference between revisions
Content added Content deleted
(→GtHash: mention of it being basically CRC32 but with some int<->uint nonsense) |
(Update and normalize information.) |
||
Line 1: | Line 1: | ||
{{hatnote|This page is for types used in Takedown-era games. For types used in Paradise, see [[Common Data Types (Burnout Paradise)]]. For types used in Criterion NFS games, see [[Common Data Types (Need for Speed)]].}} |
|||
Data types used commonly by the pre-Paradise Burnout games. |
Data types used commonly by the pre-Paradise Burnout games. |
||
= Shared data types = |
= Shared data types = |
||
=== |
=== CGtV3d === |
||
A structure containing a vector of type <code>RwV3d</code>. |
A structure containing a vector of type <code>RwV3d</code>. |
||
{|class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|- |
||
| 0x0 || 0x10 || u_long128 || mData || 16-byte integer holding an [[#RwV3d|RwV3d]] object || |
|||
!Offset |
|||
!Name |
|||
!Type |
|||
⚫ | |||
| 0x00 || Data || RwV3d |
|||
|} |
|} |
||
=== |
=== CGtLine === |
||
A structure comprised of two vectors, used to represent a line in 3D space. |
A structure comprised of two vectors, used to represent a line in 3D space. |
||
{|class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|- |
||
| 0x0 || 0x10 || [[#CGtV3d|CGtV3d]] || mEndPoint || Start point || |
|||
!Offset |
|||
!Name |
|||
!Type |
|||
|- |
|- |
||
| |
| 0x10 || 0x10 || [[#CGtV3d|CGtV3d]] || mEndPoint || End point || |
||
⚫ | |||
| 0x10 || End point || GtV3d |
|||
|} |
|} |
||
=== |
=== CGtMatrix3x4 === |
||
A structure comprised of four vectors. |
A structure comprised of four vectors. |
||
{|class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|- |
||
| 0x0 || 0x10 || [[#CGtV3d|CGtV3d]] || mRight || Right || |
|||
!Offset |
|||
!Name |
|||
!Type |
|||
|- |
|- |
||
| 0x10 || 0x10 || [[#CGtV3d|CGtV3d]] || mUp || Up || |
|||
| 0x00 || Right || GtV3d |
|||
|- |
|- |
||
| 0x10 || |
| 0x20 || 0x10 || [[#CGtV3d|CGtV3d]] || mAt || At || |
||
|- |
|- |
||
| 0x30 || 0x10 || [[#CGtV3d|CGtV3d]] || mPos || Position || |
|||
| 0x20 || At || GtV3d |
|||
|- |
|||
| 0x30 || Position || GtV3d |
|||
|} |
|} |
||
=== |
=== CGtRGB === |
||
A |
A vector with three floats, each representing a primary additive of an RGB color. |
||
{|class="wikitable" |
{| class="wikitable" |
||
! Name !! Type !! Length !! Comments |
|||
|- |
|||
!Offset |
|||
!Name |
|||
!Type |
|||
|- |
|||
| 0x00 || Red additive || float |
|||
|- |
|||
| 0x04 || Green additive || float |
|||
|- |
|||
| 0x08 || Blue additive || float |
|||
|- |
|- |
||
| CGtRGB || [[#CGtV3d|CGtV3d]] || 0x10 || Red, green, and blue additives, respectively |
|||
|} |
|} |
||
=== |
=== CGtHash === |
||
<code> |
<code>CGtHash</code> is a derivative of CRC-32—a 32-bit value storing the hash of a given string, generated via a custom hash function. These hashes are used by the Takedown-era games to identify and properly assign values within files such as the [[Value Database]]. |
||
=== GtID === |
=== GtID === |
||
Line 66: | Line 51: | ||
For example, the string <code>BURNOUT</code> would be represented by the GtID <code>6226094955724800000</code>. |
For example, the string <code>BURNOUT</code> would be represented by the GtID <code>6226094955724800000</code>. |
||
{| class="wikitable" |
|||
! Name !! Type !! Length !! Comments |
|||
⚫ | |||
| GtID || RwUInt64 || 0x8 || |
|||
⚫ | |||
= RenderWare data types = |
= RenderWare data types = |
||
Line 72: | Line 63: | ||
=== RwV3d === |
=== RwV3d === |
||
A structure comprised of three floats, mainly used to represent the location of a point in 3D space. |
A structure comprised of three floats, mainly used to represent the location of a point in 3D space. |
||
{|class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|- |
||
| 0x0 || 0x4 || RwReal || x || X value || |
|||
!Offset |
|||
!Name |
|||
!Type |
|||
|- |
|- |
||
| |
| 0x4 || 0x4 || RwReal || y || Y value || |
||
|- |
|- |
||
| |
| 0x8 || 0x4 || RwReal || z || Z value || |
||
|- |
|||
| 0x08 || Z value || float |
|||
|- |
|||
| 0x0C || Padding || word |
|||
|} |
|} |
||
=== RwBBox === |
=== RwBBox === |
||
A structure defining the [https://en.wikipedia.org/wiki/Infimum_and_supremum supremum and infimum] vertices of a bounding box. |
A structure defining the [https://en.wikipedia.org/wiki/Infimum_and_supremum supremum and infimum] vertices of a bounding box. |
||
{|class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
!Offset |
|||
!Name |
|||
!Type |
|||
|- |
|- |
||
| |
| 0x0 || 0xC || [[#RwV3d|RwV3d]] || sup || Supremum vertex || |
||
|- |
|- |
||
| |
| 0xC || 0xC || [[#RwV3d|RwV3d]] || inf || Infimum vertex || |
||
|} |
|} |