Open main menu

Difference between revisions of "SCUMM/Technical Reference/Room resources"

no edit summary
Line 33: Line 33:
* Offset to box number location is stored as an UInt8, thus must be within the first 255 bytes of the chunk
* Offset to box number location is stored as an UInt8, thus must be within the first 255 bytes of the chunk
* The header takes 28 bytes
* The header takes 28 bytes
* The combined size of object image and object content offsets is 4 bytes per object
* The combined size of object image and object code offsets is 4 bytes per object


The total number of objects per room must be less than 57:
The total number of objects per room must be less than 57:
Line 49: Line 49:
</table>
</table>


=== Object content offsets ===
=== Object code offsets ===


From there, there is the list of offsets to each object content:
From there, there is the list of offsets to each object code:
<table border="2" cellspacing="0" cellpadding="4">
<table border="2" cellspacing="0" cellpadding="4">
<tr><th>Location</th><th>Format</th><th>Data</th></tr>
<tr><th>Location</th><th>Format</th><th>Data</th></tr>
Line 68: Line 68:
</table>
</table>


'''Note:''' Some LFL files have unknown data between the last object content offset and the boxes number offset location. For most file however, both data are contiguous.
'''Note:''' Some LFL files have unknown data between the last object code offset and the boxes number offset location. For most file however, both data are contiguous.


=== Boxes ===
=== Boxes ===
Line 92: Line 92:
There are <code>boxNum * boxNum</code> number of them read as UInt8.
There are <code>boxNum * boxNum</code> number of them read as UInt8.


=== Object content ===
=== Object code ===


Each object have the following structure starting from its matching object content offset:
The object code section has the following structure starting from its corresponding object code offset:


==== Object content header ====
==== Object code header ====
<table border="2" cellspacing="0" cellpadding="4">
<table border="2" cellspacing="0" cellpadding="4">
<tr><th>Relative location</th><th>Format</th><th>Data</th></tr>
<tr><th>Relative location</th><th>Format</th><th>Data</th></tr>
<tr><td>0x00</td><td>UInt8</td><td>Size of the object content chunk</td></tr>
<tr><td>0x00</td><td>UInt8</td><td>Size of the object code chunk</td></tr>
<tr><td>0x02</td><td>???</td><td>Unknown (Always 0 on NES)</td></tr>
<tr><td>0x02</td><td>???</td><td>Unknown (Always 0 on NES)</td></tr>
<tr><td>0x03</td><td>???</td><td>Unknown (Always 0 on NES)</td></tr>
<tr><td>0x03</td><td>???</td><td>Unknown (Always 0 on NES)</td></tr>
Line 114: Line 114:
</table>
</table>


'''Note:''' The object content data starts at byte 15, the verb-script pairs part ends with a 0x00 byte. This means that the object name offset value is always an even number between 16 and 254.
'''Note:''' The object code data starts at byte 15, the verb-script pairs part ends with a 0x00 byte. This means that the object name offset value is always an even number between 16 and 254.


==== Object content data ====
==== Object code data ====


Object content data contains 3 sections optional, in this order:
Object code data contains 3 sections optional, in this order:
* 0 or more pairs of verb ids and object script offsets
* 0 or more pairs of verb ids and object script offsets
* The name of the object
* The name of the object
35

edits