Prev: A6C0 Up: Map Next: A797
A749: Colour the screen and the panel for the room
Used by the routines at OBJECT_DONE and LOOSE_VALVE.
On the first turn in a room (OBJECT_DONE) and when a chamber is activated (LOOSE_VALVE). The whole attribute file gets the room's ink, bright on black, and then the panel its colours: the lives bright white, the light-years box red round white digits (COLOUR_CLOCK_BOX), the carried things (SHOW_CARRIED, part way in), the LIGHT YEARS label and the chamber icon in a colour chosen from the room's ink, and the count of chambers and of lives.
The label's colour is 2 plus 7 less the room's ink, bright on black: never the room's own colour for the inks the rooms use (3 to 6 on the tape, and 7 once a chamber is activated), and red in an activated chamber. It is written into the first byte of the label's text (LIGHT_YEARS_TEXT), where the printer takes a line's colour from, and read back from there for the icon.
COLOUR_PANEL A749 LD A,(ROOM_INK) the whole screen in the room's ink, bright on black
A74C OR $40
A74E CALL FILL_ATTR
A751 LD A,$47 the lives, bright white
A753 LD DE,$5ACE
A756 LD B,$02
A758 CALL FILL_DE
A75B LD DE,$5AEE
A75E LD B,$04
A760 CALL FILL_DE
A763 CALL COLOUR_CLOCK_BOX the light-years box
A766 CALL SHOW_CARRIED_NOW the carried things
A769 LD A,(ROOM_INK) 2 + (7 - ink), bright: the label's colour, into its text
A76C CPL
A76D AND $07
A76F ADD A,$42
A771 LD (LIGHT_YEARS_TEXT),A
A774 LD DE,LIGHT_YEARS_TEXT print LIGHT YEARS at the foot of the screen, right of centre
A777 LD HL,$07A0
A77A CALL PRINT_TEXT
A77D CALL PRINT_CHAMBERS the count of chambers
A780 LD HL,$5A84 its two digits bright white
A783 LD (HL),$47
A785 INC HL
A786 LD (HL),$47
A788 LD HL,$5A41 the chamber icon, three by three cells at the left, in the label's colour
A78B LD BC,$0303
A78E LD A,(LIGHT_YEARS_TEXT)
A791 CALL FILL_BOX
A794 JP PRINT_LIVES and the lives
Prev: A6C0 Up: Map Next: A797