Prev: C839 Up: Map Next: C889
C83F: Draw Inventory Tube
Used by the routine at StartGame.
Draws the tube down the left of the screen that holds the items that the player is carrying: two vertical bars joined at the bottom.
DrawInventoryTube C83F LD A,$43 Use bright magenta ink (attribute 43), and keep it for colouring the tube.
C841 EX AF,AF'
C842 LD HL,$6CB6 Set the font to the characters of the tube.
C845 LD ($BBAC),HL
C848 LD HL,$4001 Set the screen position of the top of the left bar to 4001 (in the screen buffer).
C84B XOR A Print the top of the bar.
C84C CALL PrintCharacterWithAttribute
C84F CALL MoveDownRow Move down a row.
C852 LD A,$01 Choose the side of the bar as the character, and 16 as the number of rows.
C854 LD B,$16
C856 CALL PrintCharacterColumn Print the side of the left bar.
Print the bottom of the tube.
C859 LD A,$02 Print the bottom left corner.
C85B CALL PrintCharacterWithAttribute
C85E INC L Move one position to the right.
C85F LD A,$03 Print the first part of the bottom.
C861 CALL PrintCharacterWithAttribute
C864 INC L Move one position to the right.
C865 LD A,$03 Print the second part of the bottom.
C867 CALL PrintCharacterWithAttribute
C86A INC L Move one position to the right.
C86B LD A,$04 Print the bottom right corner.
C86D CALL PrintCharacterWithAttribute
Print the right bar.
C870 LD HL,$4004 Set the screen position of the top of the right bar to 4004 (in the screen buffer).
C873 XOR A Print the top of the bar.
C874 CALL PrintCharacterWithAttribute
C877 CALL MoveDownRow Move down a row.
C87A LD A,$01 Choose the side of the bar as the character, and 16 as the number of rows.
C87C LD B,$16
Prints a column of characters.
PrintCharacterColumn C87E PUSH AF Keep the character.
C87F CALL PrintCharacterWithAttribute Print the character.
C882 CALL MoveDownRow Move down a row.
C885 POP AF Get the character back.
C886 DJNZ PrintCharacterColumn Loop back until the whole column has been printed.
C888 RET Return.
Prev: C839 Up: Map Next: C889