![]() |
Routines |
| Prev: 27206 | Up: Map | Next: 27296 |
|
Used by the routines at HandlePeel, HandlePikeAndTinCan, HandleCheese, HandleTackWasherBolt, HandleChocolate, HandleSugar and HandleCustard.
Called when an actor has hit Charlie. Charlie is replaced with Charlie without his hat (ID 12), and the hat (ID 13) is put 16 pixels above him. Charlie's co-ordinates are saved in bytes 4 and 5 of the actor. The hat is then handled by HandleHat, and all of the other actors are cleared away by ConvertActors.
|
||||
| LoseHat | 27251 | PUSH IX | Save the pointer to the current actor on the stack. | |
| 27253 | LD IX,24373 | Point IX at ActorCharlie. | ||
| 27257 | CALL DrawEntity | Erase Charlie using DrawEntity. | ||
| 27260 | LD (IX+0),12 | Change Charlie's ID to 12 (Charlie without his hat). | ||
| 27264 | CALL DrawEntity | Draw Charlie without his hat using DrawEntity. | ||
| 27267 | LD (IX+0),13 | Change the ID to 13 (the hat). | ||
| 27271 | LD A,(IX+1) | Fetch the horizontal co-ordinate. | ||
| 27274 | LD (IX+4),A | Save Charlie's horizontal co-ordinate in byte 4 of the actor. | ||
| 27277 | LD A,(IX+2) | Fetch the vertical co-ordinate. | ||
| 27280 | LD (IX+5),A | Save Charlie's vertical co-ordinate in byte 5 of the actor. | ||
| 27283 | SUB 16 | Subtract 16 to put the hat above Charlie's head. | ||
| 27285 | LD (IX+2),A | Update the vertical co-ordinate. | ||
| 27288 | CALL DrawEntity | Draw the hat using DrawEntity. | ||
| 27291 | POP IX | Restore the pointer to the current actor from the stack. | ||
| 27293 | JP ConvertActors | Jump to ConvertActors. | ||
| Prev: 27206 | Up: Map | Next: 27296 |