![]() |
Routines |
| Prev: 696B | Up: Map | Next: 698F |
|
Used by the routine at FireWeapon.
Starts a repellent spray in the weapon slot held in FreeWeaponSlot, in front of Robbie. It is not fired if Robbie is too close to the edge of the play area.
|
||||||||||
| FireRepellentSpray | 6974 | CALL GetRobbieDirection | Get the X position and the direction using GetRobbieDirection. | |||||||
| 6977 | JR Z,FireRepellentSpray_Right | Jump to FireRepellentSpray_Right if the spray goes to the right. | ||||||||
| 6979 | CP $30 | Return if Robbie is too close to the left edge. | ||||||||
| 697B | RET C | |||||||||
| 697C | SUB $0C | Subtract 0C from the X position (so it starts to the left of Robbie). | ||||||||
| 697E | LD (HL),$48 | Write 48 (a repellent spray moving left) to the state of the weapon. | ||||||||
| FireRepellentSpray_Colour | 6980 | LD B,$45 | B=45 (the colour of the spray). | |||||||
| 6982 | JP CreateWeapon | Jump to CreateWeapon to create the weapon. | ||||||||
| FireRepellentSpray_Right | 6985 | CP $C0 | Return if Robbie is too close to the right edge. | |||||||
| 6987 | RET NC | |||||||||
| 6988 | ADD A,$18 | Add 18 to the X position (so it starts to the right of Robbie). | ||||||||
| 698A | LD (HL),$08 | Write 08 (a repellent spray moving right) to the state of the weapon. | ||||||||
| 698C | JP FireRepellentSpray_Colour | Jump to FireRepellentSpray_Colour. | ||||||||
| Prev: 696B | Up: Map | Next: 698F |