Prev: 6C55 Up: Map Next: 6C7C
6C64: Deal with a character who's been dethroned (2)
The address of this uninterruptible subcommand routine is placed into bytes 0x6F and 0x70 of a character's buffer by the routine at 6C55.
Input
H Dethroned character's number (0x98-0xA9)
6C64 LD L,$71 Byte 0x71 holds the delay counter
6C66 DEC (HL) Is it time to stand up yet?
6C67 RET NZ Return if not
6C68 LD L,$6F Replace the address of this routine in bytes 0x6F and 0x70 of the character's buffer with that of 6C7C
6C6A LD (HL),$7C
6C6C CALL $6214 Update the SRB for the character's current animatory state
6C6F AND $F8 C=animatory state of the character standing up
6C71 LD C,A
6C72 LD A,H A=number of the dethroned character
6C73 CP $A9 Was EINSTEIN knocked out of his chair?
6C75 JR Z,$6C78 Jump if so
6C77 DEC E Anyone but EINSTEIN will look for another chair to the left
6C78 LD A,C A=animatory state of the character standing up
6C79 JP $61B0 Update the character's animatory state and location and update the SRB
Prev: 6C55 Up: Map Next: 6C7C