Prev: 37689 Up: Map Next: 37880
37764: Display and handle Gadget X menu
Used by the routines at 37689 and 43494.
Input
IY 23610
37764 LD A,11 Set y-coordinate of top edge (characters) of window 7 to 11...
37766 LD (49092),A ...
37769 LD A,7 Load A with index of redefine-the-game window
37771 CALL 47185 ...and draw
37774 LD HL,50449 Point HL at Gadget X menu text...
37777 CALL 46902 ...and print
37780 CALL 47897 Play upward scale sound
37783 CALL 47502 Process keyboard / joystick input on a menu and load A with selected item index
37786 OR A If REDEFINE KEYBOARD selected...
37787 JP Z,37824 ...then skip ahead to 37824
37790 CP 1 If PLAYER ATTRIBUTE IGNORE selected...
37792 JR Z,37815 ...then skip ahead to 37815
37794 CP 2 If PLAYER ATTRIBUTE UPDATE selected...
37796 JR Z,37820 ...then skip ahead to 37820
37798 CP 5 If DO NOTHING selected...
37800 RET Z ...then return
37801 BIT 0,(IY+65) If game-in-progress flag is reset...
37805 JR Z,37863 ...then skip ahead to 37863
37807 CP 3 If SAVE THE GAME selected...
37809 JR Z,37841 ...then skip ahead to 37841
37811 CP 4 If LOAD AN OLD GAME selected...
37813 JR Z,37848 ...then skip ahead to 37848
37815 XOR A Reset player-attribute-update flag (player attribute ignore mode)...
37816 LD (23706),A ...
37819 RET Return
37820 LD A,1 Set player-attribute-update flag (player attribute update mode)...
37822 JR 37816 ...and return
37824 CALL 47897 Play upward scale sound
37827 LD A,8 Draw window 8...
37829 CALL 47193 ...
37832 LD HL,50513 Point HL at "redefine keys window" text...
37835 CALL 46902 ...and print to screen
37838 JP 63740 Redefine keyboard controls
37841 CALL 37880 Clear stack and prepare to save data
37844 CALL 1218 Jump to ROM routine to save game data
37847 RET Return (to start of main game loop - see PUSH at 37887)
37848 CALL 37880 Clear stack and prepare to load data
37851 SCF Set carry flag as we are LOADing, not VERIFYing
37852 LD SP,22528 Set stack pointer to 22528
37855 CALL 1366 Jump to ROM routine to load game data
37858 LD SP,(23613) Restore stack pointer from 23613 (set to 23808 in routine at 37880)
37862 RET Return (to start of main game loop - see PUSH at 37887)
37863 LD A,5 Draw window 5...
37865 CALL 47193 ...
37868 LD HL,50594 Point HL at "SAVE & LOAD ARE NOT ALLOWED HERE..." text...
37871 CALL 46902 ...and print to screen
37874 CALL 47897 Play upward scale sound
37877 JP 64230 Wait for interrupt then display "PRESS FIRE TO CONTINUE" window and wait for fire to be pressed and return
Prev: 37689 Up: Map Next: 37880