![]() |
Routines |
| Prev: 6CDF | Up: Map | Next: 6D9E |
|
Used by the routine at Handle_Butterfly.
Generates a valid random position for the butterfly by repeatedly generating coordinates until one passes the boundary check.
|
||||
| Randomise_Butterfly_Position | 6D90 | CALL GenerateRandomNumber | Call GenerateRandomNumber. | |
| 6D93 | LD C,A | Copy to C (X position). | ||
| 6D94 | CALL GenerateRandomNumber | Call GenerateRandomNumber. | ||
| 6D97 | LD B,A | Copy to B (Y position). | ||
| 6D98 | CALL Validate_Position | Call Validate_Position to validate the position. | ||
| 6D9B | JR C,Randomise_Butterfly_Position | Jump back to Randomise_Butterfly_Position if the position is invalid (carry set). | ||
| 6D9D | RET | Return. | ||
| Prev: 6CDF | Up: Map | Next: 6D9E |