mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 12:33:02 +00:00
28 lines
No EOL
757 B
C#
28 lines
No EOL
757 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace SanAndreasUnity.Importing.RenderWareStream
|
|
{
|
|
[SectionType(22)]
|
|
public class TextureDictionary : SectionData
|
|
{
|
|
public UInt16 TextureCount;
|
|
public TextureNative[] Textures;
|
|
|
|
public TextureDictionary(SectionHeader header, Stream stream)
|
|
: base(header, stream)
|
|
{
|
|
SectionHeader.Read(stream);
|
|
var reader = new BinaryReader(stream);
|
|
|
|
TextureCount = reader.ReadUInt16();
|
|
Textures = new TextureNative[TextureCount];
|
|
reader.ReadUInt16(); // Unknown
|
|
|
|
for (var i = 0; i < TextureCount; ++i)
|
|
{
|
|
Textures[i] = ReadSection<TextureNative>();
|
|
}
|
|
}
|
|
}
|
|
} |