Prev: 46873 Up: Map Next: 46960
46932: Kill Sheriff
Used by the routines at HandleTumbleweed, HandleCactus and HandleOutlaw.
Makes the sheriff die, and removes the bullets. It is used when the sheriff touches something dangerous.
Input
IX The address of the object which killed the sheriff
IY The address of the sheriff
Make the sheriff die.
KillSheriff 46932 PUSH IX Stash the address of the object on the stack.
46934 PUSH IY Copy the address of the sheriff into IX (using the stack).
46936 POP IX
46938 CALL StartDying Make the sheriff die.
46941 LD A,(IX+12) Fetch the counter of the sheriff.
46944 SUB 4 Take four off it.
46946 LD (IX+12),A Store the reduced delay counter.
46949 POP IX Retrieve the address of the object from the stack.
Clear the three bullet slots.
46951 LD HL,41613 Point HL at ObjectSlot_02.
46954 LD BC,48 Set the size of the three bullet slots.
46957 JP FillMemory Jump to FillMemory.
Prev: 46873 Up: Map Next: 46960