![]() |
Routines |
| Prev: 8652 | Up: Map | Next: 8690 |
|
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.
|
||||||||
| DrawMenuOption | 8666 | LD B,$43 | Use bright magenta as the default attribute. | |||||
| 8668 | LD A,($9A64) | Fetch the frame counter from FrameCounter. | ||||||
| 866B | AND %00000100 | Test bit 2. | ||||||
| 866D | JR Z,DrawMenuOption_Fill | Jump to DrawMenuOption_Fill if it is clear. | ||||||
| 866F | LD A,H | Turn the Y position into the option number in C. | ||||||
| 8670 | SUB $2F | |||||||
| 8672 | LD C,A | |||||||
| 8673 | SRL C | |||||||
| 8675 | SRL C | |||||||
| 8677 | SRL C | |||||||
| 8679 | SRL C | |||||||
| 867B | LD A,($F2E2) | Fetch the selected option from TwoPlayerFlag. | ||||||
| 867E | CP C | Is this the selected option? | ||||||
| 867F | JR NZ,DrawMenuOption_Fill | Jump to DrawMenuOption_Fill if not. | ||||||
| 8681 | LD B,$47 | Use bright white for the selected option instead. | ||||||
| DrawMenuOption_Fill | 8683 | LD A,B | Store the attribute in the data at DrawMenuOption_Attributes. | |||||
| 8684 | LD ($868F),A | |||||||
| 8687 | LD DE,$868D | Use the attribute data. | ||||||
| 868A | JP FillAttributes | Jump to FillAttributes. | ||||||
| DrawMenuOption_Attributes | 868D | DEFB $09,$01,$00 | ||||||
| Prev: 8652 | Up: Map | Next: 8690 |