Back to Skool Routines
26239: Control character after he's been knocked out of a chair
The address of this routine is placed into bytes 17 and 18 of a character's buffer by the routine at 26224 after he's been knocked out of his chair.
H Number of character knocked out of chair
26239 LD L,19 Byte 19 holds the delay counter
26241 DEC (HL) Is it time for the character to get up off the floor yet?
26242 RET NZ Return if not
26243 LD L,17 Replace the address of this routine in bytes 17 and 18 of the character's buffer with that of the routine at 26263
26245 LD (HL),151
26247 CALL 25012 Update SRB for the character's current animatory state and location
26250 AND 248 A=animatory state of the character standing up
26252 LD C,A Store this in C temporarily
26253 LD A,H A=number of the character knocked out of the chair
26254 CP 208 Is this EINSTEIN?
26256 JR Z,26259 Jump if so
26258 DEC E E=x-coordinate of the character upon standing up (everyone but EINSTEIN will get up and try the seat in front)
26259 LD A,C A=animatory state of the character standing up
26260 JP 24880 Update SRB for the character's new animatory state and location