![]() |
Routines |
| Prev: 60184 | Up: Map | Next: 60274 |
|
Handler for the object types 121 to 126: the two pictures, the bookshelf, the hanging bowl, the bowl of flowers and the torch (see Sprite_Picture_1). They are coloured by copying the attributes from the colour data (see Colour_Data) rather than from the single attribute of the record, so that they are not drawn in one colour only. The other decorations are handled by Handle_Plain_Decoration.
A decoration is removed (see Handle_Collectable_Remove) when Sabreman is not in its room. The first time that it is handled Set_Decoration_Size gives it the size of its obstacle and it is drawn. It is then coloured every time that it is handled, by Handle_Stalactite_Colour_Copy.
|
||||||||
| Handle_Coloured_Decoration | 60217 | LD A,(36636) | Fetch the room x of Sabreman. | |||||
| 60220 | CP (IX+2) | Jump to Handle_Collectable_Remove to remove the decoration if it is in a different room x. | ||||||
| 60223 | JP NZ,Handle_Collectable_Remove | |||||||
| 60226 | LD A,(36638) | Fetch the room y of Sabreman. | ||||||
| 60229 | CP (IX+4) | Jump to Handle_Collectable_Remove to remove the decoration if it is in a different room y. | ||||||
| 60232 | JP NZ,Handle_Collectable_Remove | |||||||
| 60235 | CALL PrepDraw2 | Prepare the sprite of the decoration. | ||||||
| 60238 | BIT 0,(IX+15) | Jump to Handle_Coloured_Decoration_Colour if the decoration has been drawn already (bit 0 of the redraw flags is clear). | ||||||
| 60242 | JR Z,Handle_Coloured_Decoration_Colour | |||||||
| 60244 | RES 0,(IX+15) | Reset bit 0 of the redraw flags. | ||||||
| 60248 | CALL Set_Decoration_Size | Copy the size of the obstacle to the object record. | ||||||
| 60251 | CALL DrawEntity | Draw the decoration. | ||||||
| Handle_Coloured_Decoration_Colour | 60254 | LD A,(IX+0) | Fetch the type of the decoration. | |||||
| 60257 | SUB 121 | Subtract 121 to make the number of the decoration. | ||||||
| 60259 | SLA A | Double it, as the pointers are two bytes long. | ||||||
| 60261 | LD E,A | Store the result in E. | ||||||
| 60262 | LD D,0 | Clear the high byte of the offset. | ||||||
| 60264 | LD HL,60274 | Point HL at Decoration_Colour_Pointers. | ||||||
| 60267 | ADD HL,DE | Make HL point at the pointer for the decoration. | ||||||
| 60268 | LD E,(HL) | Fetch the low byte of the pointer. | ||||||
| 60269 | INC HL | Move on to the high byte. | ||||||
| 60270 | LD D,(HL) | Fetch the high byte, which makes DE point at the colour data. | ||||||
| 60271 | JP Handle_Stalactite_Colour_Copy | Jump to Handle_Stalactite_Colour_Copy to colour the decoration. | ||||||
| Prev: 60184 | Up: Map | Next: 60274 |