Prev: 41678 Up: Map Next: 41849
41745: Menu Icons
Used by the routine at GameInitialisation.
Draws the nine icons of the menu. The data for each one is the same as an entity record, which is copied from the table at MenuEntities to EntityToDraw, drawn with DrawEntity and then coloured with SetEntityAttributes.
Before After
menu-icons-before menu-icons-after
MenuIcons 41745 LD IX,41341 Point IX at the entity to draw at EntityToDraw.
41749 LD HL,41777 Point HL at the table of icons at MenuEntities.
41752 LD B,9 B=9 (the number of icons).
MenuIcons_Loop 41754 PUSH BC Stash the icon counter on the stack.
41755 LD DE,41341 Copy 8 bytes of data from HL to EntityToDraw.
41758 LD BC,8
41761 LDIR
41763 PUSH HL Stash HL and DE on the stack.
41764 PUSH DE
41765 CALL DrawEntity Call DrawEntity to draw the entity.
41768 CALL SetEntityAttributes Call SetEntityAttributes to set the attributes of the entity.
41771 POP DE Restore DE and HL from the stack.
41772 POP HL
41773 POP BC Restore the icon counter from the stack.
41774 DJNZ MenuIcons_Loop Decrease the icon counter by one and loop back to MenuIcons_Loop until all nine icons have been drawn.
41776 RET Return.
The sprite IDs are stored +1 higher than their actual value.
MenuEntities 41777 DEFB 50,0,0,32,79,70,0,0
Address Sprite Attribute Screen Buffer Location
41777 "Cursor: Left" 32 17999
41785 "Cursor: Right" 48 17999
41793 "Joystick: Left" 32 17487
41801 "Joystick: Right" 48 17487
41809 "Keyboard: Left" 32 17231
41817 "Keyboard: Right" 48 17231
41825 "Knight: Left Frame 1" 40 18255
41833 "Wizard: Left Frame 1" 40 18255
41841 "Serf: Left Frame 1" 40 18327
41785 DEFB 51,0,0,48,79,70,0,0
41793 DEFB 74,0,0,32,55,68,0,0
41801 DEFB 75,0,0,48,55,68,0,0
41809 DEFB 72,0,0,32,28,67,0,0
41817 DEFB 73,0,0,48,28,67,0,0
41825 DEFB 1,0,0,40,103,71,0,0
41833 DEFB 17,0,0,40,127,71,0,0
41841 DEFB 33,0,0,40,151,71,0,0
Prev: 41678 Up: Map Next: 41849