Prev: 35386 Up: Map Next: 35459
35397: Move hand cursor up and update menu item highlighting
Used by the routine at 35296.
35397 LD A,(23479) Load menu hand cursor's current y-coordinate into A
35400 OR A If coordinate is zero...
35401 JP Z,35365 ...then jump to 35365 (return to menu input handling routine)
35404 LD (23478),A Store y-coordinate (pixels) at 23478
35407 PUSH AF Store AF (A = menu hand cursor's y-coordinate, in pixels)
35408 ADD A,5 Add five (as the "finger" of the cursor naturally points five pixels below the cursor's actual position)
35410 RRCA Divide this new y-coordinate by eight to get y-coordinate in characters...
35411 RRCA ...
35412 RRCA ...
35413 AND 31 ...
35415 LD C,A Load this y-coordinate into C
35416 POP AF Restore AF (A = menu hand cursor's y-coordinate, in pixels)
35417 DEC A Decrease y-coordinate (pixels) by two...
35418 DEC A ...
35419 LD (23479),A Store new y-coordinate (in pixels)
35422 PUSH BC Store BC (C = y-coordinate, in characters and before move, of menu hand cursor's finger)
35423 CALL 55401 Scroll a region of the display file up two pixel rows without wrapping...
35426 CALL 55401 ...
This entry point is used by the routine at 35459.
35429 POP BC Restore BC (C = y-coordinate, in characters and before move, of menu hand cursor's finger)
35430 LD A,(23479) Load menu hand cursor's new y-coordinate (in pixels) into A
35433 ADD A,5 Add five (as the "finger" of the cursor naturally points five pixels below the cursor's actual position)
35435 RRCA Divide this new y-coordinate by eight to get y-coordinate in characters...
35436 RRCA ...
35437 RRCA ...
35438 AND 31 ...
35440 CP C If new y-coordinate of menu hand cursor (in characters) is the same as its previous y-coordinate...
35441 JP Z,35365 ...then jump to 35365 (return to menu input handling routine)
35444 LD A,(23478) Load A with previous y-coordinate in pixels...
35447 CALL 35525 ...and invert INK and PAPER bits to remove highlighting at this location
35450 LD A,(23479) Load A with new y-coordinate in pixels...
35453 CALL 35525 and invert INK and PAPER bits to apply highlighting at this location
35456 JP 35365 Jump to 35365 (return to menu input handling routine)
Prev: 35386 Up: Map Next: 35459