Prev: B3D5 Up: Map Next: B473
B43E: 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 B43E LD HL,$96B7 Point HL at the last seen options at PreviousGameOptions.
B441 LD A,($9692) Fetch the game options from GameOptions.
B444 CP (HL) Compare the game options with the last ones seen.
B445 LD ($96B7),A Store the game options as the last ones seen.
B448 CALL HandlerHallOfFame Check the hall of fame timer.
Handle flashing each selection.
B44B LD HL,$B498 Point HL at the attributes of the selections at GameSelection_Attributes.
B44E LD A,($9692) Fetch the game options from GameOptions.
B451 LD C,A Stash the game options in C.
There are two player options to choose from (1UP or 2UP game).
B452 LD B,$02 Set the number of player options in B to 02.
B454 AND %00000001 Keep only bit 0 (the player options).
B456 CALL HandlerMenuAttributeFlash Flash the selected player option.
B459 LD A,C Restore the game options to A.
B45A RRCA Rotate out the number of players bit.
B45B AND %00000011 Keep only bits 0-1 (the control options).
There are four control methods to choose from.
B45D LD B,$04 Set the number of control methods in B to 04.
B45F CALL HandlerMenuAttributeFlash Flash the selected control method.
B462 RET Return.
Selection flashing routine.
HandlerMenuAttributeFlash B463 AND A Jump to MenuAttributeUnset if this is not the selected option.
B464 JR NZ,MenuAttributeUnset
MenuAttributeSet B466 SET 7,(HL) Make the selection flash.
B468 JR MenuAttributeNext Jump to MenuAttributeNext.
HandlerMenuAttributeFlash_Loop B46A DEC A Decrease the selection counter by one.
B46B JR Z,MenuAttributeSet Jump to MenuAttributeSet if this is the selected option.
MenuAttributeUnset B46D RES 7,(HL) Stop the selection flashing.
MenuAttributeNext B46F INC HL Move onto the attribute of the next option.
B470 DJNZ HandlerMenuAttributeFlash_Loop Decrease the option counter by one and loop back to HandlerMenuAttributeFlash_Loop until all of the options have been done.
B472 RET Return.
Prev: B3D5 Up: Map Next: B473