Prev: 44581 Up: Map Next: 44647
44589: Update Packet Marker
Used by the routine at MainLoop.
Shows the position of the program packet on the map of the sectors. The marker is drawn with XOR, so the old marker is removed by drawing it again. Nothing is done if the packet has not moved.
UpdatePacketMarker 44589 LD A,(38476) Fetch the X cell where the marker was drawn last...
44592 LD D,A ...and keep it in D.
44593 LD A,(38477) Fetch the Y cell...
44596 LD H,A ...and keep it in H.
44597 LD A,(38478) Fetch the flag that says whether there was a marker.
44600 AND A Jump if there was not.
44601 JR Z,UpdatePacketMarker_Draw
44603 LD A,(38768) Fetch the type of the packet.
44606 AND A Jump to remove the old marker if there is no packet now.
44607 JR Z,UpdatePacketMarker_Remove
44609 LD A,(38770) Fetch the X cell of the packet.
44612 CP D Jump to remove the old marker if the packet has moved in the X direction.
44613 JR NZ,UpdatePacketMarker_Remove
44615 LD A,(38772) Fetch the Y cell of the packet.
44618 CP H Return if the packet has not moved.
44619 RET Z
UpdatePacketMarker_Remove 44620 CALL ToggleMarker Remove the old marker using ToggleMarker.
UpdatePacketMarker_Draw 44623 LD A,(38770) Fetch the X cell of the packet...
44626 LD (38476),A ...and store it...
44629 LD D,A ...and keep it in D.
44630 LD A,(38772) Fetch the Y cell of the packet...
44633 LD (38477),A ...and store it...
44636 LD H,A ...and keep it in H.
44637 LD A,(38768) Fetch the type of the packet.
44640 AND A Store the flag that says whether there is a marker...
44641 LD (38478),A
44644 RET Z ...and return if there is not.
44645 JR ToggleMarker Jump to ToggleMarker.
Prev: 44581 Up: Map Next: 44647