World Painter 2D: Difference between revisions

From Burnout Wiki
Content added Content deleted
(Created page.)
 
No edit summary
Line 4: Line 4:


= Structures =
= Structures =
'''Note: Waves begin with a [[Binary File]] resource.'''
'''Note: World painter 2D resources begin with a [[Binary File]] resource.'''


There is not a structure directly associated with World Painter 2D. It is treated like a regular binary resource and the data of that resource is instead parsed as a part of the CgsWorld::WorldMap2D construction.
=== Header ===
There does not appear to be a structure associated with World Painter 2D in available debugging symbols, but it does contain data that may be parsed as a header.


=== Header ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x2 || uint16_t || ? || Width of the image in pixels ||
| 0x0 || 0x2 || uint16_t || muWidth || Width of the image in pixels ||
|-
|-
| 0x2 || 0x2 || uint16_t || ? || Height of the image in pixels ||
| 0x2 || 0x2 || uint16_t || muHeight || Height of the image in pixels ||
|}
|}

These values are used in combination with the real world origin and size for scaling. The world origin and size is stored in the game's executable.


=== Data ===
=== Data ===
The header is immediately followed by data in the form of a grid of district indices. The width and height of this grid is determined by the header. All known resources are 384x256.
The header is immediately followed by data in the form of a grid of single-byte district indices. The width and height of this grid is determined by the header. All known resources are 384x256.

These values correspond to [[Paradise City/Districts|BrnWorld::EDistrict]], except the invalid district is denoted as 0xFF (255) instead.

Revision as of 22:45, 10 January 2023

The Districts World Painter 2D resource interpreted as an image.

World painter 2D resources are large arrays of district indices representing certain aspects of the game. This includes districts themselves and ambiences.

Structures

Note: World painter 2D resources begin with a Binary File resource.

There is not a structure directly associated with World Painter 2D. It is treated like a regular binary resource and the data of that resource is instead parsed as a part of the CgsWorld::WorldMap2D construction.

Header

Offset Length Type Name Description Comments
0x0 0x2 uint16_t muWidth Width of the image in pixels
0x2 0x2 uint16_t muHeight Height of the image in pixels

These values are used in combination with the real world origin and size for scaling. The world origin and size is stored in the game's executable.

Data

The header is immediately followed by data in the form of a grid of single-byte district indices. The width and height of this grid is determined by the header. All known resources are 384x256.

These values correspond to BrnWorld::EDistrict, except the invalid district is denoted as 0xFF (255) instead.