Open main menu

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

Line 96: Line 96:
Each object have the following structure starting from its matching object content offset:
Each object have the following structure starting from its matching object content offset:


==== Object content 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>
Line 113: Line 114:
</table>
</table>


The object name starts at specified offset. Each character is added to the buffer until a 0x00 value is found.
'''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.
 
==== Object content data ====
 
Object content data contains 3 sections optional, in this order:
* 0 or more pairs of verb ids and object script offsets
* The name of the object
* 0 or more object scripts
 
===== Object script offsets =====
 
From byte 15, 2 UInt8 are read 2 by 2.
 
The first one is a reference to the verb ID and the second is an offset to the beginning of the object script.
 
This part ends with a 0x00.
 
===== Object name =====
 
The object name starts at specified offset. Each character is read until a 0x00 value is found.
 
===== Object script =====
 
Each object script ends with 0x00.
34

edits