B | 2 (30739) or 3 (30706) |
H | 207 (ANGELFACE) or 210 (ERIC) |
30664 | 2E00 | LD L,0 | |
30666 | CB7E | BIT 7,(HL) | |
30668 | 2E01 | LD L,1 | |
30670 | 4E | LD C,(HL) | C=punching character's x-coordinate |
30671 | C5 | PUSH BC | Save this x-coordinate for now |
30672 | 78 | LD A,B | |
30673 | 2002 | JR NZ,30677 | |
30675 | ED44 | NEG | |
30677 | 86 | ADD A,(HL) | A=x-coordinate of puncher's fist |
30678 | 77 | LD (HL),A | |
30679 | 2D | DEC L | |
30680 | 7E | LD A,(HL) | A=punching character's animatory state |
30681 | 2F | CPL | |
30682 | E680 | AND 128 | A=0 if character's facing right, 128 if left |
30684 | 4F | LD C,A | |
30685 | 16CE | LD D,206 | 206=BOY WANDER |
30687 | 0605 | LD B,5 | There are 5 main kids who can be hit |
30689 | CD9C6C | CALL 27804 | Were any of them hit? |
30692 | 3007 | JR NC,30701 | Jump if so |
30694 | 16B7 | LD D,183 | 183=little girl no. 1 |
30696 | 0611 | LD B,17 | There are 17 little kids (10 boys, 7 girls) who can be hit |
30698 | CD9C6C | CALL 27804 | Were any of them hit? |
30701 | C1 | POP BC | Restore the punching character's x-coordinate in C |
30702 | 2E01 | LD L,1 | |
30704 | 71 | LD (HL),C | Place it back in byte 1 of the character's buffer |
30705 | C9 | RET | Return with the carry reset if someone was hit, and D holding number of punched character |