![]() |
Routines |
| Prev: 7262 | Up: Map | Next: 7325 |
|
Used by the routine at 64ED.
|
||||||||||||||
| BugCollision | 72F5 | LD HL,$5E6C | HL=State_Robbie_Active. | |||||||||||
| 72F8 | LD E,$00 | E=Default value 00 (no collision). | ||||||||||||
| 72FA | LD A,(HL) | A=State_Robbie_Active. | ||||||||||||
| 72FB | AND %00111111 | Keep only bits 0-5. | ||||||||||||
| 72FD | DEC A | Decrease A by one. | ||||||||||||
| 72FE | JR Z,BugCollision_X | If A is zero then jump to BugCollision_X. | ||||||||||||
| 7300 | DEC A | |||||||||||||
| 7301 | RET NZ | |||||||||||||
| BugCollision_X | 7302 | INC HL | A=State_Robbie_Pos_X. | |||||||||||
| 7303 | LD A,(HL) | |||||||||||||
| 7304 | SUB (IX+$01) | Robbie X position - bug X Position. | ||||||||||||
| 7307 | JP P,BugCollision_Test_X | Make sure we have a positive byte. | ||||||||||||
| 730A | NEG | |||||||||||||
| BugCollision_Test_X | 730C | CP $10 | Return if A >= 10. | |||||||||||
| 730E | RET NC | |||||||||||||
| 730F | INC HL | A=State_Robbie_Pos_Y. | ||||||||||||
|
This entry point is used by the routine at 7262.
|
||||||||||||||
| BugCollision_0 | 7310 | LD A,(HL) | } | |||||||||||
| 7311 | SUB (IX+$02) | Robbie Y position - bug Y position. | ||||||||||||
| 7314 | JP P,BugCollision_SetHeight | Set D to 12 if it's a positive number. | ||||||||||||
| 7317 | NEG | |||||||||||||
| 7319 | LD D,(IX+$07) | D=bug sprite height. | ||||||||||||
| 731C | JR BugCollision_Test_Y | Jump to BugCollision_Test_Y. | ||||||||||||
| BugCollision_SetHeight | 731E | LD D,$12 | D=12. | |||||||||||
| BugCollision_Test_Y | 7320 | CP D | Return if D >= A. | |||||||||||
| 7321 | RET NC | |||||||||||||
|
A collision has been detected.
|
||||||||||||||
| 7322 | LD E,$01 | E=01. | ||||||||||||
| 7324 | RET | Return. | ||||||||||||
| Prev: 7262 | Up: Map | Next: 7325 |