![]() |
Routines |
| Prev: D0BD | Up: Map | Next: D2C0 |
|
Used by the routine at DrawTerrain.
Tests the right end of a segment of a tile in the left column against the horizontal position in B.
|
||||||||||||||
| TestLeftColumn | D292 | LD A,($CE37) | The vertical step. | |||||||||||
| D295 | AND A | Jump to TestLeftColumn_Sloped if A is not zero. | ||||||||||||
| D296 | JR NZ,TestLeftColumn_Sloped | |||||||||||||
| D298 | LD A,(IX+$00) | Read offset 00 of IX. | ||||||||||||
| D29B | ADD A,(IX+$02) | Add the byte at offset 02 of IX to A. | ||||||||||||
| D29E | JR TestLeftColumn_Compare | Jump to TestLeftColumn_Compare. | ||||||||||||
| TestLeftColumn_Sloped | D2A0 | LD A,($CE59) | The horizontal step copy. | |||||||||||
| D2A3 | AND A | Jump to TestLeftColumn_Direction if A is not zero. | ||||||||||||
| D2A4 | JR NZ,TestLeftColumn_Direction | |||||||||||||
| D2A6 | LD A,($CE43) | The segment column. | ||||||||||||
| D2A9 | ADD A,$08 | Add 08 to A. | ||||||||||||
| D2AB | JR TestLeftColumn_Compare | Jump to TestLeftColumn_Compare. | ||||||||||||
| TestLeftColumn_Direction | D2AD | LD A,($E41B) | The slope direction. | |||||||||||
| D2B0 | CP $01 | Jump to TestLeftColumn_Start if A is 01. | ||||||||||||
| D2B2 | JR Z,TestLeftColumn_Start | |||||||||||||
| D2B4 | LD A,(IX+$02) | Read offset 02 of IX. | ||||||||||||
| D2B7 | JR TestLeftColumn_Compare | Jump to TestLeftColumn_Compare. | ||||||||||||
| TestLeftColumn_Start | D2B9 | LD A,(IX+$00) | Read offset 00 of IX. | |||||||||||
| TestLeftColumn_Compare | D2BC | CP B | Return if A is less than B. | |||||||||||
| D2BD | RET C | |||||||||||||
| D2BE | XOR A | Clear A. | ||||||||||||
| D2BF | RET | Return. | ||||||||||||
| Prev: D0BD | Up: Map | Next: D2C0 |