Prev: 91B2 Up: Map Next: 91D8
91C2: In-Game: Update Cursor Position
Used by the routines at InGameControls, InGame_MoveCursor and InGame_Select.
Input
B Attribute value
InGame_UpdateCursorPosition 91C2 LD A,($91D8) A=*InGame_HighlightedOption.
91C5 LD HL,$5AB7 Set the start attribute buffer location in HL.
91C8 LD DE,$000A Set the width of each section in DE.
91CB INC A Increment A by one for the loop below.
Add 000A to the attribute buffer pointer for each digit of the position.
UpdateCursorPosition_Loop 91CC ADD HL,DE HL+=000A.
91CD DEC A Decrease A by one.
91CE JR NZ,UpdateCursorPosition_Loop Jump to UpdateCursorPosition_Loop until A is zero.
Now colour the cursor attribute. The position is now held in HL.
91D0 LD A,B A=attribute value.
This entry point is used by the routine at HandlerRaising.
UpdateCursorAttribute 91D1 LD B,$0A Set the width count in B.
UpdateCursorAttribute_Loop 91D3 LD (HL),A Write the attribute value to *HL.
91D4 INC HL Increment HL by one.
91D5 DJNZ UpdateCursorAttribute_Loop Decrease the width counter by one and loop back to UpdateCursorAttribute_Loop until the whole cursor position has been painted.
91D7 RET Return.
Prev: 91B2 Up: Map Next: 91D8