Prev: 37298 Up: Map Next: 37336
37314: In-Game: Update Cursor Position
Used by the routines at InGameControls, InGame_MoveCursor and InGame_Select.
Input
B Attribute value
InGame_UpdateCursorPosition 37314 LD A,(37336) A=*InGame_HighlightedOption.
37317 LD HL,23223 Set the start attribute buffer location in HL.
37320 LD DE,10 Set the width of each section in DE.
37323 INC A Increment A by one for the loop below.
Add 0010 to the attribute buffer pointer for each digit of the position.
UpdateCursorPosition_Loop 37324 ADD HL,DE HL+=0010.
37325 DEC A Decrease A by one.
37326 JR NZ,UpdateCursorPosition_Loop Jump to UpdateCursorPosition_Loop until A is zero.
Now colour the cursor attribute. The position is now held in HL.
37328 LD A,B A=attribute value.
This entry point is used by the routine at HandlerRaising.
UpdateCursorAttribute 37329 LD B,10 Set the width count in B.
UpdateCursorAttribute_Loop 37331 LD (HL),A Write the attribute value to *HL.
37332 INC HL Increment HL by one.
37333 DJNZ UpdateCursorAttribute_Loop Decrease the width counter by one and loop back to UpdateCursorAttribute_Loop until the whole cursor position has been painted.
37335 RET Return.
Prev: 37298 Up: Map Next: 37336