Prev: 7CAB Up: Map Next: 7CE1
7CD0: Make a character walk up and down until a certain time
Used by command lists 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x14, 0x1A, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2E, 0x30, 0x32, 0x34, 0x48, 0x4A, 0x4C, 0x50, 0x52, 0x54, 0x56 and 0x58 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 (0xB7-0xD1)
7CD0 CALL $627D Get the next byte (the event identifier) from the command list
7CD3 LD L,$06 Place it in byte 0x06 of the character's buffer
7CD5 LD (HL),A
7CD6 CALL $7CAB Has the specified time arrived, and is the character at the walkabout origin?
7CD9 JP NC,$638C Move to the next command in the command list if so
7CDC CALL $639F Otherwise send the character off to another walkabout destination via the routine at 63ED, and return to the instruction at 7CDF (below) when done
7CDF JR $7CD6
Prev: 7CAB Up: Map Next: 7CE1