
Here is example file:
Thanks for any help!
Code: Select all
get DDS_SIGN long
DWORD dwSize;
DWORD dwFlags;
DWORD dwHeight;
DWORD dwWidth;
DWORD dwPitchOrLinearSize;
DWORD dwDepth;
DWORD dwMipMapCount;
DWORD dwReserved1[11];
#DDS_PIXELFORMAT ddspf;
#struct DDS_PIXELFORMAT {
DWORD dwSize;
DWORD dwFlags;
DWORD dwFourCC;
DWORD dwRGBBitCount;
DWORD dwRBitMask;
DWORD dwGBitMask;
DWORD dwBBitMask;
DWORD dwABitMask;
#};
DWORD dwCaps;
DWORD dwCaps2;
DWORD dwCaps3;
DWORD dwCaps4;
DWORD dwReserved2;
get MAX_SIZE asize
savepos TMP
xmath NUM "(MAX_SIZE - TMP) / 4"
for i = 0 < NUM
get DUMMY long
next i
aluigi wrote:I think it's a bit more complex than that.
quickbms has a cool features that allows to swap the endianess of all the fields that have been read from the file so I did the following test, I made a BACKUP copy of the file and then used this script with the -E -w options of quickbms (quickbms -E -w script.bms font02_0.tga.ckd):Code: Select all
get DDS_SIGN long
DWORD dwSize;
DWORD dwFlags;
DWORD dwHeight;
DWORD dwWidth;
DWORD dwPitchOrLinearSize;
DWORD dwDepth;
DWORD dwMipMapCount;
DWORD dwReserved1[11];
#DDS_PIXELFORMAT ddspf;
#struct DDS_PIXELFORMAT {
DWORD dwSize;
DWORD dwFlags;
DWORD dwFourCC;
DWORD dwRGBBitCount;
DWORD dwRBitMask;
DWORD dwGBitMask;
DWORD dwBBitMask;
DWORD dwABitMask;
#};
DWORD dwCaps;
DWORD dwCaps2;
DWORD dwCaps3;
DWORD dwCaps4;
DWORD dwReserved2;
get MAX_SIZE asize
savepos TMP
xmath NUM "(MAX_SIZE - TMP) / 4"
for i = 0 < NUM
get DUMMY long
next i
Then I renamed font02_0.tga.ckd to font02_0.dds and opened it but the output image doesn't have sense.
I tried also to comment the last part (from get MAX_SIZE) but it's still not clear.
Hope it's a starting point, at least.