![]() |
Routines |
| Prev: 47356 | Up: Map | Next: 47414 |
|
Used by the routine at LaunchShot.
Gives a new shot the position of the ship, and a horizontal speed of 8 if bit 7 of its type is set or 24 if not. Its vertical speed is the value at ShipRow less the vertical position of the ship.
|
||||||||
| StartShotAtShip | 47370 | LD A,(51459) | The row the ship was drawn on. | |||||
| 47373 | LD B,A | B=A. | ||||||
| 47374 | LD A,(23608) | The ship row. | ||||||
| 47377 | SUB B | Subtract B from A. | ||||||
| 47378 | LD (IX+9),A | Write the high byte of the vertical speed. | ||||||
| 47381 | LD HL,(51430) | Fetch the word at 51430 into HL. | ||||||
| 47384 | LD DE,(51433) | Fetch the word at 51433 into DE. | ||||||
| 47388 | LD (IX+1),L | Write the map column. | ||||||
| 47391 | LD (IX+2),H | Write the horizontal position. | ||||||
| 47394 | LD (IX+4),E | Write the map zone. | ||||||
| 47397 | LD (IX+5),D | Write the vertical position. | ||||||
| 47400 | LD (IX+7),8 | Store 8 at offset 7 of IX. | ||||||
| 47404 | BIT 7,(IX+0) | Return if bit 7 of offset 0 of IX is set. | ||||||
| 47408 | RET NZ | |||||||
| 47409 | LD (IX+7),24 | Store 24 at offset 7 of IX. | ||||||
| 47413 | RET | Return. | ||||||
| Prev: 47356 | Up: Map | Next: 47414 |