![]() |
Routines |
| Prev: D2DA | Up: Map | Next: D303 |
|
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.
|
||||||||||||||
| TestBottomRow | D2E1 | LD A,($CE37) | The vertical step. | |||||||||||
| D2E4 | AND A | Jump to TestBottomRow_Sloped if A is not zero. | ||||||||||||
| D2E5 | JR NZ,TestBottomRow_Sloped | |||||||||||||
| D2E7 | LD A,($CE44) | The segment row. | ||||||||||||
| D2EA | SUB $04 | Subtract 04 from A. | ||||||||||||
| D2EC | JR TestBottomRow_Compare | Jump to TestBottomRow_Compare. | ||||||||||||
| TestBottomRow_Sloped | D2EE | LD A,($CE59) | The horizontal step copy. | |||||||||||
| D2F1 | AND A | Jump to TestBottomRow_Direction if A is not zero. | ||||||||||||
| D2F2 | JR NZ,TestBottomRow_Direction | |||||||||||||
| D2F4 | LD A,(IX+$01) | Read offset 01 of IX. | ||||||||||||
| D2F7 | SUB (IX+$03) | Subtract the byte at offset 03 of IX from A. | ||||||||||||
| D2FA | JR TestBottomRow_Compare | Jump to TestBottomRow_Compare. | ||||||||||||
| TestBottomRow_Direction | D2FC | LD A,(IX+$03) | Read offset 03 of IX. | |||||||||||
| TestBottomRow_Compare | D2FF | CP B | Return if A is B or more. | |||||||||||
| D300 | RET NC | |||||||||||||
| D301 | XOR A | Clear A. | ||||||||||||
| D302 | RET | Return. | ||||||||||||
| Prev: D2DA | Up: Map | Next: D303 |