Prev: 52418 Up: Map Next: 52492
52453: Move Object
Moves an object by the signed speeds at HorizontalSpeed and VerticalSpeed.
Input
IX The address of the object
Add HorizontalSpeed to the horizontal position.
MoveObject 52453 LD A,(41492) Fetch HorizontalSpeed.
52456 CALL SignExtendAToHL Call SignExtendAToHL.
52459 LD C,(IX+1) Fetch the horizontal position.
52462 LD B,(IX+2)
52465 ADD HL,BC Add the speed to it.
52466 LD (IX+1),L Set the horizontal position.
52469 LD (IX+2),H
Add VerticalSpeed to the vertical position.
52472 LD A,(41493) Fetch VerticalSpeed.
52475 CALL SignExtendAToHL Call SignExtendAToHL.
52478 LD C,(IX+3) Fetch the vertical position.
52481 LD B,(IX+4)
52484 ADD HL,BC Add the speed to it.
52485 LD (IX+3),L Set the vertical position and return.
52488 LD (IX+4),H
52491 RET
View the equivalent code in;
Prev: 52418 Up: Map Next: 52492