![]() |
Routines |
| Prev: 6A46 | Up: Map | Next: 6AA0 |
|
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 0C), and the hat (ID 0D) is put 10 pixels above him. Charlie's co-ordinates are saved in bytes 04 and 05 of the actor. The hat is then handled by HandleHat, and all of the other actors are cleared away by ConvertActors.
|
||||
| LoseHat | 6A73 | PUSH IX | Save the pointer to the current actor on the stack. | |
| 6A75 | LD IX,$5F35 | Point IX at ActorCharlie. | ||
| 6A79 | CALL DrawEntity | Erase Charlie using DrawEntity. | ||
| 6A7C | LD (IX+$00),$0C | Change Charlie's ID to 0C (Charlie without his hat). | ||
| 6A80 | CALL DrawEntity | Draw Charlie without his hat using DrawEntity. | ||
| 6A83 | LD (IX+$00),$0D | Change the ID to 0D (the hat). | ||
| 6A87 | LD A,(IX+$01) | Fetch the horizontal co-ordinate. | ||
| 6A8A | LD (IX+$04),A | Save Charlie's horizontal co-ordinate in byte 04 of the actor. | ||
| 6A8D | LD A,(IX+$02) | Fetch the vertical co-ordinate. | ||
| 6A90 | LD (IX+$05),A | Save Charlie's vertical co-ordinate in byte 05 of the actor. | ||
| 6A93 | SUB $10 | Subtract 10 to put the hat above Charlie's head. | ||
| 6A95 | LD (IX+$02),A | Update the vertical co-ordinate. | ||
| 6A98 | CALL DrawEntity | Draw the hat using DrawEntity. | ||
| 6A9B | POP IX | Restore the pointer to the current actor from the stack. | ||
| 6A9D | JP ConvertActors | Jump to ConvertActors. | ||
| Prev: 6A46 | Up: Map | Next: 6AA0 |