Skip to navigation

Aviator on the BBC Micro

3D geometry: SetObjectToOrigin

Name: SetObjectToOrigin [Show more] Type: Subroutine Category: 3D geometry Summary: Set an object's coordinates to (0, 0, 0)
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * FireGuns calls SetObjectToOrigin * ResetRadar calls SetObjectToOrigin

Arguments: Y The ID of the object to set to (0, 0, 0)
.SetObjectToOrigin LDA #0 \ Zero the object's x-coordinate STA xObjectLo,Y STA xObjectHi,Y STA yObjectLo,Y \ Zero the object's y-coordinate STA yObjectHi,Y STA zObjectLo,Y \ Zero the object's z-coordinate STA zObjectHi,Y RTS \ Return from the subroutine