Prev: 38967 Up: Map Next: 39018
38989: Accelerate Randomly
Behaviour code used for objects of type 24 and 26 (see RunObjectBehaviour). Gives the object a random acceleration.
Input
IX Address of the object
AccelerateRandomly 38989 LD A,(39883) Fetch the first byte of the random seed.
38992 AND %00000001 Keep bit 0.
38994 CALL ChooseAcceleration Choose a horizontal acceleration.
38997 LD (IX+11),D Set the horizontal acceleration of the object.
39000 LD (IX+12),E
39003 LD A,(39883) Fetch the first byte of the random seed.
39006 AND %00000010 Keep bit 1.
39008 CALL ChooseAcceleration Choose a vertical acceleration.
39011 LD (IX+14),D Set the vertical acceleration of the object.
39014 LD (IX+15),E
39017 RET Return.
Prev: 38967 Up: Map Next: 39018