Open main menu

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

no edit summary
Line 13: Line 13:
<tr><td>0x04</td><td>UInt16LE</td><td>Room width in tiles</td></tr>
<tr><td>0x04</td><td>UInt16LE</td><td>Room width in tiles</td></tr>
<tr><td>0x06</td><td>UInt16LE</td><td>Room height in tiles</td></tr>
<tr><td>0x06</td><td>UInt16LE</td><td>Room height in tiles</td></tr>
<tr><td>0x08</td><td>???</td><td>Unknown (Always 0 in NES)</td></tr>
<tr><td>0x08</td><td>???</td><td>Unknown (Always 0 on NES)</td></tr>
<tr><td>0x0a</td><td>UInt16LE</td><td>Offset to gfx nametable location (NES)</td></tr>
<tr><td>0x0a</td><td>UInt16LE</td><td>Offset to gfx nametable location (NES)</td></tr>
<tr><td>0x0c</td><td>UInt16LE</td><td>Offset to gfx attrtable location (NES)</td></tr>
<tr><td>0x0c</td><td>UInt16LE</td><td>Offset to gfx attrtable location (NES)</td></tr>
Line 21: Line 21:
<tr><td>0x14</td><td>UInt8</td><td>Number of objects in room</td></tr>
<tr><td>0x14</td><td>UInt8</td><td>Number of objects in room</td></tr>
<tr><td>0x15</td><td>UInt8</td><td>Offset to number of boxes location</td></tr>
<tr><td>0x15</td><td>UInt8</td><td>Offset to number of boxes location</td></tr>
<tr><td>0x16</td><td>UInt8</td><td>Number of sounds in room (Always 0 in NES)</td></tr>
<tr><td>0x16</td><td>UInt8</td><td>Number of sounds in room (Always 0 on NES)</td></tr>
<tr><td>0x17</td><td>UInt8</td><td>Number of scripts in room</td></tr>
<tr><td>0x17</td><td>UInt8</td><td>Number of scripts in room</td></tr>
<tr><td>0x18</td><td>UInt16LE</td><td>Offset to exit script location</td></tr>
<tr><td>0x18</td><td>UInt16LE</td><td>Offset to exit script location</td></tr>
Line 39: Line 39:


== Data ==
== Data ==
=== Object images ===
=== Object image offsets ===


From byte 0x1c starts the offsets to object images:
From byte 0x1c starts the offsets to object images:
Line 49: Line 49:
</table>
</table>


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


From there, there is the list of offsets to each object content:
From there, there is the list of offsets to each object content:
Line 81: Line 81:
<tr><td>0x03</td><td>UInt8</td><td>urx</td></tr>
<tr><td>0x03</td><td>UInt8</td><td>urx</td></tr>
<tr><td>0x04</td><td>UInt8</td><td>llx</td></tr>
<tr><td>0x04</td><td>UInt8</td><td>llx</td></tr>
<tr><td>0x05</td><td>UInt8</td><td>llx</td></tr>
<tr><td>0x05</td><td>UInt8</td><td>lrx</td></tr>
<tr><td>0x06</td><td>UInt8</td><td>mask</td></tr>
<tr><td>0x06</td><td>UInt8</td><td>mask</td></tr>
<tr><td>0x07</td><td>UInt8</td><td>flags</td></tr>
<tr><td>0x07</td><td>UInt8</td><td>flags</td></tr>
Line 91: Line 91:


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 ===
Each object have the following structure starting from its matching object content offset:
<table border="2" cellspacing="0" cellpadding="4">
<tr><th>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>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>0x04</td><td>UInt16LE</td><td>The object number id</td></tr>
<tr><td>0x06</td><td>??</td><td>Unknown (Always 0 on NES)</td></tr>
<tr><td>0x07</td><td>UInt8</td><td>X position of object</td></tr>
<tr><td>0x08</td><td>UInt8</td><td>Y position of object + Object parent state</td></tr>
<tr><td>0x09</td><td>UInt8</td><td>Object width in tiles</td></tr>
<tr><td>0x0a</td><td>UInt8</td><td>Object parent</td></tr>
<tr><td>0x0b</td><td>UInt8</td><td>Walk to X position</td></tr>
<tr><td>0x0c</td><td>UInt8</td><td>Walk to Y position</td></tr>
<tr><td>0x0d</td><td>UInt8</td><td>Actor facing direction + Object height in tiles</td></tr>
<tr><td>0x0e</td><td>UInt8</td><td>Offset to object name</td></tr>
</table>
The object name starts at specified offset. Each character is added to the buffer until a 0x00 value is found.
34

edits