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

Jump to navigation Jump to search
Add info on SCUMM v4 object code blocks
(Add notes on V5 objects (not sure IMHD is correct))
(Add info on SCUMM v4 object code blocks)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=== V6 Objects ===
=== V6 Objects ===


In v6 objects are splited in 2 chunks: OBIM and OBCD. OBIM store the images, zplanes, etc and OBCD mostly store the scripts.
In v6 objects are split in 2 chunks: OBIM and OBCD. OBIM store the images, zplanes, etc, while OBCD mostly store the scripts.


==== OBIM ====
==== OBIM ====
Line 111: Line 111:


x, y, width, and height are bytes. Their values should be multiplied by 8 (the size of an image strip).
x, y, width, and height are bytes. Their values should be multiplied by 8 (the size of an image strip).
=== V4 Objects ===
In v4 objects are split in 2 chunks: OI and OC. OC does not have any sub-blocks like v5 or v6 objects; it contains all header information and the SCUMM script.
===== OC =====
<pre>
  obj id            : 16le
  unknown          : 8
  x                : 8
  y, parent state  : 8 (parent state is AND 0x80, y is AND 0x7F)
  width            : 8
  parent            : 8
  walk_x            : 16le signed(?)
  walk_y            : 16le signed(?)
  height, actor dir : 8 (height is AND 0xF8, actor dir is AND 0x07)
  name offset      : 8 (point to location of object name, from start of OC block)
  verb table        : variable
  object name      : variable, null-terminated string
  SCUMM script      : variable
</pre>
The verb table is made up of multiple entries, each looks like this:
<pre>
  verb ID          : 8
  offset            : 16le (from start of script?)
</pre>
The number of entries will vary depending on the interactions defined for the object.
125

edits

Navigation menu