Prev: 55040 Up: Map Next: 55081
55057: Finish Step
Finishes the drawing of a step. The screen address that the drawing has reached is stored in SegmentScreenAddress (at FinishStep only), the number of steps drawn is counted and the next step of the segment is started, until the segment has no steps left.
Input
HL Screen address
FinishStep 55057 LD (52809),HL Update the segment screen address.
This entry point is used by the routine at DrawFlatRows.
FinishStep_Exchange 55060 EXX Switch to the alternate registers.
55061 INC D Advance D.
This entry point is used by the routines at NoteWallContact and SetUpFlatPiece.
FinishStep_Count 55062 LD A,(23599) The flagged steps.
55065 INC A Advance A.
55066 LD (23599),A Update the flagged steps.
55069 LD A,(52820) The steps already drawn.
55072 INC A Advance A.
55073 LD (52820),A Update the steps already drawn.
This entry point is used by the routines at CountVerticalContact, FlagLeftContact, FlagRightContact, NextStep and SetUpFlatPiece.
FinishStep_Next 55076 INC HL Advance HL.
55077 DEC C Step C back.
55078 JP NZ,NextStep Jump to NextStep if the zero flag is clear.
Continue on to EndSegment.
Prev: 55040 Up: Map Next: 55081