Skip to navigation

Revs on the BBC Micro

Drawing objects: DrawEdge

Name: DrawEdge [Show more] Type: Subroutine Category: Drawing objects Summary: Draw an edge, overwriting whatever is already on-screen
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * DrawObjectEdge (Part 3 of 5) calls DrawEdge

This routine rejoins the DrawObjectEdge routine to move on to the next edge in the current object part. Arguments: (Q P) The address of the dash data block to draw in Y The top track line blockOffset The bottom track line A The pixel byte for the edge
.dred1 STA (P),Y \ Draw the pixel byte into the screen buffer by writing \ it to the Y-th byte of the relevant dash data block DEY \ Decrement the track line counter in Y to move down to \ the next pixel line on-screen .DrawEdge \ This is the entry point for the routine CPY blockOffset \ If Y <> blockOffset then loop back to draw the next BNE dred1 \ byte, as we haven't reached the bottom track line JMP draw29 \ Jump to draw29