Prev: A8CD Up: Map Next: A97E
A955: Chooses random dirt and stones (not tumbleweeds though)
Used by the routines at main_loop and cpu_driver.
choose_dirt_and_stones A955 LD A,($A248) Return if on_dirt_track is zero
A958 AND A
A959 RET Z
A95A LD A,($A254) Return if allow_spawning is zero
A95D AND A
A95E RET Z
A95F LD DE,$ED28 Point DE at (something above the stack)
A962 CALL rng Call rng
A965 AND A Store 1 (stone) if it's +ve or zero, or 2 (dirt) if it's -ve
A966 LD A,$01
A968 JP P,cdas_store
A96B INC A
cdas_store A96C LD (DE),A
A96D CALL rng Call rng [could be a position?]
A970 INC DE Store that random byte
A971 LD (DE),A
A972 LD A,$01 Self modify 'LD A' @ layout_dirt_and_stones to load 1
A974 LD ($A97F),A
A977 LD ($C0BC),A Self modify 'LD A' @ rm_c0bb to load 1
A97A LD ($A9DF),A Self modify 'LD A' @ dust_stones_stuff to load 1
A97D RET Return
Prev: A8CD Up: Map Next: A97E