![]() |
Routines |
| Prev: ED93 | Up: Map | Next: EDDD |
|
Used by the routine at Display_High_Score_Entry_Screen.
Adjusts the cursor within a score entry digit field. Searches for the current column position in the character table at IX via Search_Score_Entry_Table; if found and within range, updates E to the new column, calculates the attribute address via Calculate_Attr_Cell_Address, writes highlight attributes for both the old and new cursor positions via Highlight_Score_Entry_Row, then fills the column bytes for the updated field.
|
||||||||||||||||
| Adjust_Score_Field_Cursor | EDAA | PUSH IX | Copy the character table pointer from IX to HL. | |||||||||||||
| EDAC | POP HL | |||||||||||||||
| EDAD | LD A,E | Load the current cursor column from E. | ||||||||||||||
| EDAE | PUSH BC | Stash the field count on the stack and search for the current column in the table via Search_Score_Entry_Table. | ||||||||||||||
| EDAF | CALL Search_Score_Entry_Table | |||||||||||||||
| EDB2 | POP BC | Restore the field count from the stack. | ||||||||||||||
| EDB3 | RET NZ | Return if the current position is not found in the table. | ||||||||||||||
| EDB4 | INC HL | Load the next cursor position from the table and check it against the upper bound in D. | ||||||||||||||
| EDB5 | LD A,(HL) | |||||||||||||||
| EDB6 | CP D | |||||||||||||||
| EDB7 | RET Z | Return if the cursor is already at its maximum. | ||||||||||||||
| EDB8 | LD E,A | Update the cursor column in E. | ||||||||||||||
| EDB9 | INC HL | Advance and load the screen position byte from the table entry. | ||||||||||||||
| EDBA | LD A,(HL) | |||||||||||||||
| EDBB | PUSH DE | Stash the cursor state on the stack and calculate the new attribute cell address via Calculate_Attr_Cell_Address. | ||||||||||||||
| EDBC | CALL Calculate_Attr_Cell_Address | |||||||||||||||
| EDBF | POP DE | Restore the cursor state from the stack. | ||||||||||||||
| EDC0 | CALL Highlight_Score_Entry_Row | Write the highlight attributes for the new cursor position via Highlight_Score_Entry_Row. | ||||||||||||||
| EDC3 | PUSH IX | Reload the character table pointer from IX to HL. | ||||||||||||||
| EDC5 | POP HL | |||||||||||||||
| EDC6 | INC HL | Advance to the second table entry. | ||||||||||||||
| EDC7 | LD A,D | Load the upper bound from D and search for it in the table via Search_Score_Entry_Table. | ||||||||||||||
| EDC8 | CALL Search_Score_Entry_Table | |||||||||||||||
| EDCB | INC HL | Advance and load the screen position byte from the table entry. | ||||||||||||||
| EDCC | LD A,(HL) | |||||||||||||||
| EDCD | PUSH DE | Stash the cursor state on the stack and calculate the previous attribute cell address via Calculate_Attr_Cell_Address. | ||||||||||||||
| EDCE | CALL Calculate_Attr_Cell_Address | |||||||||||||||
| EDD1 | POP DE | Restore the cursor state from the stack. | ||||||||||||||
| EDD2 | INC HL | Advance past the table position bytes. | ||||||||||||||
| EDD3 | INC HL | |||||||||||||||
| EDD4 | LD B,$1C | Set the attribute fill count to 1C. | ||||||||||||||
| Score_Field_Fill_Loop | EDD6 | LD (HL),C | Write the cursor colour to each attribute cell and loop until 1C cells are filled. | |||||||||||||
| EDD7 | INC HL | |||||||||||||||
| EDD8 | DJNZ Score_Field_Fill_Loop | |||||||||||||||
| EDDA | LD D,E | Copy the updated cursor column from E to D. | ||||||||||||||
| EDDB | XOR A | Clear A and return to signal the field was updated. | ||||||||||||||
| EDDC | RET | |||||||||||||||
| Prev: ED93 | Up: Map | Next: EDDD |