Prev: 46083 Up: Map Next: 46211
46100: Update Special Shot
Used by the routine at UpdateShot.
Updates a shot that has bit 7 of offset 21 set, which is the kind that is made by LaunchShot_Special. The length of the shot is at offset 14. Purpose of the details not yet known.
Input
IX Address of the shot
UpdateSpecialShot 46100 LD A,(IX+14) The high byte of the vertical acceleration.
46103 AND A Call PlayFlutterSound if A is not zero.
46104 CALL NZ,PlayFlutterSound
46107 INC (IX+17) Increase offset 17 of IX by one.
46110 CALL MakeShotRow Call MakeShotRow.
46113 CALL FindObjectScreenAddress Call FindObjectScreenAddress.
46116 LD B,(IX+14) The high byte of the vertical acceleration.
46119 EXX Switch to the alternate registers.
46120 BIT 7,(IX+16) Jump to UpdateSpecialShot_Shorter if bit 7 of offset 16 of IX is set.
46124 JR NZ,UpdateSpecialShot_Shorter
46126 BIT 0,(IX+17) Jump to UpdateSpecialShot_Frame if bit 0 of offset 17 of IX is clear.
46130 JR Z,UpdateSpecialShot_Frame
46132 LD A,(IX+18) The vertical screen position.
46135 ADD A,(IX+7) Add the byte at offset 7 of IX to A.
46138 LD (IX+7),A Write the high byte of the horizontal speed.
46141 LD A,(IX+14) The high byte of the vertical acceleration.
46144 CP 8 Jump to UpdateSpecialShot_Test if A is 8.
46146 JR Z,UpdateSpecialShot_Test
46148 INC (IX+14) Increase offset 14 of IX by one.
46151 BIT 7,(IX+0) Jump to UpdateSpecialShot_Test if bit 7 of offset 0 of IX is clear.
46155 JR Z,UpdateSpecialShot_Test
46157 LD A,248 A=248.
46159 ADD A,(IX+11) Add the byte at offset 11 of IX to A.
46162 LD (IX+11),A Write the high byte of the horizontal acceleration.
UpdateSpecialShot_Test 46165 CALL TestShotHitsGround_Wide Call TestShotHitsGround_Wide.
46168 JR Z,UpdateSpecialShot_Frame Jump to UpdateSpecialShot_Frame if the zero flag is set.
46170 LD A,(51436) The high byte of the ship's horizontal speed.
46173 LD (IX+7),A Write the high byte of the horizontal speed.
UpdateSpecialShot_Shorter 46176 DEC (IX+14) Decrease offset 14 of IX by one.
46179 BIT 7,(IX+0) Jump to UpdateSpecialShot_Frame if bit 7 of offset 0 of IX is clear.
46183 JR Z,UpdateSpecialShot_Frame
46185 LD A,8 A=8.
46187 ADD A,(IX+11) Add the byte at offset 11 of IX to A.
46190 LD (IX+11),A Write the high byte of the horizontal acceleration.
UpdateSpecialShot_Frame 46193 CALL MakeShotColumn Call MakeShotColumn.
46196 LD A,(IX+17) The horizontal screen position.
46199 CP 22 Jump to DrawShot if A is not 22.
46201 JP NZ,DrawShot
46204 SET 7,(IX+16) Set bit 7 of offset 16 of IX.
46208 JP DrawShot Jump to DrawShot.
Prev: 46083 Up: Map Next: 46211