Example #1
0
        internal static W3dSphereColor Parse(BinaryReader reader)
        {
            var result = new W3dSphereColor
            {
                ChunkType = reader.ReadByte(),
                ChunkSize = reader.ReadByte(),
                Color     = reader.ReadColorRgbF(),
                Position  = reader.ReadSingle()
            };

            return(result);
        }
Example #2
0
        internal static W3dSphereColors Parse(BinaryReader reader)
        {
            var result = new W3dSphereColors
            {
                ChunkType = reader.ReadUInt32(),
                ChunkSize = reader.ReadUInt32() & 0x7FFFFFFF,
                Version   = reader.ReadUInt32(),                    // ? Version or something else?
                Colors    = new List <W3dSphereColor>()
            };

            var arraySize = reader.ReadUInt32();

            var arrayCount = arraySize / 18; // 18 = Size of Color Array Chunk + Header Info

            for (var i = 0; i < arrayCount; i++)
            {
                var color = W3dSphereColor.Parse(reader);
                result.Colors.Add(color);
            }

            return(result);
        }