Routines

31952: Walk up and down until...


Used by the tables of A&P to make a character walk about a fixed location until a specified time, e.g. the end of the lesson or when a teacher arrives at the doorway of the classroom

H Character number (183-214)

31952 CD7D62 CALL 25213 Get the next byte (time/event identifier) from the table of A&P
31955 2E06 LD L,6 Place it in byte 6 of the character's buffer
31957 77 LD (HL),A
31958 CDAB7C CALL 31915 Has the specified time arrived, and is the character ready to respond to it?
31961 D28C63 JP NC,25484 Move to the next instruction in the table of A&P if so
31964 CD9F63 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 18F5 JR 31958