Skool Daze Routines
27206: Deal with character who has been knocked over
The address of this routine is placed in bytes 111 and 112 of a character's buffer by the routines at 27126 and 28569.
H Character number (152-169)
27206 LD L,113 Byte 113 holds the delay counter
27208 DEC (HL) Is it time for the character to get up?
27209 JP Z,25248 Jump if so
27212 LD A,(HL) Pick up the delay counter in A
27213 CP 19 Has the character only just been hit?
27215 JR Z,27233 Jump if so
27217 CALL 63829 If the character is a teacher, make him reveal his safe combination letter or give lines (as appropriate)
27220 NOP
27221 DEC A Is it time for the character to get up?
27222 RET NZ Return if not
27223 INC L Copy the character's pre-decked animatory state (stored in byte 114 of the character's buffer) to A
27224 LD A,(HL)
27225 PUSH AF
27226 CALL 25108 Update SRB for current location of character
27229 POP AF
27230 JP 25008 Update character's animatory state and location and update SRB
The character has only just been hit, so adjust his animatory state to that of "decked".
27233 CALL 25108 Update SRB for current location of character
27236 LD L,114 Store the character's pre-decked animatory state in byte 114 of the buffer
27238 LD (HL),A
27239 AND 248 Set A equal to the animatory state of the character lying on the floor
27241 ADD A,7
27243 JP 25008 Update character's animatory state and location and update SRB