Skip to navigation


Drawing lines: lineBufferS

Name: lineBufferS [Show more] Type: Variable Category: Drawing lines Summary: Line buffer storage for the start y-coordinate (S) Deep dive: Line buffers
Context: See this variable in context in the source code References: This variable is used as follows: * DrawClippedLine (Part 6 of 6) uses lineBufferS * EraseCanopyLines uses lineBufferS

This table stores information about lines that are drawn on-screen, so they can be quickly erased without having to spend precious time recalculating the line coordinates. The information is stored when a line is drawn by the DrawClippedLine routine, and is read by the EraseCanopyLines routine when the line is erased. The initial contents of the variable is just workspace noise and is ignored. It actually contains snippets of the original source code. We can buffer up to 96 lines, with 48 in each of the two line buffers, so the maximum number of lines on screen at any one time is 48 lines out of the 193 lines defined in the world.
.lineBufferS EQUB &20, &20, &20, &20, &4C, &44, &41, &23 EQUB &30, &3A, &53, &54, &41, &20, &46, &52 EQUB &46, &4C, &41, &47, &20, &0D, &03, &F2 EQUB &17, &2E, &75, &62, &75, &31, &20, &44 EQUB &45, &43, &20, &50, &50, &3A, &44, &45 EQUB &43, &20, &4F, &42, &0D, &03, &FC, &20 EQUB &20, &20, &20, &20, &20, &20, &4C, &44 EQUB &59, &20, &4F, &42, &3A, &43, &50, &59 EQUB &23, &31, &32, &3A, &42, &43, &53, &20 EQUB &75, &62, &75, &32, &0D, &04, &06, &0D EQUB &20, &20, &20, &20, &20, &20, &72, &74 EQUB &73, &0D, &04, &10, &05, &20, &0D, &04