Prev: 46828 Up: Map Next: 46896
46854: Update Shots
Used by the routine at RunFrame.
Updates the four shots in the slots at ShotSlots. A shot with bit 7 of offset 22 set and a type of zero is a chasing shot, which is dealt with by UpdateChasingObject. The others are shots in use when offset 11 is not zero, and are dealt with by UpdateShot.
UpdateShots 46854 LD IX,45946 The shot slots.
46858 LD B,4 B=4.
UpdateShots_Loop 46860 PUSH BC Stash BC on the stack.
46861 PUSH IX Stash IX on the stack.
46863 BIT 7,(IX+22) Jump to UpdateShots_Shot if bit 7 of offset 22 of IX is clear.
46867 JR Z,UpdateShots_Shot
46869 LD A,(IX+0) Read offset 0 of IX.
46872 AND A Call UpdateChasingObject if A is zero.
46873 CALL Z,UpdateChasingObject
46876 JR UpdateShots_Next Jump to UpdateShots_Next.
UpdateShots_Shot 46878 LD A,(IX+11) Read offset 11 of IX.
46881 AND A Call UpdateShot if A is not zero.
46882 CALL NZ,UpdateShot
UpdateShots_Next 46885 POP IX Bring IX back off the stack.
46887 LD BC,24 BC=24.
46890 ADD IX,BC IX gains BC.
46892 POP BC Bring BC back off the stack.
46893 DJNZ UpdateShots_Loop Decrease B and jump to UpdateShots_Loop until none remain.
46895 RET Return.
Prev: 46828 Up: Map Next: 46896