Prev: 34386 Up: Map Next: 34448
34406: Draw Menu Option
Used by the routines at RunTitleMenu and DrawMenuOptions.
Draws one option marker, in bright white if it is the selected option or in bright magenta otherwise.
Input
HL Pixel position of the option marker
DrawMenuOption 34406 LD B,67 Use bright magenta as the default attribute.
34408 LD A,(39524) Fetch the frame counter from FrameCounter.
34411 AND %00000100 Test bit 2.
34413 JR Z,DrawMenuOption_Fill Jump to DrawMenuOption_Fill if it is clear.
34415 LD A,H Turn the Y position into the option number in C.
34416 SUB 47
34418 LD C,A
34419 SRL C
34421 SRL C
34423 SRL C
34425 SRL C
34427 LD A,(62178) Fetch the selected option from TwoPlayerFlag.
34430 CP C Is this the selected option?
34431 JR NZ,DrawMenuOption_Fill Jump to DrawMenuOption_Fill if not.
34433 LD B,71 Use bright white for the selected option instead.
DrawMenuOption_Fill 34435 LD A,B Store the attribute in the data at DrawMenuOption_Attributes.
34436 LD (34447),A
34439 LD DE,34445 Use the attribute data.
34442 JP FillAttributes Jump to FillAttributes.
DrawMenuOption_Attributes 34445 DEFB 9,1,0
Prev: 34386 Up: Map Next: 34448