Prev: 37018 Up: Map Next: 37069
37031: Move Object And Stop
Used by the routines at UpdateType1C and UpdateType1D.
Sets HorizontalStepSize to 128 and nudges the object. When the value in ScratchValue is not zero, the object is also marked, stopped and a sound is played.
Input
IX Address of the object
MoveObjectAndStop 37031 LD A,128 Set HorizontalStepSize to 128.
37033 LD (23589),A
37036 CALL NudgeObject Nudge the object.
37039 LD A,(23580) Fetch the value from ScratchValue.
37042 AND A Test it.
37043 JP Z,MoveObject Jump to MoveObject if it is zero.
37046 SET 3,(IX+23) Set bit 3 of the second set of flags of the object.
37050 XOR A Clear the speeds of the object.
37051 LD (IX+7),A
37054 LD (IX+8),A
37057 LD (IX+9),A
37060 LD (IX+10),A
37063 CALL PlayShortCrashSound Play a sound.
37066 JP MoveObject Jump to MoveObject.
Prev: 37018 Up: Map Next: 37069