Skool Daze Routines
27090: Set random destination for character
Used by the routine at 27111.
27090 CALL 24993 A=random number
27093 AND 6 A=202, 204, 206 or 208
27095 ADD A,202
27097 LD E,A Point DE at an entry in the table at 27082 (see below)
27098 LD D,105
Now DE holds the address of an entry in the table of skool locations at 27082.
Address Contents Description
27082 155,36 Revision Library
27084 155,94 Fire escape
27086 169,94 Gym
27088 169,8 Big window
27100 EX DE,HL Pick up the coordinates of the skool location in A and D
27101 LD A,(HL)
27102 INC L
27103 LD H,(HL)
27104 EX DE,HL
27105 LD L,101 Place the coordinates of the skool location into bytes 101 and 102 of the character's buffer to make it his next destination
27107 LD (HL),A
27108 INC L
27109 LD (HL),D
27110 RET