TSCB: Difference between revisions

Jump to navigation Jump to search
109 bytes removed ,  4 years ago
More in depth exploration of the Extra Information Array structure.
(Clarified the exact meaning of the offsets in the lookup tables.)
(More in depth exploration of the Extra Information Array structure.)
Line 157: Line 157:
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail (lod) for the terrain.
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail (lod) for the terrain.


Entries range from <code>0x30</code> to <code>0x54</code> depending on the size of <code>extra_info_array</code>
Entry size ranges from <code>0x30</code> to <code>0x58</code> depending on the size of <code>extra_info_array</code>
{| class="wikitable"
{| class="wikitable"
!Offset (h)
!Offset (h)
Line 235: Line 235:


Every area includes a [[HGHT|.hght]] and [[MATE|.mate]] file. The <code>extra_info_array</code> indicates if there is an additional [[Water.extm|.water.extm]] and / or [[Grass.extm|.grass.extm]] file
Every area includes a [[HGHT|.hght]] and [[MATE|.mate]] file. The <code>extra_info_array</code> indicates if there is an additional [[Water.extm|.water.extm]] and / or [[Grass.extm|.grass.extm]] file
==== Header ====
{| class="wikitable"
{| class="wikitable"
!Offset (h)
!Offset (h)
Line 241: Line 243:
!Description
!Description
|-
|-
|<code>0x30</code>
|<code>0x00</code>
|4
|4
|Unsigned Int
|Unsigned Int
|extra_info_array length. Number of elements in array.
|extra_info_array length. Number of values (not elements) in array.  
|-
|-
|<code>0x34</code>
|<code>(0x04)</code>
|4
|4
|Unsigned Int
|Unsigned Int
|Unknown. Usually 20 or 3.
|Unknown. Always 20, but only present when extra_info_array length is 8.
|}
 
==== Extra Information Array Value Table ====
After the Header, there is either 1 (extra_info_array length 4) or 2 (extra_info_array length 8) elements of this structure.
{| class="wikitable"
!Offset (h)
!Size
!Data Type
!Description
|-
|-
|<code>0x38</code>
|0x00
|4
|4
|Unsigned Int
|Unsigned Int
|Unknown. Usually 0, 1 or 3.
|Unknown. Always 3.
|-
|-
|<code>0x3c</code>
|0x04
|4
|4
|Unsigned Int
|Unsigned Int
|Unknown. Usually 0 or 1.
|Unknown. 0 or 1.
|-
|-
|<code>0x40</code>
|0x08
|4
|4
|Unsigned Int
|Unsigned Int
|Unknown. Usually 0 or 1.
|Unknown. Always 1.
|-
|-
|<code>0x44</code>
|0x0c
|4
|4
|Unsigned Int
|Unsigned Int
|Unknown. Always 0.
|Unknown. Always 0.
|-
|<code>0x48</code>
|4
|Unsigned Int
|Unknown. Always 3
|-
|<code>0x4c</code>
|4
|Unsigned Int
|Unknown. Usually 0 or 1.
|-
|<code>0x50</code>
|4
|Unsigned Int
|Unknown. Always 1.
|}
|}
  [20, 3, 0, 1, 0, 3, 1, 1] = water, grass
  [3, 0, 1, 0, 3, 1, 1, 0] = grass, water
  [20, 3, 1, 1, 0, 3, 0, 1] = water, grass
  [3, 1, 1, 0, 3, 0, 1, 0] = water, grass
  [ 3, 1, 1, 0]            = water
  [3, 1, 1, 0]            = water
  [ 3, 0, 1, 0]            = grass
  [3, 0, 1, 0]            = grass
It seems that water is <code>[3, 1, 1]</code> and grass is <code>[3, 0, 1]</code>
It seems that water is <code>[3, 1, 1]</code> and grass is <code>[3, 0, 1]</code>
[20, `3, 0, 1`, 0, `3, 1, 1`] = grass, water
[20, `3, 1, 1`, 0, `3, 0, 1`] = water, grass
[`3, 1, 1`, 0]                = water
[`3, 0, 1`, 0]                = grass


== <code>stera</code> File Positions ==
== <code>stera</code> File Positions ==
4

edits

Navigation menu