Beispiel #1
0
 public Texture_0006()
 {
     textureStruct      = new TextureStruct_0001();
     diffuseTextureName = new String_0002();
     alphaTextureName   = new String_0002();
     textureExtension   = new Extension_0003();
 }
Beispiel #2
0
        public Texture_0006 Read(BinaryReader binaryReader)
        {
            sectionIdentifier = Section.Texture;
            sectionSize       = binaryReader.ReadInt32();
            renderWareVersion = binaryReader.ReadInt32();

            Section textureStructSection = (Section)binaryReader.ReadInt32();

            if (textureStructSection != Section.Struct)
            {
                throw new Exception();
            }
            textureStruct = new TextureStruct_0001().Read(binaryReader);

            Section diffuseTextureNameSection = (Section)binaryReader.ReadInt32();

            if (diffuseTextureNameSection != Section.String)
            {
                throw new Exception();
            }
            diffuseTextureName = new String_0002().Read(binaryReader);

            Section alphaTextureNameSection = (Section)binaryReader.ReadInt32();

            if (alphaTextureNameSection != Section.String)
            {
                throw new Exception();
            }
            alphaTextureName = new String_0002().Read(binaryReader);

            Section textureExtensionSection = (Section)binaryReader.ReadInt32();

            if (textureExtensionSection != Section.Extension)
            {
                throw new Exception();
            }
            textureExtension = new Extension_0003().Read(binaryReader);

            return(this);
        }