Routines |
Prev: FA82 | Up: Map | Next: FAA2 |
Used by the routine at FA05. Controls a character from the point where he has almost recovered from the daze of being knocked over.
|
||||||||
FA83 | CALL $F9FA | Place the address of the next instruction into bytes 0x12 and 0x13 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.
|
||||||||
FA86 | LD L,$15 | Collect the character's pre-knockout x-coordinate from byte 0x15 of his buffer | ||||||
FA88 | LD A,(HL) | |||||||
FA89 | LD L,$01 | Does it match the character's current x-coordinate? | ||||||
FA8B | CP (HL) | |||||||
FA8C | JR NZ,$FA96 | Jump if not (this is a bug) | ||||||
FA8E | LD C,$80 | Bit 7 set, bit 6 reset: the character will move left | ||||||
FA90 | JR C,$FA50 | 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 | ||||||
FA92 | LD C,$40 | Bit 7 reset, bit 6 set: the character will move right | ||||||
FA94 | JR $FA50 | Move the character right | ||||||
Restore the character's pre-knockout animatory state and terminate this subcommand.
|
||||||||
FA96 | CALL $E9C8 | Update the SRB for the character's current animatory state and location | ||||||
FA99 | LD L,$0D | Collect the character's pre-knockout animatory state from byte 0x0D of his buffer | ||||||
FA9B | LD A,(HL) | |||||||
FA9C | CALL $E9D5 | Update the character's animatory state and update the SRB | ||||||
FA9F | JP $F288 | Terminate this uninterruptible subcommand |
Prev: FA82 | Up: Map | Next: FAA2 |