Changes

Jump to navigation Jump to search

FF8/FileFormat X

10 bytes added, 20:11, 19 July 2015
TIM Texture width/height resolving: Updated code- faster, less data and unimportant stuff.
=== TIM Texture width/height resolving ===
//Updated - 19.07.2015 by MaKiPL
Byte[] OPN Stage = File.ReadAllBytes(@"PATH TO .X stage file"); //Change this Load file to memory Byte[] TIMtexture = { 0x10, 0x00, 0x00, 0x00, 0x09 };//Initialize 8BPP header int TIMoffset = ByteSearch(OPNStage, TIMtexture, 0); //Byte search is special search Search in Stage for byte array custom functionTIM header int TIMoffsetCLUTetc = TIMoffset TIM + 18; Byte[] CLUT = new byte[2]; Array.Copy(OPN, TIMoffsetCLUTetc, CLUT, 0, 2);// Logic pass UInt16 CLUTsize = BitConverter.ToUInt16(CLUTStage, 0TIMoffsetCLUTetc); //DETERMINE HOW MUCH TO PASSGET CLUT size to UInt16 TIMoffsetCLUTetc += 2 + (CLUTsize * 512) + 8; Byte[] szer = new byte[2]; Byte[] wyso = new byte[2]; Array.Copy(OPN, TIMoffsetCLUTetc, szer, 0, 2); Array.Copy(OPN, TIMoffsetCLUTetc + 2, wyso, 0// Logic pass - pass CLUT offset, 2);to get to sensitive data UInt16 szerU = BitConverter.ToUInt16(szerStage, 0TIMoffsetCLUTetc);//Get raw UInt16 value of width from texture data UInt16 wysoU = BitConverter.ToUInt16(wysoStage, 0TIMoffsetCLUTetc + 2);//Get raw UInt16 height value from texture data (real) int newSzerU width = szerU * 2;//Calculate real texture width (For 8BPP = width*2)
=== Face order / Translation/ triangulation ===
Anonymous user

Navigation menu