// METHODS public static SourceDispVertices createLump(byte[] data) { int offset = 0; int structLength = 20; SourceDispVertices lump = new SourceDispVertices(new List<SourceDispVertex>(data.Length / structLength), data.Length); byte[] bytes = new byte[structLength]; for (int i = 0; i < data.Length / structLength; i++) { for (int j = 0; j < structLength; j++) { bytes[j] = data[offset + j]; } lump.Add(new SourceDispVertex(bytes)); offset += structLength; } return lump; }
// METHODS public static SourceDispVertices createLump(byte[] data) { int offset = 0; int structLength = 20; SourceDispVertices lump = new SourceDispVertices(new List <SourceDispVertex>(data.Length / structLength), data.Length); byte[] bytes = new byte[structLength]; for (int i = 0; i < data.Length / structLength; i++) { for (int j = 0; j < structLength; j++) { bytes[j] = data[offset + j]; } lump.Add(new SourceDispVertex(bytes)); offset += structLength; } return(lump); }