![]() |
Routines |
| Prev: 53095 | Up: Map | Next: 53189 |
|
Used by the routines at CheckWallHorizontal and CheckWallHorizontalReverse.
Checks whether an object touches any wall rectangle in the cell containing a point. The list for the cell is found from WallRectanglePointers. The vertical range is checked first.
|
||||||||||||||||||
|
Find the cell and its rectangle list.
|
||||||||||||||||||
| CheckWallsVerticalFirst | 53153 | CALL FindPositionInCell | Call FindPositionInCell. | |||||||||||||||
| 53156 | LD BC,24913 | Point BC at WallRectanglePointers. | ||||||||||||||||
| 53159 | CALL GetTableEntry | Call GetTableEntry. | ||||||||||||||||
| 53162 | PUSH HL | Copy the rectangle list to IY (using the stack). | ||||||||||||||||
| 53163 | POP IY | |||||||||||||||||
|
Test the next rectangle.
|
||||||||||||||||||
| CheckWallsVerticalFirst_Next | 53165 | LD A,(IY+0) | Return if this is the end of the list. | |||||||||||||||
| 53168 | AND A | |||||||||||||||||
| 53169 | RET Z | |||||||||||||||||
| 53170 | CALL CheckOverlapAlongY | Call CheckOverlapAlongY. | ||||||||||||||||
| 53173 | JR NC,CheckWallsVerticalFirst_Skip | Jump to CheckWallsVerticalFirst_Skip if the object is not touching the rectangle. | ||||||||||||||||
| 53175 | CALL CheckOverlapAlongX | Call CheckOverlapAlongX. | ||||||||||||||||
| 53178 | RET C | Return if the object is touching the rectangle. | ||||||||||||||||
|
Move on to the next rectangle.
|
||||||||||||||||||
| CheckWallsVerticalFirst_Skip | 53179 | INC IY | Move on to the next rectangle. | |||||||||||||||
| 53181 | INC IY | |||||||||||||||||
| 53183 | INC IY | |||||||||||||||||
| 53185 | INC IY | |||||||||||||||||
| 53187 | JR CheckWallsVerticalFirst_Next | Jump to CheckWallsVerticalFirst_Next. | ||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||
| Prev: 53095 | Up: Map | Next: 53189 |