![]() |
Routines |
| Prev: B936 | Up: Map | Next: B97A |
|
Used by the routine at FindTilesOverlapped.
Looks for the record of the tile at a position of the planet, in the four records that are kept at GameEntry and then every 25 bytes, which are for the tile at the map position in MapPosition and the ones next to it. If none of them match, the address of an empty record is returned.
|
||||||||||||||||
| FindTileRecord | B946 | LD E,B | E=B. | |||||||||||||
| B947 | LD IX,$5B80 | The decryption routine. | ||||||||||||||
| B94B | LD BC,($CE57) | Fetch the word at MapPosition into BC. | ||||||||||||||
| B94F | CALL CompareTilePosition | Call CompareTilePosition. | ||||||||||||||
| B952 | RET Z | Return if the zero flag is set. | ||||||||||||||
| B953 | LD IX,$5BA5 | Use 5BA5. | ||||||||||||||
| B957 | INC B | Advance B. | ||||||||||||||
| B958 | CALL CompareTilePosition | Call CompareTilePosition. | ||||||||||||||
| B95B | RET Z | Return if the zero flag is set. | ||||||||||||||
| B95C | LD IX,$5BEF | Use 5BEF. | ||||||||||||||
| B960 | INC C | Advance C. | ||||||||||||||
| B961 | LD A,C | A=C. | ||||||||||||||
| B962 | CP $60 | Jump to FindTileRecord_Column if A is not 60. | ||||||||||||||
| B964 | JR NZ,FindTileRecord_Column | |||||||||||||||
| B966 | LD C,$00 | Clear C. | ||||||||||||||
| FindTileRecord_Column | B968 | CALL CompareTilePosition | Call CompareTilePosition. | |||||||||||||
| B96B | RET Z | Return if the zero flag is set. | ||||||||||||||
| B96C | DEC B | Step B back. | ||||||||||||||
| B96D | LD IX,$5BCA | Use 5BCA. | ||||||||||||||
| B971 | CALL CompareTilePosition | Call CompareTilePosition. | ||||||||||||||
| B974 | RET Z | Return if the zero flag is set. | ||||||||||||||
| B975 | LD IX,$B944 | The shot frame records. | ||||||||||||||
| B979 | RET | Return. | ||||||||||||||
| Prev: B936 | Up: Map | Next: B97A |