예제 #1
0
        private static eTexType SetTextureType(string _t)
        {
            eTexType result = eTexType.eRaw;

            switch (_t.ToLower())
            {
            case "png":
                result = eTexType.ePNG;
                break;

            case "raw":
                result = eTexType.eRaw;
                break;

            case "dxt":
                result = eTexType.eDXT;
                break;

            case "pvr":
                result = eTexType.ePVR;
                break;

            case "16b":
            case "16bit":
            case "4444":
                result = eTexType.e4444;
                break;
            }
            return(result);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NiTextureTransformController"/> class.
        /// </summary>
        /// <param name="file">The file.</param>
        /// <param name="reader">The reader.</param>
        public NiTextureTransformController(NiFile file, BinaryReader reader) : base(file, reader)
		{
			this.Unkown2 = reader.ReadByte();
			this.TextureSlot = (eTexType)reader.ReadUInt32();
			this.Operation = (eTexTransform)reader.ReadUInt32();
			if (base.Version <= eNifVersion.VER_10_1_0_0)
			{
				this.Data = new NiRef<NiFloatData>(reader);
			}
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="NiTextureTransformController"/> class.
 /// </summary>
 /// <param name="file">The file.</param>
 /// <param name="reader">The reader.</param>
 public NiTextureTransformController(NiFile file, BinaryReader reader) : base(file, reader)
 {
     this.Unkown2     = reader.ReadByte();
     this.TextureSlot = (eTexType)reader.ReadUInt32();
     this.Operation   = (eTexTransform)reader.ReadUInt32();
     if (base.Version <= eNifVersion.VER_10_1_0_0)
     {
         this.Data = new NiRef <NiFloatData>(reader);
     }
 }
예제 #4
0
        public static string TextureTypeExtension(eTexType _textureType)
        {
            switch (_textureType)
            {
            case eTexType.eDXT:
                return(".dds");

            case eTexType.ePVR:
                return(".pvr");

            case eTexType.eRaw:
            case eTexType.e4444:
                return(".raw");

            case eTexType.ePNG:
                return(".png");

            default:
                return(".dds");
            }
        }