Skip to navigation


Drawing lines: lineBufferT

Name: lineBufferT [Show more] Type: Variable Category: Drawing lines Summary: Line buffer storage for the line's |x-delta| (T) 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 lineBufferT * EraseCanopyLines uses lineBufferT

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.
.lineBufferT EQUB &73, &75, &74, &31, &0D, &04, &38, &0F EQUB &20, &20, &20, &20, &20, &20, &84, &41 EQUB &23, &31, &36, &0D, &04, &42, &19, &2E EQUB &73, &75, &74, &33, &20, &44, &45, &43 EQUB &20, &54, &48, &45, &4D, &45, &3A, &4C EQUB &44, &58, &23, &37, &0D, &04, &4C, &1C EQUB &2E, &73, &75, &74, &35, &20, &43, &50 EQUB &58, &20, &54, &48, &45, &4D, &45, &3A EQUB &42, &45, &51, &20, &73, &75, &74, &34 EQUB &0D, &04, &56, &1F, &2E, &73, &75, &74 EQUB &32, &20, &43, &4D, &50, &20, &46, &4C EQUB &44, &50, &54, &52, &2C, &58, &3A, &42