![]() |
Routines |
Prev: 28380 | Up: Map | Next: 28442 |
C | Punching character's animatory state |
D | Punching character's y-coordinate |
E | Target x-coordinate (2 or 3 spaces in front of punching character) |
H | Character number (152-172) of character to check for presence of |
28416 | LD L,98 | Byte 98 of a character's buffer holds his x-coordinate |
28418 | LD A,(HL) | Pick this up in A |
28419 | CP E | Is this character at the target x-coordinate? |
28420 | JR Z,28424 | Jump if so |
28422 | AND A | Reset the carry flag to indicate absence of character |
28423 | RET | |
28424 | DEC L | Byte 97 holds the character's y-coordinate |
28425 | LD A,(HL) | Pick this up in A |
28426 | CP D | Is this character at the target y-coordinate? |
28427 | JR NZ,28422 | Jump if not |
The character being checked has been found at the target coordinates. But is he facing the right way?
|
||
28429 | DEC L | Byte 96 holds the character's animatory state |
28430 | LD A,(HL) | Pick this up in A |
28431 | XOR C | Now A=128 if the character and puncher are facing each other, and 0 otherwise |
28432 | AND 128 | |
28434 | RET Z | Return if the character's not facing the puncher |
28435 | LD L,112 | Is there a routine address in bytes 111 and 112 of the potential victim's buffer (i.e. is he not in a punchable state at the moment)? |
28437 | LD A,(HL) | |
28438 | AND A | |
28439 | RET NZ | Return with the carry flag reset if so |
28440 | SCF | Set the carry flag to indicate the presence of a ripe target |
28441 | RET |
Prev: 28380 | Up: Map | Next: 28442 |