![]() |
Routines |
Prev: 58276 | Up: Map | Next: 58336 |
Used by the routine at Handler_Items.
|
||||||||
Controller_BombCheck | 58306 | CALL GetRandomNumber | Call GetRandomNumber. | |||||
58309 | CP 64 | Return if the random number is higher than 64. | ||||||
58311 | RET NC | |||||||
See Bombs Don't Explode.
|
||||||||
58312 | LD A,(58489) | Return if *TableBomb_Flag indicates a bomb already exists on the screen - we can only process one at-a-time. | ||||||
58315 | CP 0 | |||||||
58317 | RET NZ | |||||||
We're good to create a bomb!
|
||||||||
58318 | LD A,32 | Set the base sprite (32) to *TableBomb_SpriteID. | ||||||
58320 | LD (58485),A | |||||||
58323 | LD (58479),BC | Write the coordinates (BC) to *TableBomb_Position for where it should appear. | ||||||
Initialise the bomb, and the sound for it.
|
||||||||
58327 | LD A,1 | Write 1 to: | ||||||
58329 | LD (58489),A | |||||||
58332 | LD (65533),A | |||||||
58335 | RET | Return. |
Prev: 58276 | Up: Map | Next: 58336 |