Example #1
0
        public override void LoadFromStream(Stream AStream, HCStyle AStyle, ushort AFileVersion)
        {
            base.LoadFromStream(AStream, AStyle, AFileVersion);
            if (AFileVersion > 12)
            {
                int    vFloatCount = 0;
                byte[] vBuffer     = BitConverter.GetBytes(vFloatCount);
                AStream.Read(vBuffer, 0, vBuffer.Length);
                vFloatCount = BitConverter.ToInt32(vBuffer, 0);
                HCFloatItem vFloatItem = null;

                while (vFloatCount > 0)
                {
                    int vStyleNo = HCStyle.Null;
                    vBuffer = BitConverter.GetBytes(vStyleNo);
                    AStream.Read(vBuffer, 0, vBuffer.Length);
                    vFloatItem = CreateFloatItemByStyle(vStyleNo);
                    vFloatItem.LoadFromStream(AStream, AStyle, AFileVersion);
                    FFloatItems.Add(vFloatItem);

                    vFloatCount--;
                }
            }
        }