Skip to navigation


Extra tracks: trackSubConfig

Name: trackSubConfig [Show more] Type: Variable Category: Extra tracks Summary: Configuration data for each section that defines the sub-section numbers, and horizon calculations
Context: See this variable in context in the source code References: This variable is used as follows: * HookSectionFrom uses trackSubConfig

Each section has a trackSubConfig value that contains the following data: * Bits 2 to 7 = the number of the first sub-section in this section * Bit 1 = if this is set, then in the horizon calculations, we skip the check that sets horizonLine to 7 * Bit 0 = if this is set, then the segment vectors for this section are generated as a straight track rather than using the curve tables (this bit is only set for straight sections) In the last one, if bit 0 is set then bit 7 of subSection gets set. This makes us skip the first part of the SetSegmentVector routine, which means we do not update the yaw angle or track height before calculating the segment vector. This means we reuse the segment vector from the end of the previous section for generating this track section. This is only done for straight sections, and the main game code draws straight sections by simply adding the same track segment vector for each segment in the straight, so setting bit 0 of a section's trackSubConfig ensures that it heads off in a straight line in the exact same direction as the tail end of the preceding section.
.trackSubConfig EQUB %00000000 \ Section 0 = 000000 0 0 From 0 check curve EQUB %00001000 \ Section 1 = 000010 0 0 From 2 check curve EQUB %00010000 \ Section 2 = 000100 0 0 From 4 check curve EQUB %00011000 \ Section 3 = 000110 0 0 From 6 check curve EQUB %00100111 \ Section 4 = 001001 1 1 From 9 no check straight EQUB %00100110 \ Section 5 = 001001 1 0 From 9 no check curve EQUB %00110010 \ Section 6 = 001100 1 0 From 12 no check curve EQUB %00111010 \ Section 7 = 001110 1 0 From 14 no check curve EQUB %01001011 \ Section 8 = 010010 1 1 From 18 no check straight EQUB %01001010 \ Section 9 = 010010 1 0 From 18 no check curve EQUB %01001110 \ Section 10 = 010011 1 0 From 19 no check curve EQUB %01011110 \ Section 11 = 010111 1 0 From 23 no check curve EQUB %01100110 \ Section 12 = 011001 1 0 From 25 no check curve EQUB %01110010 \ Section 13 = 011100 1 0 From 28 no check curve EQUB %01110110 \ Section 14 = 011101 1 0 From 29 no check curve EQUB %01111110 \ Section 15 = 011111 1 0 From 31 no check curve EQUB %10000110 \ Section 16 = 100001 1 0 From 33 no check curve EQUB %10001110 \ Section 17 = 100011 1 0 From 35 no check curve EQUB %10010110 \ Section 18 = 100101 1 0 From 37 no check curve EQUB %10100111 \ Section 19 = 101001 1 1 From 41 no check straight EQUB %10100110 \ Section 20 = 101001 1 0 From 41 no check curve EQUB %10101010 \ Section 21 = 101010 1 0 From 42 no check curve EQUB %10101111 \ Section 22 = 101011 1 1 From 43 no check straight EQUB %10101110 \ Section 23 = 101011 1 0 From 43 no check curve EQUB &BC, &C4 \ These bytes appear to be unused EQUB &CE, &DA EQUB &E2, &00