Difference between revisions of "Grand Prix Legends File Specs"
From Grand Prix Legends Wiki
Bernd Nowak (Talk | contribs) |
Bernd Nowak (Talk | contribs) |
||
Line 57: | Line 57: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<table> | <table> | ||
<tr><td><b>And now for the files:</b></td></tr> | <tr><td><b>And now for the files:</b></td></tr> |
Revision as of 12:18, 15 April 2009
Menu
Home |
Grand Prix Legends File Formats
The following pages give the file specifications for the various files
that make up a track in GPL. Not everything is known yet, and any
help filling in the gaps will be much appreciated.
To start with, some notes:
-
The numbers are either 32 bit unsigned integers, or 32bit floating point numbers. If dissecting by hand, bear in mind that they are
stored least significant byte first: 1's, 256's, 65536's, 16777216's. This makes the hex sequence 01 01 00 00 into the
number 257 (decimal). In C/C++, to read e.g. a float, do: float x; fread(&x, sizeof(float), 1, fileptr); -
Most (all?) of the files & sections within files are of lengths which
are a multiple of 4. An example is the String section of a 3DO file
where the data is of any length, then padded with 0x20's to an even 4. - Every file within a DAT file starts with a header section, which is as follows. The DAT file header is different.
Bytes | Values | Notes |
---|---|---|
0-3 | 4 characters | Gives the type of the section, e.g. "4OD3" (reverse to 3DO4) or "SZYX", etc. |
4-7 | number | Seems to be fairly unimportant - usually 1 or 0. Can be regarded as sub-type. |
8-11 | data size | Size in bytes of the following data. |
12- | data... | data. |
And now for the files: | |
DAT files: Wrapper | These are a wrapper for the hundreds of files that make up a track (or any other resource in the game) |
3DO files: 3D objects | Defines the 3D objects, e.g. cars, track, trackside objects... |
MIP files: "Multum in parvo" (thanks Oliver) | Store textures in several resolutions |
SRB files: Single/Scaled Resolution Bitmap? | Also textures, but in a scaled format? Contains within a Mip file. |
PBF files: Pictures | Pictures for the non-game aspects, e.g. track posters. |
TRK files: Track layout (by Nigel Pattinson) | Stores the information required to drive the track, not see it. |
TRK Tutorial | Also, a tutorial |
LP files: AI driving lines | So the AI cars can drive perfect laps, overtake, etc. |
CAM files: Cameras | Camera locations for TV1, TV2 & Pitlane. |
CCAM files: Car Cameras | Car camera files |
SETUP files: Car setups | Detailed setups, as changed from the car setup screen. |
WAV files: Wave files (non GPL specific) | Sounds, believe it or not... |
controls.cfg: Controller config | Contains the controller setup info. (1 per player) |