![]() |
Routines |
| Prev: 46629 | Up: Map | Next: 46828 |
|
Used by the routine at UpdateShot.
Updates a shot that is facing left (bit 7 of its type is set), in the same way as the section of UpdateShot that is used for a shot that is facing right.
|
||||||||
| UpdateLeftShot | 46632 | LD DE,46050 | The second shot offset. | |||||
| 46635 | CALL AddShotOffset | Call AddShotOffset. | ||||||
| 46638 | CALL FindObjectScreenAddress | Call FindObjectScreenAddress. | ||||||
| 46641 | LD B,(IX+14) | The high byte of the vertical acceleration. | ||||||
| 46644 | EXX | Switch to the alternate registers. | ||||||
| 46645 | BIT 7,(IX+16) | Jump to UpdateLeftShot_Hit if bit 7 of offset 16 of IX is set. | ||||||
| 46649 | JR NZ,UpdateLeftShot_Hit | |||||||
| 46651 | LD A,240 | A=240. | ||||||
| 46653 | ADD A,(IX+11) | Add the byte at offset 11 of IX to A. | ||||||
| 46656 | LD (IX+11),A | Write the high byte of the horizontal acceleration. | ||||||
| 46659 | LD A,240 | A=240. | ||||||
| 46661 | ADD A,(IX+7) | Add the byte at offset 7 of IX to A. | ||||||
| 46664 | LD (IX+7),A | Write the high byte of the horizontal speed. | ||||||
| 46667 | LD A,(IX+14) | The high byte of the vertical acceleration. | ||||||
| 46670 | AND A | Jump to UpdateLeftShot_Test if A is not zero. | ||||||
| 46671 | JR NZ,UpdateLeftShot_Test | |||||||
| 46673 | LD (IX+11),88 | Store 88 at offset 11 of IX. | ||||||
| UpdateLeftShot_Test | 46677 | LD (IX+15),0 | Store 0 at offset 15 of IX. | |||||
| 46681 | CALL TestShotHitsGround | Call TestShotHitsGround. | ||||||
| 46684 | JR Z,UpdateLeftShot_Length | Jump to UpdateLeftShot_Length if the zero flag is set. | ||||||
| 46686 | SET 7,(IX+16) | Set bit 7 of offset 16 of IX. | ||||||
| 46690 | SET 5,(IX+16) | Set bit 5 of offset 16 of IX. | ||||||
| 46694 | LD A,16 | A=16. | ||||||
| 46696 | ADD A,(IX+7) | Add the byte at offset 7 of IX to A. | ||||||
| 46699 | LD (IX+7),A | Write the high byte of the horizontal speed. | ||||||
| 46702 | LD A,16 | A=16. | ||||||
| 46704 | ADD A,(IX+11) | Add the byte at offset 11 of IX to A. | ||||||
| 46707 | LD (IX+11),A | Write the high byte of the horizontal acceleration. | ||||||
| 46710 | JR UpdateLeftShot_End | Jump to UpdateLeftShot_End. | ||||||
| UpdateLeftShot_Length | 46712 | LD A,(IX+14) | The high byte of the vertical acceleration. | |||||
| 46715 | INC A | Advance A. | ||||||
| 46716 | LD (IX+14),A | Write the high byte of the vertical acceleration. | ||||||
| UpdateLeftShot_End | 46719 | LD A,(IX+11) | The high byte of the horizontal acceleration. | |||||
| 46722 | CP 8 | Jump to UpdateShot_LeftTable if A is not 8. | ||||||
| 46724 | JP NZ,UpdateShot_LeftTable | |||||||
| 46727 | SET 7,(IX+16) | Set bit 7 of offset 16 of IX. | ||||||
| 46731 | JP UpdateShot_LeftTable | Jump to UpdateShot_LeftTable. | ||||||
| UpdateLeftShot_Hit | 46734 | LD A,(IX+15) | The low byte of the vertical acceleration. | |||||
| 46737 | INC A | Advance A. | ||||||
| 46738 | LD (IX+15),A | Write the low byte of the vertical acceleration. | ||||||
| 46741 | BIT 5,(IX+16) | Jump to UpdateLeftShot_Stopped if bit 5 of offset 16 of IX is set. | ||||||
| 46745 | JR NZ,UpdateLeftShot_Stopped | |||||||
| 46747 | CALL TestShotHitsGround | Call TestShotHitsGround. | ||||||
| 46750 | JR Z,UpdateLeftShot_Facing | Jump to UpdateLeftShot_Facing if the zero flag is set. | ||||||
| 46752 | SET 5,(IX+16) | Set bit 5 of offset 16 of IX. | ||||||
| UpdateLeftShot_Stopped | 46756 | LD A,(IX+7) | The high byte of the horizontal speed. | |||||
| 46759 | NEG | Negate A. | ||||||
| 46761 | ADD A,(IX+11) | Add the byte at offset 11 of IX to A. | ||||||
| 46764 | LD (IX+11),A | Write the high byte of the horizontal acceleration. | ||||||
| 46767 | LD (IX+7),0 | Store 0 at offset 7 of IX. | ||||||
| 46771 | CP 8 | Jump to UpdateLeftShot_Facing if A is 8 or more. | ||||||
| 46773 | JR NC,UpdateLeftShot_Facing | |||||||
| 46775 | ADD A,8 | Add 8 to A. | ||||||
| 46777 | LD (IX+11),A | Write the high byte of the horizontal acceleration. | ||||||
| 46780 | LD A,(IX+14) | The high byte of the vertical acceleration. | ||||||
| 46783 | DEC A | Step A back. | ||||||
| 46784 | LD (IX+14),A | Write the high byte of the vertical acceleration. | ||||||
| 46787 | LD A,(IX+15) | The low byte of the vertical acceleration. | ||||||
| 46790 | INC A | Advance A. | ||||||
| 46791 | LD (IX+15),A | Write the low byte of the vertical acceleration. | ||||||
| UpdateLeftShot_Facing | 46794 | BIT 6,(IX+16) | Jump to UpdateLeftShot_Count if bit 6 of offset 16 of IX is clear. | |||||
| 46798 | JR Z,UpdateLeftShot_Count | |||||||
| 46800 | LD A,(IX+14) | The high byte of the vertical acceleration. | ||||||
| 46803 | DEC A | Step A back. | ||||||
| 46804 | LD (IX+14),A | Write the high byte of the vertical acceleration. | ||||||
| 46807 | JP UpdateShot_LeftTable | Jump to UpdateShot_LeftTable. | ||||||
| UpdateLeftShot_Count | 46810 | LD A,(IX+15) | The low byte of the vertical acceleration. | |||||
| 46813 | ADD A,(IX+14) | Add the byte at offset 14 of IX to A. | ||||||
| 46816 | CP 8 | Jump to UpdateShot_LeftTable if A is not 8. | ||||||
| 46818 | JP NZ,UpdateShot_LeftTable | |||||||
| 46821 | SET 6,(IX+16) | Set bit 6 of offset 16 of IX. | ||||||
| 46825 | JP UpdateShot_LeftTable | Jump to UpdateShot_LeftTable. | ||||||
| Prev: 46629 | Up: Map | Next: 46828 |