Prev: A31A Up: Map Next: A33B
A323: Collect Pickup
Used by the routines at HandlerExtraLife and HandlerPickup.
Collects a pickup: it is erased from the screen, removed from the table of room objects so that it does not come back, and is worth 150 points. A tone is then played by PlayHighTone.
Input
IX Actor record of the pickup
CollectPickup A323 CALL DrawEntity Erase the pickup from the screen.
Remove the object from the table of objects in the room.
A326 LD L,(IX+$06) Fetch the low byte of the address of the pickup's entry in the table of room objects.
A329 LD H,(IX+$07) Fetch the high byte of the address of the pickup's entry.
A32C LD (HL),$00 Clear the table entry so that the pickup is gone from the room.
A32E LD (IX+$00),$00 Remove the pickup by setting its sprite ID to 00.
Add 150 points to the player's score.
A332 LD BC,$0150 Set the points to award in BC to 150 (stored as BCD).
A335 CALL AddPointsToScore Add the points to the score.
A338 JP PlayHighTone Jump to PlayHighTone to play the high tone.
Prev: A31A Up: Map Next: A33B