Exemple #1
0
        public NiPixelData(BinaryReader reader, NiFile niFile) : base(reader, niFile)
        {
            Pallet = new NiRef <NiPalette>(niFile, reader.ReadInt32());

            MipMapCount = reader.ReadUInt32();

            BytesPerPixel = reader.ReadUInt32();

            MipMaps = new NiMipMap[MipMapCount];

            for (var i = 0; i < MipMapCount; i++)
            {
                MipMaps[i] = new NiMipMap(reader, niFile);
            }

            PixelCount = reader.ReadUInt32();

            FacesCount = reader.ReadUInt32();

            PixelData = new byte[PixelCount];

            for (var i = 0; i < PixelCount; i++)
            {
                PixelData[i] = reader.ReadByte();
            }
        }
        public NiPersistentSrcTextureRendererData(BinaryReader reader, NiFile niFile) : base(reader, niFile)
        {
            Palette = new NiRef <NiPalette>(niFile, reader.ReadInt32());

            MipMapCount = reader.ReadUInt32();

            BytesPerPixel = reader.ReadUInt32();

            MipMaps = new NiMipMap[MipMapCount];

            for (var i = 0; i < MipMapCount; i++)
            {
                MipMaps[i] = new NiMipMap(reader, niFile);
            }

            PixelCount = reader.ReadUInt32();

            PadPixelCount = reader.ReadUInt32();

            FacesCount = reader.ReadUInt32();

            Platform = (PlatformId)reader.ReadUInt32();

            PixelData = new byte[PixelCount];

            for (var i = 0; i < PixelCount; i++)
            {
                PixelData[i] = reader.ReadByte();
            }
        }