Prev: 98D2 Up: Map Next: 990C
9904: 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 9904 AND %00000111 Keep only bits 0-2.
9906 LD C,A Keep the index in C.
9907 LD B,$00 B=00.
9909 ADD HL,BC Add BC to HL.
990A LD A,(HL) Fetch the room.
990B RET Return.
Prev: 98D2 Up: Map Next: 990C