Prev: BBBB Up: Map Next: BBF7
BBDD: Draw Current Room
Used by the routines at HandlerPoems, EnterRoomBelow and InitialiseGame.
Looks up the room data for the room the actor is in, using the layout table at Layout to find the room in the room table at RoomTable, draws the room with DrawRoom and then carries on to DrawRoomContents to draw its contents.
Input
IX Actor Entity
DrawCurrentRoom BBDD LD L,(IX+$01) Fetch the room of the actor.
BBE0 LD H,$00 Clear H.
BBE2 LD BC,$6066 Point BC at the table of room layouts at Layout.
BBE5 ADD HL,BC Add the table to the room to find the layout number of the room.
BBE6 LD L,(HL) Fetch the layout number of the room.
BBE7 LD H,$00 Clear H.
BBE9 ADD HL,HL Double the layout number (each pointer to room data is a word).
BBEA LD BC,$6166 Point BC at the table of pointers to room data at RoomTable.
BBED ADD HL,BC Add the table to find the pointer to the room data.
BBEE LD A,(HL) Fetch the low byte of the address of the room data.
BBEF INC HL Move onto the high byte.
BBF0 LD H,(HL) Fetch the high byte of the address of the room data.
BBF1 LD L,A Combine the low byte with the high byte.
BBF2 CALL DrawRoom Draw the room.
BBF5 JR DrawRoomContents Jump to DrawRoomContents to set up the contents of the room.
Prev: BBBB Up: Map Next: BBF7