Prev: 9588 Up: Map Next: 95D8
95A3: Draw Menu Icons
Used by the routine at Select_Game_Options.
Draws the four icons (keyboard, joystick, cursor keys and Interface II) down the side of the game selection screen, using the object record at Menu_Icon_Record and the sprite ids 8C to 8F. The attributes of the icons are red, magenta, green and cyan, like the lines of the menu.
It only does anything the first time it is called.
Before After Draw_Menu_Icons
menu-icons-before menu-icons-after
Draw_Menu_Icons 95A3 LD A,($8EF7) Fetch the icons drawn flag from Menu_Icons_Drawn.
95A6 AND A Return if the icons have already been drawn.
95A7 RET NZ
95A8 LD IX,$95D8 Point at the record of the menu icon (Menu_Icon_Record).
95AC LD (IX+$00),$8C Set the sprite id to 8C.
95B0 LD (IX+$05),$42 Set the attribute to 42 (red).
95B4 LD (IX+$03),$38 Set the y position to 38.
95B8 LD B,$04 Set the number of menu icons to draw to 04.
Draw_Menu_Icons_Loop 95BA PUSH BC Stash the icon counter on the stack.
95BB CALL DrawEntity Draw the icon.
95BE CALL ColourEntity Set the attributes of the icon.
95C1 POP BC Restore the icon counter.
95C2 LD A,(IX+$03) Fetch the y position of the icon.
95C5 ADD A,$18 Move down by 18 pixels.
95C7 LD (IX+$03),A Store the new y position.
95CA INC (IX+$00) Move on to the next sprite id.
95CD INC (IX+$05) Move on to the next attribute.
95D0 DJNZ Draw_Menu_Icons_Loop Decrease the icon counter and loop back until all of the icons are drawn.
95D2 LD A,$01 Write 01 to Menu_Icons_Drawn to show that the icons have been drawn.
95D4 LD ($8EF7),A
95D7 RET Return.
Prev: 9588 Up: Map Next: 95D8