.edgePixelsRight EQUB %00000000 \ Index %000000xx for fill colour 0 then edge colour 0 EQUB %00000000 EQUB %00000000 EQUB %00000000 EQUB %00000000 \ Index %000001xx for fill colour 1 then edge colour 0 EQUB %00001000 EQUB %00001100 EQUB %00001110 EQUB %00000000 \ Index %000010xx for fill colour 2 then edge colour 0 EQUB %10000000 EQUB %11000000 EQUB %11100000 EQUB %00000000 \ Index %000011xx for fill colour 3 then edge colour 0 EQUB %10001000 EQUB %11001100 EQUB %11101110 EQUB %00001000 \ Index %000100xx for fill colour 0 then edge colour 1 EQUB %00000100 EQUB %00000010 EQUB %00000001 EQUB %00001000 \ Index %000101xx for fill colour 1 then edge colour 1 EQUB %00001100 EQUB %00001110 EQUB %00001111 EQUB %00001000 \ Index %000110xx for fill colour 2 then edge colour 1 EQUB %10000100 EQUB %11000010 EQUB %11100001 EQUB %00001000 \ Index %000111xx for fill colour 3 then edge colour 1 EQUB %10001100 EQUB %11001110 EQUB %11101111 EQUB %10000000 \ Index %001000xx for fill colour 0 then edge colour 2 EQUB %01000000 EQUB %00100000 EQUB %00010000 EQUB %10000000 \ Index %001001xx for fill colour 1 then edge colour 2 EQUB %01001000 EQUB %00101100 EQUB %00011110 EQUB %10000000 \ Index %001010xx for fill colour 2 then edge colour 2 EQUB %11000000 EQUB %11100000 EQUB %11110000 EQUB %10000000 \ Index %001011xx for fill colour 3 then edge colour 2 EQUB %11001000 EQUB %11101100 EQUB %11111110 EQUB %10001000 \ Index %001100xx for fill colour 0 then edge colour 3 EQUB %01000100 EQUB %00100010 EQUB %00010001 EQUB %10001000 \ Index %001101xx for fill colour 1 then edge colour 3 EQUB %01001100 EQUB %00101110 EQUB %00011111 EQUB %10001000 \ Index %001110xx for fill colour 2 then edge colour 3 EQUB %11000100 EQUB %11100010 EQUB %11110001 EQUB %10001000 \ Index %001111xx for fill colour 3 then edge colour 3 EQUB %11001100 EQUB %11101110 EQUB %11111111Name: edgePixelsRight [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 right edge of the polygon pixel lineContext: See this variable in context in the source code References: This variable is used as follows: * DrawPolygonLines (Part 3 of 4) uses edgePixelsRight
Each batch of four pixel bytes contains the pixels for the right 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 right edge, the pixel byte contains pixels in the fill colour on the left and the edge colour on the right.