Routines |
Prev: 53714 | Up: Map | Next: 53787 |
|
||||
In the tunnels the bat appears with a high (downwards) speed and can reach high horizontal speeds as well. Bats are probably the main thing to avoid in tunnel sections.
They're designed to gravitate/slow down towards the centre point of the screen where Maroc is. It's possible for Maroc to suffer a heavy energy drain from bats during long tunnels. The CHALICE spell does not restore Maroc's energy during the tunnel segments.
|
||||
53759 | LD A,(60237) | Vertical movement speed (negative = up, positive = down) | ||
53762 | ADD A,246 | This subtracts 10 from the bat's speed, initially moving downwards (speed values = positive) quickly, slowing its descent until it roughly reaches Maroc's vertical position. It then starts moving back up the screen (speed values = negative) at an increasing speed. |
||
53764 | LD (60237),A | ...And re-store | ||
53767 | LD A,(60232) | Graphic's horizontal position, in half character (4 pixel) steps | ||
53770 | LD C,A | |||
53771 | LD A,28 | |||
53773 | SUB C | Subtract from 28 This is in 4-pixel/half-character steps, so it's around the centre of the screen. At this point the value added to the bat's horizontal speed will reduce, meaning it stays around the centre of the screen for longer. |
||
53774 | ADD A,A | x2 | ||
53775 | ADD A,A | x4 | ||
53776 | LD C,A | |||
53777 | LD A,(60236) | Horizontal movement speed (negative = left, positive = right) | ||
53780 | ADD A,C | Add the calculated speed to this | ||
53781 | LD (60236),A | ...and re-store | ||
53784 | JP 53885 |
Prev: 53714 | Up: Map | Next: 53787 |