Prev: 56582 Up: Map Next: 56665
56606: Check bullet collision with landscape
Used by the routine at CHECK_ALL_BULLETS_LANDSCAPE_COLLISION.
Input
This routine might handle collision detection
IX points at current bullet data
CHECK_BULLET_LANDSCAPE_COLLISION 56606 LD A,(IX+0)
56609 RRA
56610 RRA
56611 AND 7
56613 LD C,A
56614 LD A,(59786)
56617 LD B,A
56618 LD A,(IX+1)
56621 ADD A,B
56622 SUB 3
56624 SLA A
56626 AND 120
56628 OR C
56629 LD C,A
56630 LD B,0
56632 LD HL,60229 Point HL at VISIBLE_TILE_MAP
56635 ADD HL,BC
56636 LD A,(HL)
56637 CP 127 Check for empty tile
56639 JP Z,CHECK_BULLET_LANDSCAPE_COLLISION_0 Empty tile, skip ahead to move bullet right
56642 LD (IX+2),255 Disable current bullet
56646 CALL L56665
CHECK_BULLET_LANDSCAPE_COLLISION_0 56649 LD A,(IX+1) Move the current bullet 3 units to the right
56652 ADD A,3
56654 LD (IX+1),A
56657 CP 64 If the bullet's X position reaches 64...
56659 RET C
56660 LD (IX+2),255 Disable current bullet
56664 RET
Prev: 56582 Up: Map Next: 56665