ChronosMM | Routines |
Prev: 57801 | Up: Map | Next: 57886 |
Used by the routine at MOVE_ALL_UP_BULLETS.
|
||||||||
MOVE_UP_BULLET | 57820 | LD A,(IX+2) | ||||||
57823 | CP 255 | |||||||
57825 | RET Z | Return if bullet is disabled | ||||||
57826 | DEC (IX+0) | Move bullet left | ||||||
57829 | LD A,(IX+0) | |||||||
57832 | CP 255 | |||||||
57834 | JR Z,DISABLE_UP_BULLET | If the bullet is too far left, go to DISABLE_UP_BULLET to disable it | ||||||
57836 | LD A,(59786) | Get value at L59786 | ||||||
57839 | RRA | |||||||
57840 | JP C,COLLIDE_UP_BULLET_SCENERY | If bit 0 was set, skip ahead to COLLIDE_UP_BULLET_SCENERY | ||||||
57843 | DEC (IX+1) | Move bullet up | ||||||
57846 | LD A,(IX+1) | |||||||
57849 | CP 2 | |||||||
57851 | JR Z,DISABLE_UP_BULLET | If the bullet is too far up, go to DISABLE_UP_BULLET | ||||||
COLLIDE_UP_BULLET_SCENERY | 57853 | LD A,(IX+0) | Get X position of bullet | |||||
57856 | RRA | |||||||
57857 | AND 7 | |||||||
57859 | LD C,A | |||||||
57860 | LD A,(IX+1) | |||||||
57863 | SUB 3 | |||||||
57865 | RLA | |||||||
57866 | RLA | |||||||
57867 | AND 120 | |||||||
57869 | OR C | |||||||
57870 | LD C,A | |||||||
57871 | LD B,0 | |||||||
57873 | LD HL,60237 | Point HL at the second column of VISIBLE_TILE_MAP | ||||||
57876 | ADD HL,BC | |||||||
57877 | LD A,(HL) | Get tile at bullet's position | ||||||
57878 | CP 127 | |||||||
57880 | RET Z | Return if bullet did not collide with scenery | ||||||
DISABLE_UP_BULLET | 57881 | LD (IX+2),255 | Set status to 255 (disabled) | |||||
57885 | RET |
Prev: 57801 | Up: Map | Next: 57886 |