Skip to navigation

Aviator on the BBC Micro

Drawing lines: lineBufferV

Name: lineBufferV [Show more] Type: Variable Category: Drawing lines Summary: Line buffer storage for the line direction (V) Deep dive: Source code clues hidden in the game binary Line buffers
Context: See this variable in context in the source code References: This variable is used as follows: * DrawClippedLine (Part 6 of 6) calls lineBufferV * EraseCanopyLines calls lineBufferV

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. 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.
.lineBufferV EQUB &A2, &07, &A9, &77, &85, &70, &A9, &88 EQUB &85, &71, &A9, &EE, &85, &72, &A9, &11 EQUB &85, &73, &A0, &01, &BD, &40, &59, &25 EQUB &70, &05, &71, &9D, &40, &59, &BD, &68 EQUB &5A, &25, &72, &05, &73, &9D, &68, &5A EQUB &CA, &88, &10, &E8, &46, &72, &46, &73 EQUB &46, &70, &46, &71, &E0, &FF, &D0, &DA EQUB &60, &A0, &5B, &A2, &C0, &A9, &08, &85 EQUB &72, &A9, &00, &20, &AB, &2E, &60, &10 EQUB &0F, &2E, &53, &54, &49, &50, &20, &4C EQUB &44, &58, &23, &32, &0D, &09, &1A, &2A EQUB &2E, &73, &74, &69, &31, &20, &4C, &44