.edgePixelsLeft EQUB %00000000 \ Index %000000xx for edge colour 0 then fill colour 0 EQUB %00000000 EQUB %00000000 EQUB %00000000 EQUB %00000111 \ Index %000001xx for edge colour 0 then fill colour 1 EQUB %00000011 EQUB %00000001 EQUB %00000000 EQUB %01110000 \ Index %000010xx for edge colour 0 then fill colour 2 EQUB %00110000 EQUB %00010000 EQUB %00000000 EQUB %01110111 \ Index %000011xx for edge colour 0 then fill colour 3 EQUB %00110011 EQUB %00010001 EQUB %00000000 EQUB %00001000 \ Index %000100xx for edge colour 1 then fill colour 0 EQUB %00000100 EQUB %00000010 EQUB %00000001 EQUB %00001111 \ Index %000101xx for edge colour 1 then fill colour 1 EQUB %00000111 EQUB %00000011 EQUB %00000001 EQUB %01111000 \ Index %000110xx for edge colour 1 then fill colour 2 EQUB %00110100 EQUB %00010010 EQUB %00000001 EQUB %01111111 \ Index %000111xx for edge colour 1 then fill colour 3 EQUB %00110111 EQUB %00010011 EQUB %00000001 EQUB %10000000 \ Index %001000xx for edge colour 2 then fill colour 0 EQUB %01000000 EQUB %00100000 EQUB %00010000 EQUB %10000111 \ Index %001001xx for edge colour 2 then fill colour 1 EQUB %01000011 EQUB %00100001 EQUB %00010000 EQUB %11110000 \ Index %001010xx for edge colour 2 then fill colour 2 EQUB %01110000 EQUB %00110000 EQUB %00010000 EQUB %11110111 \ Index %001011xx for edge colour 2 then fill colour 3 EQUB %01110011 EQUB %00110001 EQUB %00010000 EQUB %10001000 \ Index %001100xx for edge colour 3 then fill colour 0 EQUB %01000100 EQUB %00100010 EQUB %00010001 EQUB %10001111 \ Index %001101xx for edge colour 3 then fill colour 1 EQUB %01000111 EQUB %00100011 EQUB %00010001 EQUB %11111000 \ Index %001110xx for edge colour 3 then fill colour 2 EQUB %01110100 EQUB %00110010 EQUB %00010001 EQUB %11111111 \ Index %001111xx for edge colour 3 then fill colour 3 EQUB %01110111 EQUB %00110011 EQUB %00010001Name: edgePixelsLeft [Show more] Type: Variable Category: Drawing polygons Summary: Table to convert a polygon colours byte and a pixel offset (0-3) into a pixel byte for the left edge of the polygon pixel lineContext: See this variable in context in the source code References: This variable is used as follows: * DrawPolygonLines (Part 2 of 4) uses edgePixelsLeft * DrawPolygonLines (Part 3 of 4) uses edgePixelsLeft
Each batch of four pixel bytes contains the pixels for the left edge of the polygon, for a specific edge and fill colour. Within each batch of four are the pixel bytes for the edge when the edge pixel is in the first, second, third and fourth pixel, when counting from the left. The comments show the index range for each batch. The index matches the relevant polygonColours variable, which is in the format %00eeff00, where %ee is the edge colour and %ff is the fill colour. Adding X to this value gives us the index of the byte in that colour whose edge pixel is in pixel X. As this is the left edge, the pixel byte contains pixels in the edge colour on the left and the fill colour on the right.