![]() |
Routines |
| Prev: B6EC | Up: Map | Next: B730 |
|
Used by the routine at RunFrame.
Updates the four shots in the slots at ShotSlots. A shot with bit 7 of offset 16 set and a type of zero is a chasing shot, which is dealt with by UpdateChasingObject. The others are shots in use when offset 0B is not zero, and are dealt with by UpdateShot.
|
||||
| UpdateShots | B706 | LD IX,$B37A | The shot slots. | |
| B70A | LD B,$04 | B=04. | ||
| UpdateShots_Loop | B70C | PUSH BC | Stash BC on the stack. | |
| B70D | PUSH IX | Stash IX on the stack. | ||
| B70F | BIT 7,(IX+$16) | Jump to UpdateShots_Shot if bit 7 of offset 16 of IX is clear. | ||
| B713 | JR Z,UpdateShots_Shot | |||
| B715 | LD A,(IX+$00) | Read offset 00 of IX. | ||
| B718 | AND A | Call UpdateChasingObject if A is zero. | ||
| B719 | CALL Z,UpdateChasingObject | |||
| B71C | JR UpdateShots_Next | Jump to UpdateShots_Next. | ||
| UpdateShots_Shot | B71E | LD A,(IX+$0B) | Read offset 0B of IX. | |
| B721 | AND A | Call UpdateShot if A is not zero. | ||
| B722 | CALL NZ,UpdateShot | |||
| UpdateShots_Next | B725 | POP IX | Bring IX back off the stack. | |
| B727 | LD BC,$0018 | BC=18. | ||
| B72A | ADD IX,BC | IX gains BC. | ||
| B72C | POP BC | Bring BC back off the stack. | ||
| B72D | DJNZ UpdateShots_Loop | Decrease B and jump to UpdateShots_Loop until none remain. | ||
| B72F | RET | Return. | ||
| Prev: B6EC | Up: Map | Next: B730 |