Prev: AAF4 Up: Map Next: ABC2
AB44: Populate Current Room Buffers And References
Used by the routine at Controller_DrawRoom.
PopulateCurrentRoomBuffersAndReferences AB44 LD A,($5BD3) A=*CurrentRoom.
AB47 LD ($5BD4),A Write A to *TempCurrentRoomID.
Fetch the room data pointer from the room reference table.
AB4A LD E,A HL=TableRoomData+((16-A)*02).
AB4B LD A,$16
AB4D SUB E
AB4E LD E,A
AB4F SLA E
AB51 LD D,$00
AB53 LD HL,$BAA9
AB56 ADD HL,DE
AB57 LD E,(HL) Store the room data address for the requested room in HL.
AB58 INC HL
AB59 LD D,(HL)
AB5A EX DE,HL
Set the colour scheme for the active room.
AB5B LD DE,$5BCC Copy 0007 bytes of room data from the buffer to *ActiveRoom_KeyColour.
AB5E LD BC,$0007
AB61 LDIR
AB63 INC HL Skip the terminator character in the room data.
Handle populating the scaffolding data.
AB64 LD DE,$BAD7 Write BufferCurrentRoomData to *PointerCurrentRoomBuffer.
AB67 LD ($5BE8),DE
AB6B LD B,$03 B=03 (length counter).
AB6D CALL CopyRoomData Call CopyRoomData.
Handle populating the doors data.
AB70 LD B,$04 B=04 (length counter).
AB72 LD ($5BD6),DE Write DE to *ReferenceDoors.
AB76 CALL CopyRoomData Call CopyRoomData.
Handle populating the ladders data.
AB79 LD B,$02 B=02 (length counter).
AB7B LD ($5BD8),DE Write DE to *ReferenceLadders.
AB7F CALL CopyRoomData Call CopyRoomData.
Handle populating the keys and locked doors data.
AB82 LD B,$06 B=06 (length counter).
AB84 LD ($5BDA),DE Write DE to *ReferenceKeysAndLockedDoors.
AB88 CALL CopyRoomData Call CopyRoomData.
Handle populating the porthole data.
AB8B LD B,$03 B=03 (length counter).
AB8D LD ($5BDC),DE Write DE to *ReferencePortHole.
AB91 CALL CopyRoomData Call CopyRoomData.
Handle populating the pirate data.
AB94 LD B,$10 B=10 (length counter).
AB96 LD ($5BDE),DE Write DE to *ReferencePirate.
AB9A CALL CopyRoomData Call CopyRoomData.
Handle populating the items data.
AB9D LD B,$07 B=07 (length counter).
AB9F LD ($5BE0),DE Write DE to *ReferenceItems.
ABA3 CALL CopyRoomData Call CopyRoomData.
Handle populating the furniture data.
ABA6 LD B,$04 B=04 (length counter).
ABA8 LD ($5BE2),DE Write DE to *ReferenceFurniture.
ABAC CALL CopyRoomData Call CopyRoomData.
Handle populating the lifts data.
ABAF LD B,$10 B=10 (length counter).
ABB1 LD ($5BE4),DE Write DE to *ReferenceLifts.
ABB5 CALL CopyRoomData Call CopyRoomData.
Handle populating the disappearing floors data.
ABB8 LD B,$06 B=06 (length counter).
ABBA LD ($5BE6),DE Write DE to *ReferenceDisappearingFloors.
ABBE CALL CopyRoomData Call CopyRoomData.
ABC1 RET Return.
Prev: AAF4 Up: Map Next: ABC2