Prev: 53978 Up: Map Next: 54019
53985: Test Bottom Row
Used by the routine at DrawTerrain.
Tests the vertical extent of a segment of a tile in the bottom row against the vertical position in B.
Input
B Vertical position to test against
IX Address of the record of the segment
Output
F Zero if the segment reaches the position or goes beyond it
TestBottomRow 53985 LD A,(52791) The vertical step.
53988 AND A Jump to TestBottomRow_Sloped if A is not zero.
53989 JR NZ,TestBottomRow_Sloped
53991 LD A,(52804) The segment row.
53994 SUB 4 Subtract 4 from A.
53996 JR TestBottomRow_Compare Jump to TestBottomRow_Compare.
TestBottomRow_Sloped 53998 LD A,(52825) The horizontal step copy.
54001 AND A Jump to TestBottomRow_Direction if A is not zero.
54002 JR NZ,TestBottomRow_Direction
54004 LD A,(IX+1) Read offset 1 of IX.
54007 SUB (IX+3) Subtract the byte at offset 3 of IX from A.
54010 JR TestBottomRow_Compare Jump to TestBottomRow_Compare.
TestBottomRow_Direction 54012 LD A,(IX+3) Read offset 3 of IX.
TestBottomRow_Compare 54015 CP B Return if A is B or more.
54016 RET NC
54017 XOR A Clear A.
54018 RET Return.
Prev: 53978 Up: Map Next: 54019