Skip to navigation


Drawing lines: lineBufferR

Name: lineBufferR [Show more] Type: Variable Category: Drawing lines Summary: Line buffer storage for the start x-coordinate (R) 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 lineBufferR * EraseCanopyLines uses lineBufferR

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.
.lineBufferR EQUB &64, &6C, &70, &32, &0D, &03, &B4, &19 EQUB &20, &20, &20, &20, &20, &20, &44, &45 EQUB &43, &26, &37, &34, &3A, &42, &4E, &45 EQUB &20, &64, &6C, &70, &31, &0D, &03, &B5 EQUB &0D, &20, &20, &20, &20, &20, &20, &72 EQUB &74, &73, &0D, &03, &B6, &05, &20, &0D EQUB &03, &BF, &25, &2E, &55, &42, &55, &4C EQUB &20, &4C, &44, &59, &23, &31, &35, &3A EQUB &53, &54, &59, &20, &4F, &42, &3A, &4C EQUB &44, &41, &23, &39, &38, &3A, &53, &54 EQUB &41, &20, &50, &50, &0D, &03, &C0, &1D EQUB &2E, &75, &62, &75, &32, &20, &54, &59