27
edits
Changes
Jump to navigation
Jump to search
Byte TPage = InputBytes[TexturePage_index] & 0F; //Bitwise TPage ===Example====For 24-bit TIM: 0xB2 byte AND 0F, to delete first 4 bits int TPageINT is: 2*48 = TPage * 128; 96 //For Unsure about this one. It could be 42.667... It takes 1.5x the space of 16 bit TIM. I haven's, the texture page is 128 sizedt seen a file that uses 24 bit yet.
ExampleFor 16-bit TIM: 0xB2 byte is:2*64= 128 For 8-bit TIM: 0xB2 byte is: 2*128 = 256 For 4-bit TIM: 0xB2 byte is: 2*256 = 512 Each time you half the number of bits you double the amount of data you can store in the same space. So the calculated Texture Page is different.
→Texture page calculation: Added examples per bit width. Corrected size of texture page at 16 bit. Adjusted formating.
=== Texture page calculation ===
Byte TPage = InputBytes[TexturePage_index] & 0F; //Bitwise TPage byte AND 0F, to delete first 4 bits
int TPageINT = TPage * 64; //For 16 bit TIM's, the texture page is 64 pixels wide
=== Face order / Translation/ triangulation ===