| Prev: 73DD | Up: Map | Next: 7441 |
7415: Handle helicopter missile collision
|
Called by the sprite renderer's pixel collision when the missile's $FF byte overlaps solid screen pixels (bank or island terrain). Checks whether the overlap is actually the player plane; if not, clears the missile.
|
||||
| handle_collision_mode_helicopter_missile | 7415 | LD BC,($5F73) | Load missile coords. If Y bit 7 clear, clear missile and return. | |
| 7419 | BIT 7,B | |||
| 741B | JP Z,handle_collision_mode_missile_miss | Clear Y bit 7, check if Y-8 is negative (missile above screen). | ||
| 741E | RES 7,B | |||
| 7420 | LD A,B | |||
| 7421 | SUB $08 | |||
| 7423 | JP P,handle_collision_mode_missile_miss | Compare missile X with player X (from state_plane_x). If match, player hit. | ||
| 7426 | LD A,($5F72) | |||
| 7429 | AND $F8 | |||
| 742B | CP C | |||
| 742C | JP Z,handle_player_death | |||
| 742F | ADD A,$08 | Check adjacent X position. If match, player hit. | ||
| 7431 | CP C | |||
| 7432 | JP Z,handle_player_death | |||
| handle_collision_mode_missile_miss | 7435 | LD BC,$0000 | Clear missile coords, pop 4 return addresses, return. | |
| 7438 | LD ($5F73),BC | |||
| 743C | POP DE | |||
| 743D | POP DE | |||
| 743E | POP DE | |||
| 743F | POP DE | |||
| 7440 | RET | |||
| Prev: 73DD | Up: Map | Next: 7441 |