| Prev: 7104 | Up: Map | Next: 7128 |
7113: Advance left-facing ship or helicopter
|
Moves a left-facing ship/helicopter 2 pixels left, checking for terrain collision.
|
||||||||||||
| ship_or_helicopter_left_advance | 7113 | PUSH BC | Save BC, calculate terrain check position: C -= 16 pixels. | |||||||||
| 7114 | LD A,C | |||||||||||
| 7115 | SUB $10 | |||||||||||
| 7117 | LD C,A | |||||||||||
| 7118 | CALL calculate_pixel_address | Get terrain byte at (C, B). Load result into A. | ||||||||||
| 711B | LD A,(HL) | |||||||||||
| 711C | POP BC | Restore BC. If terrain != 0, reverse direction. | ||||||||||
| 711D | CP $00 | |||||||||||
| 711F | CALL NZ,reverse_enemy_direction | |||||||||||
| 7122 | LD ($8B0A),BC | Store position to previous_object_coordinates. Advance X position left by 2 pixels (DEC C twice). | ||||||||||
| 7126 | DEC C | |||||||||||
| 7127 | DEC C | |||||||||||
| Prev: 7104 | Up: Map | Next: 7128 |