Anonymous

Changes

From Final Fantasy Inside

FF8/FileFormat X

1,010 bytes removed, 21:48, 3 May 2016
TIM Texture width/height resolving: NOPE
0xB2 byte is:
2*128 = 256
 
=== TIM Texture width/height resolving ===
//Updated - 19.07.2015 by MaKiPL
Byte[] Stage = File.ReadAllBytes(@"PATH TO .X stage file"); //Load file to memory
Byte[] TIMtexture = { 0x10, 0x00, 0x00, 0x00, 0x09 }; //Initialize 8BPP header
int TIMoffset = ByteSearch(Stage, TIMtexture, 0); //Search in Stage for TIM header
int TIMoffsetCLUTetc = TIM + 18; // Logic pass
UInt16 CLUTsize = BitConverter.ToUInt16(Stage, TIMoffsetCLUTetc); //GET CLUT size to UInt16
TIMoffsetCLUTetc += 2 + (CLUTsize * 512) + 8; // Logic pass - pass CLUT offset, to get to sensitive data
UInt16 szerU = BitConverter.ToUInt16(Stage, TIMoffsetCLUTetc); //Get raw UInt16 value of width from texture data
UInt16 wysoU = BitConverter.ToUInt16(Stage, TIMoffsetCLUTetc + 2); //Get raw UInt16 height value from texture data (real)
int width = szerU * 2; //Calculate real texture width (For 8BPP = width*2)
=== Face order / Translation/ triangulation ===
Anonymous user