| Routines

31952: Make a character walk up and down until a certain time

Used by command lists 0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 26, 32, 34, 36, 38, 40, 46, 48, 50, 52, 72, 74, 76, 80, 82, 84, 86 and 88 to make a character walk up and down within 7 spaces to the left of a fixed location (the 'walkabout origin') until a specified time, e.g. the end of the lesson or when a teacher arrives at the doorway of the classroom.
Input
H | Character number (183-209)
31952 | CALL 25213 | Get the next byte (the event identifier) from the command list
31955 | LD L,6 | Place it in byte 6 of the character's buffer
31957 | LD (HL),A
31958 | CALL 31915 | Has the specified time arrived, and is the character at the walkabout origin?
31961 | JP NC,25484 | Move to the next command in the command list if so
31964 | CALL 25503 | Otherwise send the character off to another walkabout destination via the routine at 25581, and return to the instruction at 31967 (below) when done
31967 | JR 31958 |