Prev: 46037 Up: Map Next: 46195
46142: Update Game Menu
Used by the routine at HandlerGameMenu.
Called when the selections on the game selection menu may have changed. Records the selections in PreviousGameOptions and counts down to the hall of fame (see HandlerHallOfFame) and then makes the two selected options (the number of players and the controls) flash, and the others not.
Before
update-menu-before
After HallOfFameCheck
update-menu-after
HallOfFameCheck 46142 LD HL,38583 Point HL at the last seen options at PreviousGameOptions.
46145 LD A,(38546) Fetch the game options from GameOptions.
46148 CP (HL) Compare the game options with the last ones seen.
46149 LD (38583),A Store the game options as the last ones seen.
46152 CALL HandlerHallOfFame Check the hall of fame timer.
Handle flashing each selection.
46155 LD HL,46232 Point HL at the attributes of the selections at GameSelection_Attributes.
46158 LD A,(38546) Fetch the game options from GameOptions.
46161 LD C,A Stash the game options in C.
There are two player options to choose from (1UP or 2UP game).
46162 LD B,2 Set the number of player options in B to 2.
46164 AND %00000001 Keep only bit 0 (the player options).
46166 CALL HandlerMenuAttributeFlash Flash the selected player option.
46169 LD A,C Restore the game options to A.
46170 RRCA Rotate out the number of players bit.
46171 AND %00000011 Keep only bits 0-1 (the control options).
There are four control methods to choose from.
46173 LD B,4 Set the number of control methods in B to 4.
46175 CALL HandlerMenuAttributeFlash Flash the selected control method.
46178 RET Return.
Selection flashing routine.
HandlerMenuAttributeFlash 46179 AND A Jump to MenuAttributeUnset if this is not the selected option.
46180 JR NZ,MenuAttributeUnset
MenuAttributeSet 46182 SET 7,(HL) Make the selection flash.
46184 JR MenuAttributeNext Jump to MenuAttributeNext.
HandlerMenuAttributeFlash_Loop 46186 DEC A Decrease the selection counter by one.
46187 JR Z,MenuAttributeSet Jump to MenuAttributeSet if this is the selected option.
MenuAttributeUnset 46189 RES 7,(HL) Stop the selection flashing.
MenuAttributeNext 46191 INC HL Move onto the attribute of the next option.
46192 DJNZ HandlerMenuAttributeFlash_Loop Decrease the option counter by one and loop back to HandlerMenuAttributeFlash_Loop until all of the options have been done.
46194 RET Return.
Prev: 46037 Up: Map Next: 46195