![]() |
Routines |
| Prev: 681A | Up: Map | Next: 68C3 |
|
Used by the routines at Display_Status and Initialise_Game.
Shows Menu_Control_Options and Menu_Skill_Options, reads the choice, and writes it to Control_Choice and Menu_Choice.
|
||||||||
| Handle_Menu | 686E | EXX | Switch to the shadow registers, and stash HL' on the stack. | |||||
| 686F | PUSH HL | |||||||
| 6870 | JR Draw_Control_Page | Jump to Draw_Control_Page. | ||||||
|
Replay the menu after a cancelled choice.
|
||||||||
| Replay_Menu | 6872 | LD A,$0F | Write 0F to *Status_Value. | |||||
| 6874 | LD ($EF84),A | |||||||
| 6877 | CALL Play_Briefing_Set | Call Play_Briefing_Set. | ||||||
|
Draw the first menu page.
|
||||||||
| Draw_Control_Page | 687A | CALL Clear_Work_Buffers | Call Clear_Work_Buffers. | |||||
| 687D | LD HL,$69A6 | Point HL at Menu_Control_Options. | ||||||
| 6880 | LD B,$05 | Set the row counter to 05 in B. | ||||||
| 6882 | CALL Print_Menu_Rows | Call Print_Menu_Rows. | ||||||
| 6885 | LD HL,$5848 | Point HL at 5848 (attribute buffer). | ||||||
| 6888 | CALL Fill_Menu_Highlight | Call Fill_Menu_Highlight. | ||||||
| 688B | CALL Read_Menu_Key | Call Read_Menu_Key. | ||||||
|
Replay if the wait timed out.
|
||||||||
| 688E | CP $FE | Jump to Replay_Menu if the choice is equal to FE. | ||||||
| 6890 | JR Z,Replay_Menu | |||||||
| 6892 | LD ($EFEC),A | Write the choice to *Menu_Store. | ||||||
|
Draw the second menu page.
|
||||||||
| 6895 | CALL Clear_Work_Buffers | Call Clear_Work_Buffers. | ||||||
| 6898 | LD HL,$69A6 | Point HL at Menu_Control_Options. | ||||||
| 689B | LD B,$01 | Set the row counter to 01 in B. | ||||||
| 689D | CALL Print_Menu_Rows | Call Print_Menu_Rows. | ||||||
| 68A0 | LD HL,$6A00 | Point HL at Menu_Skill_Options. | ||||||
| 68A3 | LD B,$04 | Set the row counter to 04 in B. | ||||||
| 68A5 | CALL Print_Menu_Rows | Call Print_Menu_Rows. | ||||||
| 68A8 | LD HL,$5848 | Point HL at 5848 (attribute buffer). | ||||||
| 68AB | CALL Fill_Menu_Highlight | Call Fill_Menu_Highlight. | ||||||
| 68AE | CALL Read_Menu_Key | Call Read_Menu_Key. | ||||||
|
Use option 00 if the wait timed out.
|
||||||||
| 68B1 | CP $FE | Jump to Store_Menu_Choice if the choice is not equal to FE. | ||||||
| 68B3 | JR NZ,Store_Menu_Choice | |||||||
| 68B5 | XOR A | Set the choice to 00. | ||||||
| 68B6 | CALL Highlight_Menu_Item | Call Highlight_Menu_Item. | ||||||
|
Store the chosen value.
|
||||||||
| Store_Menu_Choice | 68B9 | ADD A,A | Double the choice. | |||||
| 68BA | LD ($E1EE),A | Write the choice to *Control_Choice and *Menu_Choice. | ||||||
| 68BD | LD ($EF89),A | |||||||
| 68C0 | POP HL | Restore HL' from the stack. | ||||||
| 68C1 | EXX | Switch back. | ||||||
| 68C2 | RET | Return. | ||||||
| Prev: 681A | Up: Map | Next: 68C3 |