Prev: 52826 Up: Map Next: 52857
52827: Count Vertical Contact
Used by the routine at NextStep.
Used when the ship touches the top or bottom of a segment. On the top row of tiles a vertical segment is made to end at the next step. The count of steps drawn is increased, and when it is the first the start of the segment is noted with NoteSegmentStart. The routine then carries on with the next step at FinishStep_Next.
CountVerticalContact 52827 LD A,(23581) The tile number.
52830 BIT 0,A Jump to CountVerticalContact_Count if bit 0 of A is set.
52832 JR NZ,CountVerticalContact_Count
52834 LD A,(52791) The vertical step.
52837 AND A Jump to CountVerticalContact_Count if A is zero.
52838 JR Z,CountVerticalContact_Count
52840 LD C,1 C=1.
CountVerticalContact_Count 52842 LD A,(52820) The steps already drawn.
52845 INC A Advance A.
52846 LD (52820),A Update the steps already drawn.
52849 CP 1 Call NoteSegmentStart if A is 1.
52851 CALL Z,NoteSegmentStart
52854 JP FinishStep_Next Jump to FinishStep_Next.
Prev: 52826 Up: Map Next: 52857