Differences between Fifa 11 rx3 (pc) and rx2 (Xbox 360) is rx3 has rx3b section but rx2 not. Texture data in rx3 is typical pc dds/dxt little endian format but Rx2 has big endian tiled textures.
Rx3b section contain vertex/index/texture offsets and buffer sizes and here is how I read it in my script:
Row 57 LoadRGBA:
Code:
bs.seek(hdrSize[0], NOESEEK_ABS)
for i in range(0, fileCount[0]):
fileType = bs.readBytes(4)
OffInfo = bs.read(">iii")
if fileType == b'\x7A\x0B\x60\xDA':
TexOff.append([OffInfo[0]])
TexBufferSize.append([OffInfo[1]])
Row 197 noepyLoadModel:
Code:
bs.seek(hdrSize[0], NOESEEK_ABS)
for i in range(0, fileCount[0]):
fileType = bs.readBytes(4)
OffInfo = bs.read(">iii")
if fileType == b'\x00\x58\x78\xF4':
FOff.append([OffInfo[0] + 0x10])
FBufferSize.append([OffInfo[1]])
elif fileType == b'\x00\x58\x7A\xA1':
VOff.append([OffInfo[0] + 0x10])
VBufferSize.append([OffInfo[1]])
While rx2 vertex/index/texture offsets and buffers are stored in section file table:
Code:
if fileType == b'\x00\x02\x00\x05':
bs.seek(-48, NOESEEK_REL)
info = bs.read(">iiiiiiiiiiii")
VOff.append([info[0]])
VBufferSize.append([info[2]])
VInfo.append([info[6]])
elif fileType == b'\x00\x02\x00\x07':
bs.seek(-48, NOESEEK_REL)
info = bs.read(">iiiiiiiiiiii")
FOff.append([info[0]])
FBufferSize.append([info[2]])
FInfo.append([info[6]])
Fifa 11 pc rx3 texture format (data = little endian dxt)
Fifa 10/11 xbox360 rx3 texture format (data = big endian dxt)
just remove # from #data = rapi.swapEndianArray(data, 2) )
Rx2 texture format (data = rapi.imageUntile360DXT(rapi.swapEndianArray(data, 2), imgWidth, imgHeight, 8))
That's only differences between the formats. In the next few weeks if I had time I will try to explain all data that I know about the format.