Used by the routine at 65DB. Returns with the carry flag set if Sam has been hit by a bullet.
|Initialise E' to 0; E' may be updated by the call to E900 below
|Save the bullet's screen coordinates
|Collect the x- and y-coordinates of the top-left tile of the play area on screen in L and H
|Add the bullet's screen coordinates
|Now DE holds the bullet's play area coordinates
|Point HL at byte 0x04 of Sam's buffer
|Set the zero flag if Sam's indoors
|Print the play area tile where the bullet will be next (if Sam's not indoors)
|A=reference of the sprite tile (of Sam's) that was printed, or 0 if none was printed
|Was a sprite tile printed?
|Jump if not (Sam was not hit)
|Was the sprite tile reference in the range 0x01-0x0F?
|Jump if so
|Was the sprite tile reference in the range 0x10-0x19?
|Jump if so (Sam was hit by the bullet)
|Point HL at the table of sprite tile references at 6586
|There are 9 sprite tile references in the table
|Compare the reference of the sprite tile that was printed with a reference from the table
|Jump if they match (Sam was hit)
|Point HL at the next sprite tile reference in the table
|Jump back to compare it with the sprite tile that was printed
|Reset the carry flag: Sam was not hit by the bullet
|Make the sound effect of Sam being hit by a bullet
|7FEF holds the number of remaining first aid kits
|Pick this up in A
|Discard a first aid kit
|Jump if there was a first aid kit left to discard
|Reduce Sam's cash supply to 0
|Message 0x63: 'I HAD TO GO TO HOSPITAL...'
|Display the ending cutscene with this message
|Display any remaining first aid kits
|Set the carry flag: Sam was hit by the bullet
|Restore the bullet's screen coordinates to DE