.yLookupLo FOR I%, 0, 7 EQUB LO(&5800 + (I% * &140)) NEXT EQUB %01110111 \ Clear the first pixel of a mode 5 pixel byte EQUB %10111011 \ Clear the second pixel of a mode 5 pixel byte EQUB %11011101 \ Clear the third pixel of a mode 5 pixel byte EQUB %11101110 \ Clear the fourth pixel of a mode 5 pixel byte EQUB %01110111 \ Clear the first pixel of a mode 5 pixel byte EQUB %10111011 \ Clear the second pixel of a mode 5 pixel byte EQUB %11011101 \ Clear the third pixel of a mode 5 pixel byte EQUB %11101110 \ Clear the fourth pixel of a mode 5 pixel byte FOR I%, 16, 31 EQUB LO(&5800 + (I% * &140)) NEXT EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81 EQUB &81, &81 EQUB &81Name: yLookupLo [Show more] Type: Variable Category: Drawing pixels Summary: Lookup table for converting pixel y-coordinate to low byte of screen addressContext: See this variable in context in the source code References: This variable is used as follows: * DrawDashboardLine uses yLookupLo * DrawObjectEdge (Part 3 of 5) uses yLookupLo * GetScreenAddress uses yLookupLo
For character rows 0 to 7 and 16 to 31, this table returns the low byte of the screen address of the start of the row, for the custom screen mode. For character rows 8 to 15, the table is reused, as these locations would point to the blue sky, and we don't draw in the sky as it contains working game code. Instead, the lookup table at yLookupLo+8 contains pixel masks for use in the line-drawing routine at DrawDashboardLine.