![]() |
Routines |
| Prev: 39657 | Up: Map | Next: 39693 |
|
Used by the routine at PlaceFlame.
Places a new flame at the same Y position as the player and at a random X position.
|
||||||||||||
|
Use the same Y position as the player.
|
||||||||||||
| PlaceFlame_InRow | 39673 | LD A,(38662) | Fetch the Y position of the player from 38662. | |||||||||
| 39676 | LD (IX+4),A | Set the Y position of the flame. | ||||||||||
| 39679 | LD D,A | Copy the Y position to D. | ||||||||||
|
Use a random X position between 48 and 175.
|
||||||||||||
| 39680 | LD A,(38549) | Fetch the random seed from RandomNumber. | ||||||||||
| 39683 | AND %01111111 | Keep only bits 0-6. | ||||||||||
| 39685 | ADD A,48 | Add 48. | ||||||||||
| 39687 | LD E,A | Copy the X position to E. | ||||||||||
| 39688 | LD (IX+3),A | Set the X position of the flame. | ||||||||||
| 39691 | JR ChoosePosition_Test | Jump to ChoosePosition_Test to test the position. | ||||||||||
| Prev: 39657 | Up: Map | Next: 39693 |