Prev: 46058 Up: Map Next: 46083
46066: Choose Random Colour
Used by the routine at UpdateShot.
Picks one of four attributes for an object at random and stores it at offset 13.
Input
IX Address of the object
ChooseRandomColour 46066 LD A,(39883) The random numbers.
46069 AND %00000011 Keep the bits of A that are set in 3.
46071 ADD A,69 Add 69 to A.
46073 CP 72 Jump to ChooseRandomColour_Store if A is not 72.
46075 JR NZ,ChooseRandomColour_Store
46077 LD A,67 A=67.
ChooseRandomColour_Store 46079 LD (IX+13),A Write A to offset 13 of IX.
46082 RET Return.
Prev: 46058 Up: Map Next: 46083