coastline 0.0.4
Loading...
Searching...
No Matches
TrackHeader Struct Reference

The header of the loaded track. More...

#include <track.h>

Collaboration diagram for TrackHeader:

Public Attributes

u32 size
s32 headerSize
s32 surfaceCount
union { 
   TrackSurface *   surfaces 
   u8 *   surfaceBytes 
}; 
s32 vertexCount
union { 
   Vec3f *   vertices 
   f32(*   vertexRows )[3] 
}; 
s32 textureCount
ModelTexture * textures
u16 * gridTriangles
u16 * gridCellStarts
f32 minX
f32 maxX
f32 minY
f32 maxY
f32 minZ
f32 maxZ
Vec3f startPosition
f32 startHeading
Gfx * skyDisplayList
u8 * reservedSkyData [2]
const char ** instanceNames
TrackInstance * instances
s32 instanceCount
u16 * gridInstances
u16 * gridInstanceStarts
TrackSection * rootSection
u8 * reservedRouteData
TrackSection ** sections
s32 sectionCount
u8 fogColor [3]
Vec3f * cameraPoints
s32 cameraPointCount
u16 * nearbyInstances
u16 * triangleNearbyInstances
u8 * triangleFlags
TrackGate gates [TRACK_GATES]
s32 gateCount
TrackSpecial specials [TRACK_SPECIALS]
s32 specialCount
u8 unreconstructed228 [0x230 - 0x228]

Detailed Description

The header of the loaded track.

Its fields join this structure as they are reconstructed.

Member Data Documentation

◆ size

u32 TrackHeader::size

The bytes of the track once decompressed, first written here by the loading.

◆ headerSize

s32 TrackHeader::headerSize

The size of this header, which must be TRACK_HEADER_SIZE.

◆ surfaceCount

s32 TrackHeader::surfaceCount

The number of triangle surfaces.

◆ surfaces

TrackSurface* TrackHeader::surfaces

What each triangle belongs to, by its index.

◆ surfaceBytes

u8* TrackHeader::surfaceBytes

The serialized eight-byte triangle records.

◆ [union]

union { ... } TrackHeader

◆ vertexCount

s32 TrackHeader::vertexCount

The number of triangle corners.

◆ vertices

Vec3f* TrackHeader::vertices

The corners of the triangles.

◆ vertexRows

f32(* TrackHeader::vertexRows)[3]

The coordinates of each corner.

◆ [union]

union { ... } TrackHeader

◆ textureCount

s32 TrackHeader::textureCount

The number of textures.

◆ textures

ModelTexture* TrackHeader::textures

The textures of the placed models.

◆ gridTriangles

u16* TrackHeader::gridTriangles

The triangles of each cell of the 64 by 64 grid, cell by cell.

◆ gridCellStarts

u16* TrackHeader::gridCellStarts

Where the list of each cell starts in gridTriangles, by cell.

◆ minX

f32 TrackHeader::minX

The least x of the track.

◆ maxX

f32 TrackHeader::maxX

The greatest x of the track.

◆ minY

f32 TrackHeader::minY

The least y of the track.

◆ maxY

f32 TrackHeader::maxY

The greatest y of the track.

◆ minZ

f32 TrackHeader::minZ

The least z of the track, where lightning strikes from.

◆ maxZ

f32 TrackHeader::maxZ

The greatest z of the track.

◆ startPosition

Vec3f TrackHeader::startPosition

The point the vehicles of the starting grid are placed from.

◆ startHeading

f32 TrackHeader::startHeading

The heading of the vehicles on the grid of the start, in radians.

◆ skyDisplayList

Gfx* TrackHeader::skyDisplayList

The display list of the sky, or NULL for a sky of the fog colour.

◆ reservedSkyData

u8* TrackHeader::reservedSkyData[2]

Unreconstructed sky pointers at offset 0x54.

◆ instanceNames

const char* * TrackHeader::instanceNames

The names of the placed models, by index, or NULL.

◆ instances

TrackInstance* TrackHeader::instances

The placed models.

◆ instanceCount

s32 TrackHeader::instanceCount

The number of placed models.

◆ gridInstances

u16* TrackHeader::gridInstances

The placed models of each cell of the 64 by 64 grid, cell by cell.

◆ gridInstanceStarts

u16* TrackHeader::gridInstanceStarts

Where the list of each cell starts in gridInstances, by cell.

◆ rootSection

TrackSection* TrackHeader::rootSection

The section at the start line, whose first point gives the distance of a lap.

◆ reservedRouteData

u8* TrackHeader::reservedRouteData

Unreconstructed route pointer at offset 0x74.

◆ sections

TrackSection* * TrackHeader::sections

Every section, for a search.

◆ sectionCount

s32 TrackHeader::sectionCount

The number of sections.

◆ fogColor

u8 TrackHeader::fogColor[3]

The colour of the fog of the track, red, green, and blue from 0 to 255.

◆ cameraPoints

Vec3f* TrackHeader::cameraPoints

The points the trackside camera of a replay may stand at.

◆ cameraPointCount

s32 TrackHeader::cameraPointCount

The number of cameraPoints.

◆ nearbyInstances

u16* TrackHeader::nearbyInstances

Lists of placed models near the triangles, each ending in 0.

◆ triangleNearbyInstances

u16* TrackHeader::triangleNearbyInstances

Where in nearbyInstances the list of each triangle starts, by its index.

◆ triangleFlags

u8* TrackHeader::triangleFlags

The flags of each triangle, its surface in the low 3 bits.

◆ gates

TrackGate TrackHeader::gates[TRACK_GATES]

The gates of a lap in order, the first at the lap line.

◆ gateCount

s32 TrackHeader::gateCount

The number of gates.

◆ specials

TrackSpecial TrackHeader::specials[TRACK_SPECIALS]

The objects of the track that move or sound.

◆ specialCount

s32 TrackHeader::specialCount

The number of specials.

◆ unreconstructed228

u8 TrackHeader::unreconstructed228[0x230 - 0x228]

Unreconstructed bytes at offset 0x228.


The documentation for this struct was generated from the following file: