Difference between revisions of "Highscore file format"
(+category, plus minor copyediting. Thanks for the contribution :))
|Line 89:||Line 89:|
Revision as of 04:11, 13 March 2019
This article describes the file format of the highscore files used by all versions of Stunts. Each track has its own highscore table, stored in a file which shares the name of the track file; only with .HIG extension instead of .TRK .
|Offset||Data Type||Length||Field Name||Description|
|0||CHAR (ASCIIZ)||17||Name||Driver's Name, terminated with a NUL Character|
|17||CHAR (ASCIIZ)||21||Car||Driver's Car, terminated with a NUL Character|
|38||CHAR||4||Unknown||Unknown Data is stored Here|
The 4th field (Opponent) has the following structure:
|Offset||Data Type||Length||Field Name (or constant)||Description|
The size of an entry is 52 bytes. Every highscore file contains exactly 7 Entries = 364 Bytes per File. The 5th field (Time) is expressed in Hundreds of a Second, and is calculated as follows:
TIME = time  * 1280 + time  * 5
To convert this time to normal min:sec:hundredths format, use the following calculations (hundr contains the time in hundreds):
hundreds = (hundr % 100) hundr /= 100 sec = (hundr % 60) min = (hundr / 60)