Open main menu

SCUMM/Technical Reference/Object resources

< SCUMM‎ | Technical Reference
Revision as of 16:04, 22 July 2005 by Albeu (talk | contribs) (Some info about v6 objects)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

OBIM

  • OBIM
    • IMHD : header
    • IMnn : images
      • SMAP (or BMOP)
      • ZPnn

Note: In IMnn and ZPnn nn represent an hexadecimal number.

IMHD
  obj id       : 16le
  num imnn     : 16le
  num zpnn     : 16le (per IMnn block)
  unknown      : 16
  x            : 16le
  y            : 16le
  width        : 16le
  height       : 16le
  num hotspots : 16le (usually one for each IMnn, but their is one even
                       if no IMnn is present)
  hotspots
    x          : 16le signed
    y          : 16le signed

The hotspots indicate where the actors should stand when they walk to the object.

Each IMnn contain an image for a state. As state 0 display nothing they start at 01. IMnn chunks contain a SMAP or BMOP chunk enventually followed by some ZPnn blocks. See Image resources for more details on these.

OBCD

  • OBCD
    • CDHD : header
    • VERB : script
    • OBNA : name
CDHD
  obj id    : 16le
  x         : 16le
  y         : 16le
  width     : 16le
  height    : 16le
  flags     : 8
  parent    : 8
  unk       : 2*16
  actor dir : 8 (direction the actor will look at when standing in front
                 of the object)

Note that the size and position must match those in the IMHD.

VERB

The VERB chunk hold the scripts. It start with a table giving the offset of the entry point for each verb handled by the object code, followed by the code.

  offset table : vlc
    verb       : 8 (0xFF is default)
    offset     : 16le
  table end    : 8 (must be 0)
  code

The OBNA chunk simply contain a null terminated string.