Open nineteendo opened 2 years ago
PTX is a binary texture data file without the width, height and format. The width, height and format can be found in rsb. There'are some texture formats of PTX: 0-ARGB8888(Simple ptx)/ABGR8888(PVZ2 Android ptx)/ABGR8888_Padding(Just for Xbox360 and it's in Big Endian) 1-RGBA4444 2-RGB565 3-RGBA5551 5-DXT5 21-RGBA4444_Block(divide the picture as many 3232 block and save each of the block by RGBA4444) 22-RGB565_Block(divide the picture as many 3232 block and save each of the block by RGB565) 23-RGBA5551_Block(divide the picture as many 32*32 block and save each of the block by RGBA5551) 30-PVRTCI_4bpp_RGBA 147-ETC1_A8(Save each pixel's alpha value after all the ETC1 data. Each of the alpha is 8 bits.)/ETC1_A_Palette(Save each pixel's alpha value after all the ETC1 data. First save the number of colors in palette, and then save the palette. At last, save all the alpha value by using the index in the palette)
Ehm, I'm going to try to make sense of your code if you don't mind. Because this is not complete.
嗯,如果你不介意的话,我会试着理解你的代码。因为这还不完整。
OK.
Also is it possible that texture format 3 is RGB556? In pvzfree for Android.
另外,纹理格式 3 是否有可能是 RGB556?在 pvzfree for Android 中。
In which file? I only found ptx03 files using RGBA5551.
I got a strange image when I used rgb565. This is not the original image. I think it should be rgba5551 .
Hmm, you're right. I thought it was RGB556 (so 6 bits for blue). But now fixed, thanks.