Common Data Types (Burnout Paradise): Difference between revisions
Common Data Types (Burnout Paradise) (view source)
Revision as of 00:02, 3 November 2021
, 2 years agoHashes, page refinement
(Vectors and matrices.) |
(Hashes, page refinement) |
||
Line 1:
Some of the more commonly seen data types in Burnout Paradise. This list is WIP.
=
A <code>
Though technically separate, <code>Set</code> and <code>Array</code> have the same structure.
Line 18:
|}
= CgsBitArray/CgsFastBitArray =
Note that a <code>BitArray</code> is stored as a series of <code>uint64_t</code>. This can be confusing if the data is in little endian byte order. Due to this, every <code>BitArray</code>
The below is the structure of <code>BitArray<200></code>. Notice how even though the bits only take up 0x19 bytes, 0x20 bytes are allocated.
Line 40:
|}
=
Vectors in Burnout Paradise are structures made up of floats. They are primarily used for positional values but have been used in other cases, such as colors and gear ratios. Though a number of types besides floats are technically supported, they are seemingly never used.
Line 84:
| 0xC || 0x4 || float || w || W value
|}
=
Matrices are structures made up of vectors. They see similar use to vectors but are three-dimensional rather than planar.
=== Matrix33 ===
Line 136:
= Hashes =
Burnout Paradise uses several different forms of hash. This section is meant to give a brief synopsis of them; their parent pages contain more information and context.
This list is incomplete and will be added to as time goes on.
=== CgsResourceID ===
A <code>CgsResourceID</code> is a 64-bit field storing a CRC32 hash of a given Bundle resource name. The 4 bytes preceding the hash are unused in Bundle 2 V2 and older, though later versions add fields which make extensive use of them.
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description
|-
| 0x0 || 0x8 || uint64_t || mHash || CRC32 hash
|}
=== HashInt ===
<code>HashInt</code> is a typedef of <code>uint64_t</code>. It is used in AttribSysVault resources to refer to GameDB IDs which have been [https://bpr.bo98.uk/lookup8/ lookup8 encoded]. This type has several aliases, including <code>ExportID</code>, <code>Key</code>, <code>AssetID</code>, <code>Type</code>, and <code>TypeID</code>.
{| class="wikitable"
|-
! Name !! Type !! Size
|-
| HashInt || uint64_t || 0x8
|}
=== CgsSound::Playback::Name ===
This type is used in Registry resources and anything accessing streams through a Registry resource.
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description
|-
| 0x0 || 0x8 || uintptr_t || mHash || Custom hash
|}
=== LanguageResourceHash ===
A <code>LanguageResourceHash</code>, though not explicitly defined as a type, is a bit inverted CRC32 hash (i.e., CRC32 with an output XOR of 0 instead of 0xFFFFFFFF) of the name of an entry in a Language resource. This name can usually be determined via the game's executable.
|