AI Sections
The AI sections resource encompasses the routes the AI takes along with details on each section such as speed and shortcut information.
Structures
BrnAI::AISectionsData
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | AISection* | mpaSections | ||
0x4 | 0x4 | SectionResetPair* | mpaSectionResetPairs | ||
0x8 | 0x14 | float32_t[5] | mafSectionMinSpeeds | ||
0x1C | 0x14 | float32_t[5] | mafSectionMaxSpeeds | ||
0x30 | 0x4 | uint32_t | muNumSections | ||
0x34 | 0x4 | uint32_t | muNumSectionResetPairs | ||
0x38 | 0x4 | uint32_t | muVersion | 12 | |
0x3C | 0x4 | uint32_t | muSizeInBytes |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | AISection* | mpaSections | ||
0x8 | 0x8 | SectionResetPair* | mpaSectionResetPairs | ||
0x10 | 0x14 | float32_t[5] | mafSectionMinSpeeds | ||
0x24 | 0x14 | float32_t[5] | mafSectionMaxSpeeds | ||
0x38 | 0x4 | uint32_t | muNumSections | ||
0x3C | 0x4 | uint32_t | muNumSectionResetPairs | ||
0x40 | 0x4 | uint32_t | muVersion | 12 | |
0x44 | 0x4 | uint32_t | muSizeInBytes |
BrnAI::AISection
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | Portal* | mpaPortals | ||
0x4 | 0x4 | BoundaryLine* | mpaNoGoLines | ||
0x8 | 0x4 | Vector2* | mpaCorners | ||
0xC | 0x4 | AISectionId | mId | Section GameDB ID | |
0x10 | 0x2 | SpanIndex | miSpanIndex | ||
0x12 | 0x2 | uint16_t | muNumNoGoLines | ||
0x14 | 0x1 | uint8_t | mu8NumPortals | ||
0x15 | 0x1 | uint8_t | muSpeed | SectionSpeed | See SectionSpeed |
0x16 | 0x1 | uint8_t | mu8eDistrict | District | Always null |
0x17 | 0x1 | uint8_t | mx8Flags | Flags | See flags |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | Portal* | mpaPortals | ||
0x8 | 0x8 | BoundaryLine* | mpaNoGoLines | ||
0x10 | 0x8 | Vector2* | mpaCorners | ||
0x18 | 0x4 | AISectionId | mId | Section GameDB ID | |
0x1C | 0x2 | SpanIndex | miSpanIndex | ||
0x1E | 0x2 | uint16_t | muNumNoGoLines | ||
0x20 | 0x1 | uint8_t | mu8NumPortals | ||
0x21 | 0x1 | uint8_t | muSpeed | SectionSpeed | See SectionSpeed |
0x22 | 0x1 | uint8_t | mu8eDistrict | District | Always null |
0x23 | 0x1 | uint8_t | mx8Flags | Flags | See flags |
0x24 | 0x4 | padding |
BrnAI::Portal
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | float32_t | mPositionX | ||
0x4 | 0x4 | float32_t | mPositionY | ||
0x8 | 0x4 | float32_t | mPositionZ | ||
0xC | 0x4 | BoundaryLine* | mpaBoundaryLines | ||
0x10 | 0x2 | uint16_t | mu16LinkSection | Section index | |
0x12 | 0x1 | uint8_t | mu8NumBoundaryLines | ||
0x13 | 0x1 | uint8_t[1] | mau8Pad | padding |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | float32_t | mPositionX | ||
0x4 | 0x4 | float32_t | mPositionY | ||
0x8 | 0x4 | float32_t | mPositionZ | ||
0xC | 0x4 | padding | |||
0x10 | 0x8 | BoundaryLine* | mpaBoundaryLines | ||
0x18 | 0x2 | uint16_t | mu16LinkSection | Section index | |
0x1A | 0x1 | uint8_t | mu8NumBoundaryLines | ||
0x1B | 0x1 | uint8_t[1] | mau8Pad | padding | |
0x1C | 0x4 | padding |
BrnAI::BoundaryLine
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Vector4 | mVerts |
BrnAI::SectionResetPair
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | meResetSpeed | See EResetSpeedType | |
0x4 | 0x2 | uint16_t | muStartSectionIndex | ||
0x6 | 0x2 | uint16_t | muResetSectionIndex |
Typedefs
BrnAI::AISection::AISectionId
Name | Type | Length | Comments |
---|---|---|---|
AISectionId | uint32_t | 0x4 |
BrnStreetData::Road::SpanIndex
Name | Type | Length | Comments |
---|---|---|---|
SpanIndex | int16_t | 0x4 |
Enumerations
BrnAI::SectionSpeed
Name | Value | Comments |
---|---|---|
E_SECTION_SPEED_VERY_SLOW | 0 | |
E_SECTION_SPEED_SLOW | 1 | |
E_SECTION_SPEED_NORMAL | 2 | |
E_SECTION_SPEED_FAST | 3 | |
E_SECTION_SPEED_VERY_FAST | 4 | |
E_SECTION_SPEED_COUNT | 5 |
AISection flags
Name | Value | Comments |
---|---|---|
IsShortcut | 0x1 | |
IsNoReset | 0x2 | No reset on track point |
IsInAir | 0x4 | Typically right before jumps |
IsTerminator | 0x8 | Indicates walls etc. May not be end of the road |
IsJunction | 0x10 | Likely required for events |
IsSplit | 0x20 | Road split, like at Moore/E. Crawford |
IsAIShortcut | 0x40 | |
IsInterstateExit | 0x80 |
BrnAI::EResetSpeedType
Name | Value | Comments |
---|---|---|
E_RESET_SPEED_TYPE_CUSTOM | 0 | |
E_RESET_SPEED_TYPE_NONE | 1 | |
E_RESET_SPEED_TYPE_SLOW | 2 | |
E_RESET_SPEED_TYPE_FAST | 3 | |
E_RESET_SPEED_TYPE_SLOW_NORTH_FACE | 4 | |
E_RESET_SPEED_TYPE_SLOW_SOUTH_FACE | 5 | |
E_RESET_SPEED_TYPE_SLOW_EAST_FACE | 6 | |
E_RESET_SPEED_TYPE_SLOW_WEST_FACE | 7 | |
E_RESET_SPEED_TYPE_SLOW_REVERSE | 8 | |
E_RESET_SPEED_TYPE_STOP_REVERSE | 9 | |
E_RESET_SPEED_TYPE_STOP_NORTH_FACE | 10 | |
E_RESET_SPEED_TYPE_STOP_SOUTH_FACE | 11 | |
E_RESET_SPEED_TYPE_STOP_EAST_FACE | 12 | |
E_RESET_SPEED_TYPE_STOP_WEST_FACE | 13 | |
E_RESET_SPEED_TYPE_STOP_NORTH_EAST_FACE | 14 | |
E_RESET_SPEED_TYPE_STOP_SOUTH_WEST_FACE | 15 | |
E_RESET_SPEED_TYPE_NONE_AND_IGNORE | 16 | |
E_RESET_SPEED_TYPE_WEST_AND_IGNORE | 17 | |
E_RESET_SPEED_TYPE_REVERSE_AND_IGNORE | 18 | |
E_RESET_SPEED_TYPE_REVERSE_AND_IGNORE_SLOW | 19 | |
E_RESET_SPEED_TYPE_COUNT | 20 |