![]() |
Routines |
| Prev: 29183 | Up: Map | Next: 29250 |
|
Used by the routine at DispatchShape.
Opcode 248 names an object. The following shape is drawn only when that object is in the current room. The object id is written over the low address byte (24337) of
LD (*Continuation),A at 24336, so the next unrecognised line zeros CommandBuffer plus that id. Those addresses are the command buffer and the bytes after it, not object state. When the object is absent the operand is set to 0. RoomHasChanged compares PicturedObject, which this routine never writes.
|
||||
| ShapeIfPresent | 29203 | INC IX | Advance the record pointer. | |
| 29205 | LD A,(IX+0) | Fetch the object id. | ||
| 29208 | LD HL,24010 | Point HL at ObjectLocations. | ||
| 29211 | LD C,A | Index by the object number. | ||
| 29212 | LD B,0 | |||
| 29214 | ADD HL,BC | |||
| 29215 | LD A,(23943) | Jump to ShapeIfPresent_Skip if it is not in *CurrentRoom. | ||
| 29218 | CP (HL) | |||
| 29219 | JR NZ,ShapeIfPresent_Skip | |||
| 29221 | LD A,(IX+0) | Patch 24337, the low address byte of LD (*Continuation),A, with the object id. |
||
| 29224 | LD (24337),A | |||
| 29227 | INC IX | Advance the record pointer. | ||
| 29229 | LD A,(IX+0) | Fetch the shape number. | ||
| 29232 | JP PlotShape | Jump to PlotShape. | ||
|
Skip the shape when the object is elsewhere.
|
||||
| ShapeIfPresent_Skip | 29235 | INC IX | Step past the unused operands. | |
| 29237 | INC IX | |||
| 29239 | INC IX | |||
| 29241 | INC IX | |||
| 29243 | XOR A | Clear 24337, the low address byte of LD (*Continuation),A. |
||
| 29244 | LD (24337),A | |||
| 29247 | JP PictureRecord | Jump to PictureRecord. | ||
| Prev: 29183 | Up: Map | Next: 29250 |