Prev: B403 Up: Map Next: B483
B414: Update Special Shot
Used by the routine at UpdateShot.
Updates a shot that has bit 7 of offset 15 set, which is the kind that is made by LaunchShot_Special. The length of the shot is at offset 0E. Purpose of the details not yet known.
Input
IX Address of the shot
UpdateSpecialShot B414 LD A,(IX+$0E) The high byte of the vertical acceleration.
B417 AND A Call PlayFlutterSound if A is not zero.
B418 CALL NZ,PlayFlutterSound
B41B INC (IX+$11) Increase offset 11 of IX by one.
B41E CALL MakeShotRow Call MakeShotRow.
B421 CALL FindObjectScreenAddress Call FindObjectScreenAddress.
B424 LD B,(IX+$0E) The high byte of the vertical acceleration.
B427 EXX Switch to the alternate registers.
B428 BIT 7,(IX+$10) Jump to UpdateSpecialShot_Shorter if bit 7 of offset 10 of IX is set.
B42C JR NZ,UpdateSpecialShot_Shorter
B42E BIT 0,(IX+$11) Jump to UpdateSpecialShot_Frame if bit 0 of offset 11 of IX is clear.
B432 JR Z,UpdateSpecialShot_Frame
B434 LD A,(IX+$12) The vertical screen position.
B437 ADD A,(IX+$07) Add the byte at offset 07 of IX to A.
B43A LD (IX+$07),A Write the high byte of the horizontal speed.
B43D LD A,(IX+$0E) The high byte of the vertical acceleration.
B440 CP $08 Jump to UpdateSpecialShot_Test if A is 08.
B442 JR Z,UpdateSpecialShot_Test
B444 INC (IX+$0E) Increase offset 0E of IX by one.
B447 BIT 7,(IX+$00) Jump to UpdateSpecialShot_Test if bit 7 of offset 00 of IX is clear.
B44B JR Z,UpdateSpecialShot_Test
B44D LD A,$F8 A=F8.
B44F ADD A,(IX+$0B) Add the byte at offset 0B of IX to A.
B452 LD (IX+$0B),A Write the high byte of the horizontal acceleration.
UpdateSpecialShot_Test B455 CALL TestShotHitsGround_Wide Call TestShotHitsGround_Wide.
B458 JR Z,UpdateSpecialShot_Frame Jump to UpdateSpecialShot_Frame if the zero flag is set.
B45A LD A,($C8EC) The high byte of the ship's horizontal speed.
B45D LD (IX+$07),A Write the high byte of the horizontal speed.
UpdateSpecialShot_Shorter B460 DEC (IX+$0E) Decrease offset 0E of IX by one.
B463 BIT 7,(IX+$00) Jump to UpdateSpecialShot_Frame if bit 7 of offset 00 of IX is clear.
B467 JR Z,UpdateSpecialShot_Frame
B469 LD A,$08 A=08.
B46B ADD A,(IX+$0B) Add the byte at offset 0B of IX to A.
B46E LD (IX+$0B),A Write the high byte of the horizontal acceleration.
UpdateSpecialShot_Frame B471 CALL MakeShotColumn Call MakeShotColumn.
B474 LD A,(IX+$11) The horizontal screen position.
B477 CP $16 Jump to DrawShot if A is not 16.
B479 JP NZ,DrawShot
B47C SET 7,(IX+$10) Set bit 7 of offset 10 of IX.
B480 JP DrawShot Jump to DrawShot.
Prev: B403 Up: Map Next: B483