AI Sections/Development: Difference between revisions

From Burnout Wiki
Content added Content deleted
(read this wrong, it's just heavily stacked at the beginning)
m (→‎Version 4, Version 6: correct length)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Versions ==
= Versions =
* Version 4: Used in [[Burnout 5 (2006-11-13 build)]].

* Version 6: Used in [[Burnout 5 (2007-02-22 build)]].
=== Version 4 ===

Used in [[Burnout 5 (2006-11-10 build)]] and [[Burnout 5 (2007-02-22 build)]]. There are slight differences between the two builds, despite sharing the same version.

== Structures ==


= Structures =
=== BrnAI::AISectionsData ===
=== BrnAI::AISectionsData ===
==== Version 4 ====
==== Version 4, Version 6 ====
===== 32-bit =====
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || [[#BrnAI::AISection | AISection]]* || mpaSections || ||
| 0x0 || 0x4 || [[#BrnAI::AISection|AISection]]* || mpaSections || ||
|-
|-
| 0x4 || 0x4 || uint32_t || muNumSections || ||
| 0x4 || 0x4 || uint32_t || muNumSections || ||
|-
|-
| 0x8 || 0x4 || uint32_t || muVersion || || 4
| 0x8 || 0x4 || uint32_t || muVersion || ||
|-
|-
| 0xC || 0x4 || uint32_t || muSizeInBytes || ||
| 0xC || 0x4 || uint32_t || muSizeInBytes || ||
Line 23: Line 19:


=== BrnAI::AISection ===
=== BrnAI::AISection ===
==== Version 4 (2006-11-10) ====
==== Version 4 ====
===== 32-bit =====
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || [[#BrnAI::Portal | Portal]]* || mpaPortals || ||
| 0x0 || 0x4 || [[#BrnAI::Portal|Portal]]* || mpaPortals || ||
|-
|-
| 0x4 || 0x4 || [[../#BrnAI::BoundaryLine | BoundaryLine]]* || mpaNoGoLines || ||
| 0x4 || 0x4 || [[../#BrnAI::BoundaryLine|BoundaryLine]]* || mpaNoGoLines || ||
|-
|-
| 0x8 || 0x20 || [[Vector2]][4] || ? || Corners ||
| 0x8 || 0x10 || float32_t[4] || mafCornersX || Corners X ||
|-
| 0x18 || 0x10 || float32_t[4] || mafCornersZ || Corners Z ||
|-
|-
| 0x28 || 0x2 || uint16_t || muNumNoGoLines || ||
| 0x28 || 0x2 || uint16_t || muNumNoGoLines || ||
Line 38: Line 35:
| 0x2A || 0x1 || uint8_t || mu8NumPortals || ||
| 0x2A || 0x1 || uint8_t || mu8NumPortals || ||
|-
|-
| 0x2B || 0x1 || uint8_t || muDangerRating || || See [[#Danger rating|Danger rating]]
| 0x2B || 0x1 || uint8_t || muDangerRating || || See [[#BrnAI::AISection::DangerRating|danger rating]]
|-
|-
| 0x2C || 0x1 || uint8_t || mu8eDistrict? || District? || Always null
| 0x2C || 0x1 || uint8_t || mx8Flags || Flags || See [[#AISection flags|flags]]
|-
|-
| 0x2D || 0x1 || uint8_t || mx8Flags || Flags || Note that these flags may be a little different to version 12.
| 0x2D || 0x3 || uint8_t[3] || mu8Pad || Padding ||
|-
| 0x2E || 0x2 || || || Probably padding ||
|}
|}


==== Version 4 (2007-02-22) ====
==== Version 6 ====
===== 32-bit =====
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || [[#BrnAI::Portal | Portal]]* || mpaPortals || ||
| 0x0 || 0x4 || [[#BrnAI::Portal|Portal]]* || mpaPortals || ||
|-
|-
| 0x4 || 0x4 || [[../#BrnAI::BoundaryLine | BoundaryLine]]* || mpaNoGoLines || ||
| 0x4 || 0x4 || [[../#BrnAI::BoundaryLine|BoundaryLine]]* || mpaNoGoLines || ||
|-
|-
| 0x8 || 0x20 || [[Vector2]][4] || ? || Corners ||
| 0x8 || 0x10 || float32_t[4] || mafCornersX || Corners X ||
|-
|-
| 0x18 || 0x10 || float32_t[4] || mafCornersZ || Corners Z ||
| 0x28 || 0x4 || [[Street Data/Development#BrnStreetData::Road::SpanIndex | SpanIndex]] || miSpanIndex || ||
|-
| 0x28 || 0x4 || [[Street Data/Development#BrnStreetData::Road::SpanIndex|SpanIndex]] || miSpanIndex || ||
|-
|-
| 0x2C || 0x2 || uint16_t || muNumNoGoLines || ||
| 0x2C || 0x2 || uint16_t || muNumNoGoLines || ||
Line 64: Line 60:
| 0x2E || 0x1 || uint8_t || mu8NumPortals || ||
| 0x2E || 0x1 || uint8_t || mu8NumPortals || ||
|-
|-
| 0x2F || 0x1 || uint8_t || muDangerRating || || See [[#Danger rating|Danger rating]]
| 0x2F || 0x1 || uint8_t || muDangerRating || || See [[#BrnAI::AISection::DangerRating|danger rating]]
|-
|-
| 0x30 || 0x1 || uint8_t || mu8eDistrict? || District? || Always null
| 0x30 || 0x1 || uint8_t || mu8eDistrict || District || Always 0. See [[#BrnAI::EDistrict|districts]]
|-
|-
| 0x31 || 0x1 || uint8_t || mx8Flags || Flags || Note that these flags may be a little different to version 12.
| 0x31 || 0x1 || uint8_t || mx8Flags || Flags || See [[#AISection flags|flags]]
|-
|-
| 0x32 || 0x2 || || || Probably padding ||
| 0x32 || 0x2 || uint8_t[2] || mu8Pad || Padding ||
|}
|}


=== BrnAI::Portal ===
=== BrnAI::Portal ===
==== Version 4 ====
==== Version 4, Version 6 ====
===== 32-bit =====
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || float32_t || mPositionX || ||
| 0x0 || 0x10 || [[Vector3|vpu::Vector3]] || mMidPosition || ||
|-
|-
| 0x4 || 0x4 || float32_t || mPositionY || ||
| 0x10 || 0x4 || [[../#BrnAI::BoundaryLine|BoundaryLine]]* || mpaBoundaryLines || ||
|-
| 0x8 || 0x4 || float32_t || mPositionZ || ||
|-
| 0xC || 0x4 || ? || ? || ? ||
|-
| 0x10 || 0x4 || [[../#BrnAI::BoundaryLine | BoundaryLine]]* || mpaBoundaryLines || ||
|-
|-
| 0x14 || 0x2 || uint16_t || mu16LinkSection || Section index ||
| 0x14 || 0x2 || uint16_t || mu16LinkSection || Section index ||
Line 93: Line 82:
| 0x16 || 0x1 || uint8_t || mu8NumBoundaryLines || ||
| 0x16 || 0x1 || uint8_t || mu8NumBoundaryLines || ||
|-
|-
| 0x17 || 0x9 || ? || ? || ? || Always null?
| 0x17 || 0x5 || uint8_t[5] || mau8Pad || Padding ||
|-
| 0x1C || 0x4 || || || Padding ||
|}
|}


== Enumerations ==
== Enumerations ==
=== Danger rating ===
=== BrnAI::AISection::DangerRating ===
==== Version 4, Version 6 ====
{| class="wikitable"
{| class="wikitable"
|-
! Name !! Value !! Comments
! Name !! Value !! Comments
|-
|-
| ? || 0 ||
| E_DANGER_RATING_FREEWAY || 0 ||
|-
|-
| ? || 1 ||
| E_DANGER_RATING_NORMAL || 1 ||
|-
|-
| ? || 2 ||
| E_DANGER_RATING_DANGEROUS || 2 ||
|-
|-
| E_DANGER_RATING_COUNT || 3 ||
| E_DANGER_RATING_COUNT || 3 ||
|}

=== BrnAI::EDistrict ===
==== Version 6 ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_DISTRICT_SUBURBS || 0 ||
|-
| E_DISTRICT_INDUSTRIAL || 1 ||
|-
| E_DISTRICT_COUNTRY || 2 ||
|-
| E_DISTRICT_CITY || 3 ||
|-
| E_DISTRICT_AIRPORT || 4 ||
|-
| E_DISTRICT_COUNT || 5 ||
|}

=== AISection flags ===
Separate uint8_t constants.

==== Version 4 ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| KX_SECTION_FLAGS_NONE || 0x0 ||
|-
| ? || 0x1 || In air or something else?
|}

==== Version 6 ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| KX_SECTION_FLAGS_NONE || 0x0 ||
|-
| KX_SECTION_FLAGS_IS_IN_AIR || 0x1 ||
|-
| KX_SECTION_FLAGS_IS_SHORTCUT || 0x2 ||
|-
| KX_SECTION_FLAGS_IS_JUNCTION || 0x4 ||
|}
|}

Latest revision as of 23:29, 23 March 2024

Versions

Structures

BrnAI::AISectionsData

Version 4, Version 6

Offset Length Type Name Description Comments
0x0 0x4 AISection* mpaSections
0x4 0x4 uint32_t muNumSections
0x8 0x4 uint32_t muVersion
0xC 0x4 uint32_t muSizeInBytes

BrnAI::AISection

Version 4

Offset Length Type Name Description Comments
0x0 0x4 Portal* mpaPortals
0x4 0x4 BoundaryLine* mpaNoGoLines
0x8 0x10 float32_t[4] mafCornersX Corners X
0x18 0x10 float32_t[4] mafCornersZ Corners Z
0x28 0x2 uint16_t muNumNoGoLines
0x2A 0x1 uint8_t mu8NumPortals
0x2B 0x1 uint8_t muDangerRating See danger rating
0x2C 0x1 uint8_t mx8Flags Flags See flags
0x2D 0x3 uint8_t[3] mu8Pad Padding

Version 6

Offset Length Type Name Description Comments
0x0 0x4 Portal* mpaPortals
0x4 0x4 BoundaryLine* mpaNoGoLines
0x8 0x10 float32_t[4] mafCornersX Corners X
0x18 0x10 float32_t[4] mafCornersZ Corners Z
0x28 0x4 SpanIndex miSpanIndex
0x2C 0x2 uint16_t muNumNoGoLines
0x2E 0x1 uint8_t mu8NumPortals
0x2F 0x1 uint8_t muDangerRating See danger rating
0x30 0x1 uint8_t mu8eDistrict District Always 0. See districts
0x31 0x1 uint8_t mx8Flags Flags See flags
0x32 0x2 uint8_t[2] mu8Pad Padding

BrnAI::Portal

Version 4, Version 6

Offset Length Type Name Description Comments
0x0 0x10 vpu::Vector3 mMidPosition
0x10 0x4 BoundaryLine* mpaBoundaryLines
0x14 0x2 uint16_t mu16LinkSection Section index
0x16 0x1 uint8_t mu8NumBoundaryLines
0x17 0x5 uint8_t[5] mau8Pad Padding
0x1C 0x4 Padding

Enumerations

BrnAI::AISection::DangerRating

Version 4, Version 6

Name Value Comments
E_DANGER_RATING_FREEWAY 0
E_DANGER_RATING_NORMAL 1
E_DANGER_RATING_DANGEROUS 2
E_DANGER_RATING_COUNT 3

BrnAI::EDistrict

Version 6

Name Value Comments
E_DISTRICT_SUBURBS 0
E_DISTRICT_INDUSTRIAL 1
E_DISTRICT_COUNTRY 2
E_DISTRICT_CITY 3
E_DISTRICT_AIRPORT 4
E_DISTRICT_COUNT 5

AISection flags

Separate uint8_t constants.

Version 4

Name Value Comments
KX_SECTION_FLAGS_NONE 0x0
? 0x1 In air or something else?

Version 6

Name Value Comments
KX_SECTION_FLAGS_NONE 0x0
KX_SECTION_FLAGS_IS_IN_AIR 0x1
KX_SECTION_FLAGS_IS_SHORTCUT 0x2
KX_SECTION_FLAGS_IS_JUNCTION 0x4