Prev: 6C9B Up: Map Next: 6CAC
6C9C: Check whether any characters were punched
Used by the routine at 77C8. Returns with the carry flag reset if someone was hit in the face, and D holding the character number of the stricken one.
Input
B Number of potential victims to check
C 0x00 if the puncher is facing right, 0x80 if left
D Character number of the first potential victim to check
H Puncher's character number: 0xCF (ANGELFACE) or 0xD2 (ERIC)
6C9C CALL $6CAC Are any characters in front of the puncher's fist?
6C9F RET C Return if not
6CA0 LD E,$00
6CA2 LD A,(DE) A=animatory state of the character in front of the puncher's fist
6CA3 AND $80 Keep only the 'direction' bit (bit 7)
6CA5 XOR C Compare with the direction bit of the punching character
6CA6 RET Z Return with the carry flag reset if the punched character was facing the puncher (i.e. was hit in the face)
6CA7 INC D Otherwise move on to the next potential victim
6CA8 DJNZ $6C9C Jump back to consider any remaining potential victim
6CAA SCF Signal: no characters were hit
6CAB RET
Prev: 6C9B Up: Map Next: 6CAC