public virtual void Load(byte[] data, ref int offset) { Type = FSHelpers.ReadString(data, offset, 4); ChunkSize = FSHelpers.Read32(data, offset + 4); _dataCopy = FSHelpers.ReadN(data, offset, ChunkSize); }
public void Load(byte[] data, uint offset) { ArrayType = (ArrayTypes)FSHelpers.Read32(data, (int)offset); ArrayCount = (uint)FSHelpers.Read32(data, (int)offset + 4); DataType = (DataTypes)FSHelpers.Read32(data, (int)offset + 8); DecimalPoint = FSHelpers.Read8(data, (int)offset + 12); }
public void Load(byte[] data, ref int offset) { Position = new Vector3( FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset)), FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 4)), FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 8))); offset += Size; }
public BatchPacketLocation GetBatchPacketLocation(uint index) { BatchPacketLocation newBp = new BatchPacketLocation(); newBp.PacketSize = (uint)FSHelpers.Read32(_dataCopy, (int)(_packetLocationOffset + (index * BatchPacketLocation.Size) + 0x0)); newBp.Offset = (uint)FSHelpers.Read32(_dataCopy, (int)(_packetLocationOffset + (index * BatchPacketLocation.Size) + 0x4)); return(newBp); }
public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _textureCount = (ushort)FSHelpers.Read16(data, offset + 0x08); _textureHeaderOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _stringTableOffset = (uint)FSHelpers.Read32(data, offset + 0x10); offset += ChunkSize; }
public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _sectionCount = (ushort)FSHelpers.Read16(data, offset + 0x8); _isWeightedOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _dataOffset = (uint)FSHelpers.Read32(data, offset + 0x10); offset += ChunkSize; }
public void Load(byte[] data, ref int offset) { Magic = FSHelpers.ReadString(data, 0, 4); Type = FSHelpers.ReadString(data, 4, 4); FileSize = FSHelpers.Read32(data, 8); ChunkCount = FSHelpers.Read32(data, 12); //Four variables are followed by an unused tag and some padding. offset += 32; }
public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _jointCount = (ushort)FSHelpers.Read16(data, offset + 0x8); _entryOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _stringIdTableOffset = (uint)FSHelpers.Read32(data, offset + 0x10); _stringTableOffset = (uint)FSHelpers.Read32(data, offset + 0x14); offset += ChunkSize; }
public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _unknown = (ushort)FSHelpers.Read16(data, offset + 8); _packetCount = (uint)FSHelpers.Read32(data, offset + 12); //2 bytes padding after _unusedEntryCount _vertexCount = (uint)FSHelpers.Read32(data, offset + 16); _hierarchyDataOffset = (uint)FSHelpers.Read32(data, offset + 20); offset += ChunkSize; }
private uint _matrixDataOffset; //3x4 float array. Indeded into by something else. 15 in BST public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _sectionCount = (ushort)FSHelpers.Read16(data, offset + 0x8); _countsArrayOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _indicesOffset = (uint)FSHelpers.Read32(data, offset + 0x10); _weightsOffset = (uint)FSHelpers.Read32(data, offset + 0x14); _matrixDataOffset = (uint)FSHelpers.Read32(data, offset + 0x18); offset += ChunkSize; }
public void Load(byte[] data, ref int offset) { VertexCount = FSHelpers.Read32(data, 0); VertexOffset = FSHelpers.Read32(data, 4); TriangleCount = FSHelpers.Read32(data, 8); TriangleOffset = FSHelpers.Read32(data, 12); Unknown1Count = FSHelpers.Read32(data, 16); Unknown1Offset = FSHelpers.Read32(data, 20); Unknown2Count = FSHelpers.Read32(data, 24); Unknown2Offset = FSHelpers.Read32(data, 28); TypeCount = FSHelpers.Read32(data, 32); TypeOffset = FSHelpers.Read32(data, 36); Unknown3Count = FSHelpers.Read32(data, 40); Unknown3Offset = FSHelpers.Read32(data, 44); offset += Size; }
public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); //Load information from header _batchCount = (ushort)FSHelpers.Read16(data, offset + 0x8); _batchDataOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _unknownTableOffset = (uint)FSHelpers.Read32(data, offset + 0x10); _zero = (uint)FSHelpers.Read32(data, offset + 0x14); _attributeOffset = (uint)FSHelpers.Read32(data, offset + 0x18); _matrixTableOffset = (uint)FSHelpers.Read32(data, offset + 0x1C); _primitiveDataOffset = (uint)FSHelpers.Read32(data, offset + 0x20); _matrixDataOffset = (uint)FSHelpers.Read32(data, offset + 0x24); _packetLocationOffset = (uint)FSHelpers.Read32(data, offset + 0x28); offset += ChunkSize; }
public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _materialCount = (ushort)FSHelpers.Read16(data, offset + 0x8); //Two bytes padding _materialInitDataOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _materialIndexOffset = (uint)FSHelpers.Read32(data, offset + 0x10); _stringTableOffset = (uint)FSHelpers.Read32(data, offset + 0x14); _indirectTextureOffset = (uint)FSHelpers.Read32(data, offset + 0x18); _gxCullModeOffset = (uint)FSHelpers.Read32(data, offset + 0x1C); _gxColorOffset = (uint)FSHelpers.Read32(data, offset + 0x20); _colorChannelNumOffset = (uint)FSHelpers.Read32(data, offset + 0x24); _colorChannelInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x28); _gxColor2Offset = (uint)FSHelpers.Read32(data, offset + 0x2C); _lightInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x30); _texGenNumberOffset = (uint)FSHelpers.Read32(data, offset + 0x34); _texCoordInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x38); _texCoordInfo2Offset = (uint)FSHelpers.Read32(data, offset + 0x3C); _texMatrixInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x40); _texMatrix2InfoOffset = (uint)FSHelpers.Read32(data, offset + 0x44); _textureIndex = (uint)FSHelpers.Read32(data, offset + 0x48); _tevOrderInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x4C); _gxColorS10Offset = (uint)FSHelpers.Read32(data, offset + 0x50); _gxColor3Offset = (uint)FSHelpers.Read32(data, offset + 0x54); _tevStageNumInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x58); _tevStageInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x5C); _tevSwapModeInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x60); _tevSwapModeTableInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x64); _fogInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x68); _alphaCompareInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x6C); _blendInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x70); _zModeInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x74); _zCompareInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x78); _ditherINfoOffset = (uint)FSHelpers.Read32(data, offset + 0x7C); _nbtScaleInfoOffset = (uint)FSHelpers.Read32(data, offset + 0x80); offset += ChunkSize; GetMaterialInitData(0); }
} //Relative to file header public void Load(byte[] data, uint offset) { Format = (TextureFormat)FSHelpers.Read8(data, (int)offset + 0x00); _alphaUnknownSetting = FSHelpers.Read8(data, (int)offset + 0x01); Width = (ushort)FSHelpers.Read16(data, (int)offset + 0x02); Height = (ushort)FSHelpers.Read16(data, (int)offset + 0x04); WrapS = (WrapMode)FSHelpers.Read8(data, (int)offset + 0x06); WrapT = (WrapMode)FSHelpers.Read8(data, (int)offset + 0x07); PaletteFormat = (PaletteFormat)FSHelpers.Read8(data, (int)offset + 0x8); _unknown1 = FSHelpers.Read8(data, (int)offset + 0x09); PaletteEntryCount = (ushort)FSHelpers.Read16(data, (int)offset + 0xA); PaletteDataOffset = (uint)FSHelpers.Read32(data, (int)offset + 0xC); _unknown2 = (uint)FSHelpers.Read32(data, (int)offset + 0x10); FilterSettingMin = (FilterMode)FSHelpers.Read8(data, (int)offset + 0x14); FilterSettingMag = (FilterMode)FSHelpers.Read8(data, (int)offset + 0x15); _padding1 = (ushort)FSHelpers.Read16(data, (int)offset + 0x16); _imageCount = FSHelpers.Read8(data, (int)offset + 0x18); _padding2 = FSHelpers.Read8(data, (int)offset + 0x19); _padding3 = (ushort)FSHelpers.Read16(data, (int)offset + 0x1A); ImageDataOffset = (uint)FSHelpers.Read32(data, (int)offset + 0x1C); }
private uint _tex7DataOffset; //Presumed public override void Load(byte[] data, ref int offset) { base.Load(data, ref offset); _vertexFormatsOffset = (uint)FSHelpers.Read32(data, offset + 0x8); _positionDataOffset = (uint)FSHelpers.Read32(data, offset + 0xC); _normalDataOffset = (uint)FSHelpers.Read32(data, offset + 0x10); _normalBinormalTangentDataOffset = (uint)FSHelpers.Read32(data, offset + 0x14); _color0DataOffset = (uint)FSHelpers.Read32(data, offset + 0x18); _color1DataOffset = (uint)FSHelpers.Read32(data, offset + 0x1C); _tex0DataOffset = (uint)FSHelpers.Read32(data, offset + 0x20); _tex1DataOffset = (uint)FSHelpers.Read32(data, offset + 0x24); _tex2DataOffset = (uint)FSHelpers.Read32(data, offset + 0x28); _tex3DataOffset = (uint)FSHelpers.Read32(data, offset + 0x2C); _tex4DataOffset = (uint)FSHelpers.Read32(data, offset + 0x30); _tex5DataOffset = (uint)FSHelpers.Read32(data, offset + 0x34); _tex6DataOffset = (uint)FSHelpers.Read32(data, offset + 0x38); _tex7DataOffset = (uint)FSHelpers.Read32(data, offset + 0x3C); offset += ChunkSize; }
public void Load(byte[] data, ref int offset) { NameOffset = FSHelpers.Read32(data, offset); Unknown1 = new Vector3( FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 4)), FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 8)), FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 12))); Unknown2 = FSHelpers.Read32(data, offset + 16); Unknown3 = FSHelpers.Read32(data, offset + 20); Unknown4 = new Vector3( FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 24)), FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 28)), FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, offset + 32))); Unknown5 = FSHelpers.Read32(data, (int)offset + 36); Unknown6 = FSHelpers.Read32(data, (int)offset + 40); Unknown7 = FSHelpers.Read32(data, (int)offset + 44); Unknown8 = FSHelpers.Read32(data, (int)offset + 48); Name = FSHelpers.ReadString(data, (int)NameOffset); offset += Size; }
public void Load(byte[] data, uint offset) { Unknown = (ushort)FSHelpers.Read16(data, (int)(offset + 0x0)); Count = (ushort)FSHelpers.Read16(data, (int)(offset + 0x2)); FirstIndex = (uint)FSHelpers.Read32(data, (int)(offset + 0x4)); }
public void Load(byte[] data, uint offset) { AttribType = (ArrayTypes)FSHelpers.Read32(data, (int)offset); DataType = (DataTypes)FSHelpers.Read32(data, (int)offset + 0x4); }