Routines |
Prev: 6EDC | Up: Map | Next: 6F1A |
Used by the routines at 6F1E and 6F99. On entry, E holds the x-coordinate of the spot three spaces in front of ANGELFACE to check whether it's worth raising his fist (6F1E), or the x-coordinate of the spot two spaces in front of ERIC or ANGELFACE when he has already raised his fist (6F99). Returns with the carry flag set if the potential victim is at the target coordinates and is facing the right way.
|
||||||||||||||
6F00 | LD L,$62 | Byte 0x62 of a character's buffer holds his x-coordinate | ||||||||||||
6F02 | LD A,(HL) | Pick this up in A | ||||||||||||
6F03 | CP E | Is this character at the target x-coordinate? | ||||||||||||
6F04 | JR Z,$6F08 | Jump if so | ||||||||||||
6F06 | AND A | Reset the carry flag to indicate absence of character | ||||||||||||
6F07 | RET | |||||||||||||
6F08 | DEC L | Byte 0x61 holds the character's y-coordinate | ||||||||||||
6F09 | LD A,(HL) | Pick this up in A | ||||||||||||
6F0A | CP D | Is this character at the target y-coordinate? | ||||||||||||
6F0B | JR NZ,$6F06 | Jump if not | ||||||||||||
The character being checked has been found at the target coordinates. But is he facing the right way?
|
||||||||||||||
6F0D | DEC L | Byte 0x60 holds the character's animatory state | ||||||||||||
6F0E | LD A,(HL) | Pick this up in A | ||||||||||||
6F0F | XOR C | Now A=0x80 if the character and puncher are facing each other, and 0x00 otherwise | ||||||||||||
6F10 | AND $80 | |||||||||||||
6F12 | RET Z | Return if the character's not facing the puncher | ||||||||||||
6F13 | LD L,$70 | Is there an uninterruptible subcommand routine address in bytes 0x6F and 0x70 of the potential victim's buffer (i.e. is he not in a punchable state at the moment)? | ||||||||||||
6F15 | LD A,(HL) | |||||||||||||
6F16 | AND A | |||||||||||||
6F17 | RET NZ | Return with the carry flag reset if so | ||||||||||||
6F18 | SCF | Set the carry flag to indicate the presence of a ripe target | ||||||||||||
6F19 | RET |
Prev: 6EDC | Up: Map | Next: 6F1A |