Prev: CE5A Up: Map Next: CE79
CE5B: 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 CE5B LD A,($5C1D) The tile number.
CE5E BIT 0,A Jump to CountVerticalContact_Count if bit 0 of A is set.
CE60 JR NZ,CountVerticalContact_Count
CE62 LD A,($CE37) The vertical step.
CE65 AND A Jump to CountVerticalContact_Count if A is zero.
CE66 JR Z,CountVerticalContact_Count
CE68 LD C,$01 C=01.
CountVerticalContact_Count CE6A LD A,($CE54) The steps already drawn.
CE6D INC A Advance A.
CE6E LD ($CE54),A Update the steps already drawn.
CE71 CP $01 Call NoteSegmentStart if A is 01.
CE73 CALL Z,NoteSegmentStart
CE76 JP FinishStep_Next Jump to FinishStep_Next.
Prev: CE5A Up: Map Next: CE79