Difference between revisions of "SCUMM/Technical Reference/Box resources"
(Started a page on SCUMM box resources) |
(No difference)
|
Revision as of 12:47, 29 April 2007
Introduction
TODO: Describe what boxes are and how they are used; describe what a box matrix is, etc.
box matrix is stored as rtMatrix resource #1
box data is stored as rtMatrix resource #2
SCUMM V4
BX
The BX resource contains a single byte indicating the number of boxes in the room. Then for each box a record of the following format follows (all data little endian):
ulx : (2 bytes) uly : (2 bytes) urx : (2 bytes) ury : (2 bytes) lrx : (2 bytes) lry : (2 bytes) llx : (2 bytes) lly : (2 bytes) mask : (1 byte) flags : (1 byte) scale : (2 bytes)
The mask indicates which Z plane should mask this box. The flags are used for certain parameters:
- 0x08 : X flip
- 0x10 : Y flip
- 0x20 : Ignore scale / Player only
- 0x40 : Locked
- 0x80 : Invisible
"scale" indicates the scaling to be used for actors in the box. If the highest bit is set, it defines a scale slot instead.
After the box data blocks the box matrix data follows, in the same format as used by V3 games.
SCUMM V5-V7
BOXD
The BOXD resource contains the box data. First come two bytes (little endian) indicating the number of boxes. Then follow box data records, using the same format as the V4 format described above.
BOXM
The box matrix data is separated in its own resource starting with V5, but the format is once more the same:
line : the matrix has one line for each box, terminated by 0xFF. box : list of the directly connected boxes start : 8 end : 8 box : 8 0xFF : 8