Prev: D292 Up: Map Next: D2DA
D2C0: 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 D2C0 LD A,($CE59) The horizontal step copy.
D2C3 AND A Jump to TestRightColumn_Start if A is zero.
D2C4 JR Z,TestRightColumn_Start
D2C6 LD A,($E41B) The slope direction.
D2C9 CP $FF Jump to TestRightColumn_Start if A is FF.
D2CB JR Z,TestRightColumn_Start
D2CD LD A,(IX+$02) Read offset 02 of IX.
D2D0 DEC A Step A back.
D2D1 JR TestRightColumn_Compare Jump to TestRightColumn_Compare.
TestRightColumn_Start D2D3 LD A,($CE43) The segment column.
TestRightColumn_Compare D2D6 CP B Return if A is B or more.
D2D7 RET NC
D2D8 XOR A Clear A.
D2D9 RET Return.
Prev: D292 Up: Map Next: D2DA