Colour Cube: Difference between revisions

m
Changed ^3 to ³ to avoid confusion with bitwise XOR.
mNo edit summary
m (Changed ^3 to ³ to avoid confusion with bitwise XOR.)
 
(4 intermediate revisions by 2 users not shown)
Line 1:
{{ParadiseResourceTypeInfobox
ColourCube resources are used by both the [[EnvironmentSettings]] and [[PostFX]] to change the colour and tone of the world.
| name = ColourCube
| othernames = RwColourCube
| example = [[File:Paradise_ColourCubes.png|thumbframeless|200px|]]<br />ColourCubes used in Burnout Paradise.]]
| id = 0x2B
| category = Generic
| memdist = Main Memory only
| importedby = [[Environment Keyframe]]
}}
 
ColourCube resources are used by both the [[EnvironmentSettings]] and [[PostFX]] to change the colour and tone of the world.
[[File:Paradise_ColourCubes.png|thumb|200px|ColourCubes used in Burnout Paradise.]]
 
A ColourCube is a set of textures forming a [https://en.wikipedia.org/wiki/Palette_(computing) CLUT], which is usually colour corrected to give a different art style to the game at a given time (i.e.g., the red filter when wrecking a vehicle in versions 1.0-1.3 of ''Burnout Paradise'').
 
Some time after the [[Burnout 5 (2007-02-22 build)|February 22, 2007]] build of ''Paradise'', ColourCubes were added to the EnvironmentSettings folder and were used specifically to give the game a unique art style.
Line 13 ⟶ 21:
==== 32-bit ====
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || m_size || The number of textures and their width/height. || Used to calculate file size (m_size^<sup><small>3</small></sup> * 3 + 16)
|-
| 0x4 || 0x4 || uint8_t* || m_pixels || Pointer to the texture data. ||
Line 23 ⟶ 30:
==== 64-bit ====
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || m_size || The number of textures and their width/height. || Used to calculate file size (m_size^<sup><small>3</small></sup> * 3 + 16)
|-
| 0x4 || 0x4 || || paddingPadding || ||
|-
| 0x8 || 0x8 || uint8_t* || m_pixels || Pointer to the texture data. ||
Line 42 ⟶ 48:
 
{| class="wikitable"
|-
! x !! y !! z !! offset (m_size = 16)
|- style="vertical-align:top;"
| <syntaxhighlightpre>xxxx
3210</syntaxhighlightpre> || <syntaxhighlightpre>yyyy
3210</syntaxhighlightpre> || <syntaxhighlightpre>zzzz
3210</syntaxhighlightpre> || <syntaxhighlightpre>o0=x0
o1=x1
o2=y0
Line 59 ⟶ 64:
o9=z1
o10=z2
o11=z3</syntaxhighlightpre>
|}
 
{| class="wikitable"
|-
! x !! y !! z !! offset (m_size = 32)
|- style="vertical-align:top;"
| <syntaxhighlightpre>xxxxx
43210</syntaxhighlightpre> || <syntaxhighlightpre>yyyyy
43210</syntaxhighlightpre> || <syntaxhighlightpre>zzzzz
43210</syntaxhighlightpre> || <syntaxhighlightpre>o0=x0
o1=x1
o2=y0
Line 83 ⟶ 87:
o12=z2
o13=z3
o14=z4</syntaxhighlightpre>
|}