Prev: 53906 Up: Map Next: 53978
53952: Test Right Column
Used by the routine at DrawTerrain.
Tests the left end of a segment of a tile in the right column against the horizontal position in B.
Input
B Horizontal position to test against
IX Address of the record of the segment
Output
F Zero if the start of the segment is at the position or before it
TestRightColumn 53952 LD A,(52825) The horizontal step copy.
53955 AND A Jump to TestRightColumn_Start if A is zero.
53956 JR Z,TestRightColumn_Start
53958 LD A,(58395) The slope direction.
53961 CP 255 Jump to TestRightColumn_Start if A is 255.
53963 JR Z,TestRightColumn_Start
53965 LD A,(IX+2) Read offset 2 of IX.
53968 DEC A Step A back.
53969 JR TestRightColumn_Compare Jump to TestRightColumn_Compare.
TestRightColumn_Start 53971 LD A,(52803) The segment column.
TestRightColumn_Compare 53974 CP B Return if A is B or more.
53975 RET NC
53976 XOR A Clear A.
53977 RET Return.
Prev: 53906 Up: Map Next: 53978