Skool Daze Routines
Prev: 25108 Up: Map Next: 25172
25126: Move characters (1)
Called from the main loop at 26471.
25126 LD A,(32765) 32765 holds the number of the last character moved
25129 CALL 25141 Move a character
25132 LD A,(32765)
25135 CALL 25141 Move another character
25138 LD A,(32765)
This entry point is used to move a single character. This involves the following steps:
Step Action
1 Return unless the character should be moved on this pass
2 If there is a routine address in bytes 111/112 of the character's buffer, jump to it
3 Call the routine address in bytes 124/125 of the character's buffer
4 Continue into 25172
One of the following routine addresses may be present in bytes 111 and 112 of a character's buffer:
Address Description
27206 Deal with character who has been knocked over
27733 Deal with character who's been dethroned (1)
27748 Deal with character who's been dethroned (2)
27772 Make character find a seat and sit down (2)
27932 Control horizontal flight of catapult pellet
28102 Control vertical flight of catapult pellet
28544 Make ANGELFACE throw a punch (1)
28558 Make ANGELFACE throw a punch (2)
28642 Make ANGELFACE throw a punch (3)
28655 Make ANGELFACE throw a punch (4)
28716 Make BOY WANDER fire catapult (2)
28733 Make BOY WANDER fire catapult (3)
28744 Make BOY WANDER fire catapult (4)
28775 Make BOY WANDER fire catapult (5)
28786 Make BOY WANDER fire catapult (6)
28799 Make BOY WANDER fire catapult (7)
63390 Make character find ERIC
One of the following routine addresses will be present in bytes 124 and 125 of a character's buffer:
Address Description
25247 RET (do nothing)
27126 Trip people up
28446 Make ANGELFACE hit now and then
28672 Make BOY WANDER fire catapult now and then
32234 Make character walk fast
64042 Check whether ANGELFACE is touching ERIC
25141 CP 171 Get the number of the next character to be moved (152-171) in A and copy it to 32765
25143 JR NZ,25147
25145 LD A,151
25147 INC A
25148 LD (32765),A
25151 LD H,A H=number of character to be moved
25152 CALL 25266 Stop now unless it's time to move this character
25155 LD L,112 Bytes 111 and 112 of the character's buffer may contain a routine address
25157 LD A,(HL) Pick up the MSB in A
25158 AND A Is there a routine address here?
25159 JR NZ,25241 Jump to it if so
25161 LD L,124 Pick up in DE the routine address from bytes 124 and 125 of the character's buffer; this is set to 25247 (RET) initially by the startup routine at 26880
25163 LD E,(HL)
25164 INC L
25165 LD D,(HL)
25166 LD BC,25172 Go to the routine address in bytes 124 and 125 of the the character's buffer, and then go to 25172
25169 PUSH BC
25170 PUSH DE
25171 RET
Prev: 25108 Up: Map Next: 25172