Skool Daze Routines
27090: Set random destination for character
Used by the routine at 27111.
27090 CALL 24993 Get random number in A
27093 AND 6 A=0, 2, 4 or 6
27095 ADD A,202 A=202, 204, 206 or 208
27097 LD E,A DE=address holding a skool location (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 H
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 in 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