private void ReadSourceVtxIndices(long stripGroupInputFileStreamPosition, SourceVtxStripGroup aStripGroup) { stream.Position = stripGroupInputFileStreamPosition + aStripGroup.indexOffset; aStripGroup.theVtxIndices = new ushort[aStripGroup.indexCount]; for (int i = 0; i < aStripGroup.theVtxIndices.Length; i++) { aStripGroup.theVtxIndices[i] = FileReader.readUShort(stream); } }
private void ReadSourceVtxStrips(long stripGroupInputFileStreamPosition, SourceVtxStripGroup aStripGroup) { stream.Position = stripGroupInputFileStreamPosition + aStripGroup.stripOffset; aStripGroup.theVtxStrips = new SourceVtxStrip[aStripGroup.stripCount]; for (int i = 0; i < aStripGroup.theVtxStrips.Length; i++) { aStripGroup.theVtxStrips[i] = new SourceVtxStrip(); aStripGroup.theVtxStrips[i].indexCount = FileReader.readInt(stream); aStripGroup.theVtxStrips[i].indexMeshIndex = FileReader.readInt(stream); aStripGroup.theVtxStrips[i].vertexCount = FileReader.readInt(stream); aStripGroup.theVtxStrips[i].vertexMeshIndex = FileReader.readInt(stream); aStripGroup.theVtxStrips[i].boneCount = FileReader.readShort(stream); aStripGroup.theVtxStrips[i].flags = FileReader.readByte(stream); aStripGroup.theVtxStrips[i].boneStateChangeCount = FileReader.readInt(stream); aStripGroup.theVtxStrips[i].boneStateChangeOffset = FileReader.readInt(stream); } }
private void ReadSourceVtxVertices(long stripGroupInputFileStreamPosition, SourceVtxStripGroup aStripGroup) { stream.Position = stripGroupInputFileStreamPosition + aStripGroup.vertexOffset; aStripGroup.theVtxVertices = new SourceVtxVertex[aStripGroup.vertexCount]; for (int i = 0; i < aStripGroup.theVtxVertices.Length; i++) { aStripGroup.theVtxVertices[i] = new SourceVtxVertex(); aStripGroup.theVtxVertices[i].boneWeightIndex = new byte[VVDParser.MAX_NUM_BONES_PER_VERT]; for (int j = 0; j < aStripGroup.theVtxVertices[i].boneWeightIndex.Length; j++) { aStripGroup.theVtxVertices[i].boneWeightIndex[j] = FileReader.readByte(stream); } aStripGroup.theVtxVertices[i].boneCount = FileReader.readByte(stream); aStripGroup.theVtxVertices[i].originalMeshVertexIndex = FileReader.readUShort(stream); aStripGroup.theVtxVertices[i].boneId = new byte[VVDParser.MAX_NUM_BONES_PER_VERT]; for (int j = 0; j < aStripGroup.theVtxVertices[i].boneId.Length; j++) { aStripGroup.theVtxVertices[i].boneId[j] = FileReader.readByte(stream); } } }