Prev: 64130 Up: Map Next: 64162
64131: Deal with a character who has nearly recovered from being knocked over
Used by the routine at 64005. Controls a character from the point where he has almost recovered from the daze of being knocked over.
H Character number (215-229)
64131 CALL 63994 Place the address of the next instruction into bytes 18 and 19 of the character's buffer
The apparent intention of the remainder of this routine is to make the character return (by walking backwards or forwards as required) to the spot where he was hit, but this fails to happen because of the faulty 'JR NZ' instruction below, which should be a 'JR Z' instead.
64134 LD L,21 Collect the character's pre-knockout x-coordinate from byte 21 of his buffer
64136 LD A,(HL)
64137 LD L,1 Does it match the character's current x-coordinate?
64139 CP (HL)
64140 JR NZ,64150 Jump if not (this is a bug)
64142 LD C,128 Bit 7 set, bit 6 reset: the character will move left
64144 JR C,64080 This jump is never made, but the intention was to make it if the character's current x-coordinate is greater than his pre-knockout x-coordinate
64146 LD C,64 Bit 7 reset, bit 6 set: the character will move right
64148 JR 64080 Move the character right
Restore the character's pre-knockout animatory state and terminate this subcommand.
64150 CALL 59848 Update the SRB for the character's current animatory state and location
64153 LD L,13 Collect the character's pre-knockout animatory state from byte 13 of his buffer
64155 LD A,(HL)
64156 CALL 59861 Update the character's animatory state and update the SRB
64159 JP 62088 Terminate this uninterruptible subcommand
Prev: 64130 Up: Map Next: 64162