Skip to navigation

Revs on the BBC Micro

Track geometry: CopySectionData

Name: CopySectionData [Show more] Type: Subroutine Category: Track geometry Summary: Copy a 16-bit y-coordinate from the track section data Deep dive: Building a 3D track from sections and segments
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * GetTrackSegment (Part 3 of 3) calls CopySectionData

Arguments: X Copy X-th (ySegmentCoordIHi ySegmentCoordILo) to (ySegmentCoordOHi ySegmentCoordOLo)
.CopySectionData LDA ySegmentCoordILo,X \ Copy the following 16-bit coordinate: STA ySegmentCoordOLo,X \ \ * The X-th ySegmentCoordI to the X-th ySegmentCoordO \ \ starting with the low byte LDA ySegmentCoordIHi,X \ And then the high byte STA ySegmentCoordOHi,X RTS \ Return from the subroutine