public HGOL01(byte[] fileData, int iPos) { this.fileData = fileData; this.iPos = iPos; version = BigEndianBitConverter.ToInt32(fileData, iPos); this.iPos += 4; ColoredConsole.WriteLineInfo("{0:x8} HGOL Version 0x{1:x2}", (object)iPos, (object)version); }
protected override void ReadTextureMeta() { this.iPos += 16; this.iPos += 4; this.iPos += 4; this.iPos += 4; this.iPos += 4; this.iPos += 4; this.iPos += 17; var int32 = BigEndianBitConverter.ToInt32(fileData, this.iPos); this.iPos += 4; var iPos = this.iPos; var str = readString(int32); ColoredConsole.WriteLineInfo("{0:x8} {2:0000} {1}", (object)iPos, (object)str, (object)Names.Count); Names.Add(str); this.iPos += 10; }
public override int Read() { var int32_1 = BigEndianBitConverter.ToInt32(fileData, iPos); iPos += 4; BigEndianBitConverter.ToInt32(fileData, iPos); iPos += 4; for (var index = 0; index < int32_1; ++index) { iPos += 4; iPos += 4; iPos += 4; iPos += 4; iPos += 4; iPos += 375; var int32_2 = BigEndianBitConverter.ToInt32(fileData, iPos); iPos += 4; iPos += 20; var int32_3 = BigEndianBitConverter.ToInt32(fileData, iPos); iPos += 4; iPos += 486; var int16 = BigEndianBitConverter.ToInt16(fileData, iPos); iPos += 2; var name = readString((int)int16); var int32_4 = BigEndianBitConverter.ToInt32(fileData, iPos); iPos += 4; iPos += int32_4 * 200; var int32_5 = BigEndianBitConverter.ToInt32(fileData, iPos); iPos += 4; iPos += int32_5 * 3; iPos += 111; ColoredConsole.WriteLineInfo("{0:x8} {4:0000} {1} --> Tex: {2}; Norm: {3}", (object)iPos, (object)name, (object)int32_2, (object)int32_3, (object)index); Materials.Add(new Material(name, int32_2, int32_3)); } return(iPos); }