Colour Cube: Difference between revisions
Replaced references to "32" with m_size
Smilingfrog (talk | contribs) (Added information about the Xbox 360 swizzle algorithm) |
Smilingfrog (talk | contribs) (Replaced references to "32" with m_size) |
||
Line 33:
= Xbox 360 Swizzle Algorithm =
The following algorithm assumes that the data is stored and accessed as m_size cubes, each
With the above in mind, to find the 3-byte (R, G and B) pixel data for position (x,y) in the PC m_pixels data, 3 bytes (R, G and B) can be read from the Xbox 360 m_pixels data at the offset calculated as follows where x and y are represented as a number of bits, x0 to x9 (values 0-
{| class="wikitable"
Line 109:
# now, convert the m_pixels data
data="".b
(m_size *
offset = calc_offset(x, y)
pixel_data = m_pixels[offset.pixels...(offset + 1).pixels]
|