![]() |
Routines |
| Prev: 39612 | Up: Map | Next: 39673 |
|
Used by the routine at SpawnFlame.
Chooses a position for a new flame. Depending on bit 0 of the counter at GameTimer the flame is either placed in the same column as the player (with a position from the frame counter for its row, see ChoosePosition_SetY) or in the same row as the player (see PlaceFlame_InRow). It then finishes by checking the position, see ChoosePosition_Test.
|
||||||||||||
| PlaceFlame | 39657 | LD A,(38547) | Fetch the low byte of the game timer from GameTimer. | |||||||||
| 39660 | AND %00000001 | Keep only bit 0. | ||||||||||
| 39662 | JR NZ,PlaceFlame_InRow | Jump to PlaceFlame_InRow if the flame is to appear in the same row as the player. | ||||||||||
|
Use the same X position as the player.
|
||||||||||||
| 39664 | LD A,(38661) | Fetch the X position of the player from 38661. | ||||||||||
| 39667 | LD (IX+3),A | Set the X position of the flame. | ||||||||||
| 39670 | LD E,A | Copy the X position to E. | ||||||||||
| 39671 | JR ChoosePosition_SetY | Jump to ChoosePosition_SetY to choose the Y position. | ||||||||||
| Prev: 39612 | Up: Map | Next: 39673 |