![]() |
Routines |
| Prev: 6DBA | Up: Map | Next: 6EF1 |
|
Moves the spray can which Robbie is carrying to its new position, which Robbie works out in IX+05 and IX+06. When Robbie puts the can in a cubby hole, IX+04 is set to 01 and the can is made inactive after it has been drawn for the last time.
|
||||||||
| UpdateSprayCan | 6ED2 | CALL StoreEntity | Remember the position and state using StoreEntity. | |||||
| 6ED5 | LD A,(IX+$05) | A=the new X position from IX+05. | ||||||
| 6ED8 | LD (IX+$01),A | Write it to the X position. | ||||||
| 6EDB | LD A,(IX+$06) | A=the new Y position from IX+06. | ||||||
| 6EDE | LD (IX+$02),A | Write it to the Y position. | ||||||
| 6EE1 | CALL DisplayEntity | Erase the sprite at the previous position and draw it at the new position using DisplayEntity. | ||||||
| 6EE4 | CALL ColouriseSprite | Colour the sprite using ColouriseSprite. | ||||||
| 6EE7 | BIT 0,(IX+$04) | Test bit 0 of IX+04 (the can is being put away). | ||||||
| 6EEB | RET Z | Return if it is not. | ||||||
| 6EEC | LD (IX+$00),$00 | Write 00 to IX+00 (the can is inactive). | ||||||
| 6EF0 | RET | Return. | ||||||
| Prev: 6DBA | Up: Map | Next: 6EF1 |