Change order of vq compressed

This commit is contained in:
Benjamin Collins 2023-11-26 16:12:16 +00:00
parent fe0a78e956
commit 91ad9a8f2d

View File

@ -411,22 +411,22 @@ class PowerVR: # {
b = self.file.read(1)
index = struct.unpack('B', b)[0]
rgba = self.codebook[index]
self.bitmap[y*2 + 0][x*8 + 0] = rgba[0][0]
self.bitmap[y*2 + 0][x*8 + 1] = rgba[0][1]
self.bitmap[y*2 + 0][x*8 + 2] = rgba[0][2]
self.bitmap[y*2 + 0][x*8 + 3] = rgba[0][3]
self.bitmap[y*2 + 0][x*8 + 4] = rgba[1][0]
self.bitmap[y*2 + 0][x*8 + 5] = rgba[1][1]
self.bitmap[y*2 + 0][x*8 + 6] = rgba[1][2]
self.bitmap[y*2 + 0][x*8 + 7] = rgba[1][3]
self.bitmap[y*2 + 1][x*8 + 0] = rgba[2][0]
self.bitmap[y*2 + 1][x*8 + 1] = rgba[2][1]
self.bitmap[y*2 + 1][x*8 + 2] = rgba[2][2]
self.bitmap[y*2 + 1][x*8 + 3] = rgba[2][3]
self.bitmap[y*2 + 1][x*8 + 4] = rgba[3][0]
self.bitmap[y*2 + 1][x*8 + 5] = rgba[3][1]
self.bitmap[y*2 + 1][x*8 + 6] = rgba[3][2]
self.bitmap[y*2 + 1][x*8 + 7] = rgba[3][3]
bitmap[y*2 + 0][x*8 + 0] = rgba[0][0]
bitmap[y*2 + 0][x*8 + 1] = rgba[0][1]
bitmap[y*2 + 0][x*8 + 2] = rgba[0][2]
bitmap[y*2 + 0][x*8 + 3] = rgba[0][3]
bitmap[y*2 + 0][x*8 + 4] = rgba[2][0]
bitmap[y*2 + 0][x*8 + 5] = rgba[2][1]
bitmap[y*2 + 0][x*8 + 6] = rgba[2][2]
bitmap[y*2 + 0][x*8 + 7] = rgba[2][3]
bitmap[y*2 + 1][x*8 + 0] = rgba[1][0]
bitmap[y*2 + 1][x*8 + 1] = rgba[1][1]
bitmap[y*2 + 1][x*8 + 2] = rgba[1][2]
bitmap[y*2 + 1][x*8 + 3] = rgba[1][3]
bitmap[y*2 + 1][x*8 + 4] = rgba[3][0]
bitmap[y*2 + 1][x*8 + 5] = rgba[3][1]
bitmap[y*2 + 1][x*8 + 6] = rgba[3][2]
bitmap[y*2 + 1][x*8 + 7] = rgba[3][3]
return self.bitmap
return None