Jet Set Willy: Game status buffer entry at 33024

| Game status buffer

33024: Entity buffers

Initialised by the routine at 35090, and used by the routines at 37056 and 37310. There are eight buffers here, each one eight bytes long, used to hold the state of the entities (rope, arrows and guardians) in the current room. For a horizontal guardian, the eight bytes are used as follows:
Byte | Contents
--- | ---
0 | Bit 7: direction (0=left, 1=right)
Bits 5-6: animation frame index
Bits 3-4: unused
Bits 0-2: entity type (001)
1 | Bits 5-7: animation frame index mask
Bit 4: unused
Bit 3: BRIGHT value
Bits 0-2: INK colour
2 | Bits 5-7: base sprite index
Bits 0-4: x-coordinate
3 | Pixel y-coordinate x2 (index into the table at 33280)
4 | Unused
5 | Page containing the sprite graphic data (see 43776)
6 | Minimum x-coordinate
7 | Maximum x-coordinate
For a vertical guardian, the eight bytes are used as follows:
Byte | Contents
--- | ---
0 | Bits 5-7: animation frame index
Bits 3-4: animation frame update flags (see 37247)
Bits 0-2: entity type (010)
1 | Bits 5-7: animation frame index mask
Bit 4: unused
Bit 3: BRIGHT value
Bits 0-2: INK colour
2 | Bits 5-7: base sprite index
Bits 0-4: x-coordinate
3 | Pixel y-coordinate x2 (index into the table at 33280)
4 | Pixel y-coordinate increment
5 | Page containing the sprite graphic data (see 43776)
6 | Minimum y-coordinate
7 | Maximum y-coordinate
For an arrow, the eight bytes are used as follows:
Byte | Contents
--- | ---
0 | Bit 7: direction (0=left, 1=right)
Bits 3-6: unused
Bits 0-2: entity type (100)
1 | Unused
2 | Pixel y-coordinate x2 (index into the table at 33280)
3 | Unused
4 | x-coordinate
5 | Collision detection byte (0=off, 255=on)
6 | Top/bottom pixel row (drawn either side of the shaft)
7 | Unused
The rope uses the second and fourth bytes of the following buffer in addition to its own; these ten bytes are used as follows:
Byte | Contents
--- | ---
0 | Bit 7: direction (0=left, 1=right)
Bits 3-6: unused
Bits 0-2: entity type (011)
1 | Animation frame index
2 | x-coordinate of the top of the rope
3 | x-coordinate of the segment of rope being drawn
4 | Length (32)
5 | Segment drawing byte
6 | Unused
7 | Animation frame at which the rope changes direction (54)
9 | Index of the segment of rope being drawn (0-32)
11 | Bits 1-7: unused
Bit 0: Willy is on the rope (set), or not (reset)
Note that if a rope were the eighth entity specified in a room, its buffer would use the first and third bytes in the otherwise unused area at 33089.
33024 | DEFS 8 | Entity 1
33032 | DEFS 8 | Entity 2
33040 | DEFS 8 | Entity 3
33048 | DEFS 8 | Entity 4
33056 | DEFS 8 | Entity 5
33064 | DEFS 8 | Entity 6
33072 | DEFS 8 | Entity 7
33080 | DEFS 8 | Entity 8
33088 | DEFB 255 | Terminator