Prev: 43764 Up: Map Next: 43970
43844: Populate Current Room Buffers And References
Used by the routine at Controller_DrawRoom.
PopulateCurrentRoomBuffersAndReferences 43844 LD A,(23507) A=*CurrentRoom.
43847 LD (23508),A Write A to *TempCurrentRoomID.
Fetch the room data pointer from the room reference table.
43850 LD E,A HL=TableRoomData+((22-A)*2).
43851 LD A,22
43853 SUB E
43854 LD E,A
43855 SLA E
43857 LD D,0
43859 LD HL,47785
43862 ADD HL,DE
43863 LD E,(HL) Store the room data address for the requested room in HL.
43864 INC HL
43865 LD D,(HL)
43866 EX DE,HL
Set the colour scheme for the active room.
43867 LD DE,23500 Copy 0007 bytes of room data from the buffer to *ActiveRoom_KeyColour.
43870 LD BC,7
43873 LDIR
43875 INC HL Skip the terminator character in the room data.
Handle populating the scaffolding data.
43876 LD DE,47831 Write BufferCurrentRoomData to *PointerCurrentRoomBuffer.
43879 LD (23528),DE
43883 LD B,3 B=3 (length counter).
43885 CALL CopyRoomData Call CopyRoomData.
Handle populating the doors data.
43888 LD B,4 B=4 (length counter).
43890 LD (23510),DE Write DE to *ReferenceDoors.
43894 CALL CopyRoomData Call CopyRoomData.
Handle populating the ladders data.
43897 LD B,2 B=2 (length counter).
43899 LD (23512),DE Write DE to *ReferenceLadders.
43903 CALL CopyRoomData Call CopyRoomData.
Handle populating the keys and locked doors data.
43906 LD B,6 B=6 (length counter).
43908 LD (23514),DE Write DE to *ReferenceKeysAndLockedDoors.
43912 CALL CopyRoomData Call CopyRoomData.
Handle populating the porthole data.
43915 LD B,3 B=3 (length counter).
43917 LD (23516),DE Write DE to *ReferencePortHole.
43921 CALL CopyRoomData Call CopyRoomData.
Handle populating the pirate data.
43924 LD B,16 B=16 (length counter).
43926 LD (23518),DE Write DE to *ReferencePirate.
43930 CALL CopyRoomData Call CopyRoomData.
Handle populating the items data.
43933 LD B,7 B=7 (length counter).
43935 LD (23520),DE Write DE to *ReferenceItems.
43939 CALL CopyRoomData Call CopyRoomData.
Handle populating the furniture data.
43942 LD B,4 B=4 (length counter).
43944 LD (23522),DE Write DE to *ReferenceFurniture.
43948 CALL CopyRoomData Call CopyRoomData.
Handle populating the lifts data.
43951 LD B,16 B=16 (length counter).
43953 LD (23524),DE Write DE to *ReferenceLifts.
43957 CALL CopyRoomData Call CopyRoomData.
Handle populating the disappearing floors data.
43960 LD B,6 B=6 (length counter).
43962 LD (23526),DE Write DE to *ReferenceDisappearingFloors.
43966 CALL CopyRoomData Call CopyRoomData.
43969 RET Return.
Prev: 43764 Up: Map Next: 43970