Prev: 26670 Up: Map Next: 26855
26745: Display and handle Gadget X menu
Used by the routines at 26670 and 30968.
Input
IY 23610
26745 LD A,7 Load A with index of redefine-the-game window
26747 LD HL,38063 Point HL at Gadget X menu text
26750 PUSH HL Store HL (pointer to Gadget X menu text)
26751 CALL 34982 Draw redefine-the-game menu window
26754 POP HL Restore HL (pointer to Gadget X menu text)
26755 CALL 34762 Print text
26758 CALL 35690 Play upward scale sound
26761 CALL 35296 Process keyboard / joystick input on a menu and load A with selected item index
26764 OR A If REDEFINE KEYBOARD selected...
26765 JP Z,26816 ...then skip ahead to 26816
26768 CP 1 If PLAYER ATTRIBUTE IGNORE selected...
26770 JR Z,26807 ...then skip ahead to 26807
26772 CP 2 If PLAYER ATTRIBUTE UPDATE selected...
26774 JR Z,26812 ...then skip ahead to 26812
26776 BIT 0,(IY+65) If game-in-progress flag is reset...
26780 JR Z,26790 ...then skip ahead to 26790
26782 CP 3 If SAVE THE GAME selected...
26784 JR Z,26833 ...then skip ahead to 26833
26786 CP 4 If LOAD AN OLD GAME selected...
26788 JR Z,26840 ...then skip ahead to 26840
26790 LD A,5 Draw window 5...
26792 CALL 34990 ...
26795 LD HL,38180 Point HL at "SAVE & LOAD ARE NOT ALLOWED HERE..." text...
26798 CALL 34762 ...and print to screen
26801 CALL 35690 Play upward scale sound
26804 JP 55138 Display "PRESS FIRE TO CONTINUE" window and wait for fire to be pressed and return
26807 XOR A Reset player-attribute-update flag (player attribute ignore mode)...
26808 LD (23705),A ...
26811 RET Return
26812 LD A,1 Set player-attribute-update flag (player attribute update mode)...
26814 JR 26808 ...and return
26816 CALL 35690 Play upward scale sound
26819 LD A,8 Draw window 8...
26821 CALL 34990 ...
26824 LD HL,38136 Point HL at "redefine keys window" text...
26827 CALL 34762 ...and print to screen
26830 JP 54647 Redefine keyboard controls
26833 CALL 26855 Clear stack and prepare to save data
26836 CALL 1218 Jump to ROM routine to save game data
26839 RET Return (to start of main game loop - see PUSH at 26862)
26840 CALL 26855 Clear stack and prepare to load data
26843 SCF Set carry flag as we are LOADing, not VERIFYing
26844 LD SP,22528 Set stack pointer to 22528
26847 CALL 1366 Jump to ROM routine to load game data
26850 LD SP,(23613) Restore stack pointer from 23613 (set to 26240 in routine at 26855)
26854 RET Return (to start of main game loop - see PUSH at 26862)
Prev: 26670 Up: Map Next: 26855