Prev: 39122 Up: Map Next: 39180
39172: Get Key Room
Used by the routine at SetKeyPositions.
Looks up one of the eight rooms in a table using the bottom three bits of A.
Input
A The value to use
HL The table of eight rooms
Output
A The room
GetKeyRoom 39172 AND %00000111 Keep only bits 0-2.
39174 LD C,A Keep the index in C.
39175 LD B,0 B=0.
39177 ADD HL,BC Add BC to HL.
39178 LD A,(HL) Fetch the room.
39179 RET Return.
Prev: 39122 Up: Map Next: 39180