예제 #1
0
파일: Asset.cs 프로젝트: yooyke/work
        public static void ImageDecompress(AssetBase assetBase)
        {
            if (assetBase == null)
                return;

            AssetType type = (AssetType)assetBase.Type;

            AssetTexture texture = null;
            switch(type)
            {
                case AssetType.ImageJPEG:
                case AssetType.ImageTGA:
                case AssetType.Texture: // Jpeg2000
                case AssetType.TextureTGA:
                    texture = new AssetTexture(new UUID(assetBase.ID), assetBase.Data);
                    break;
            }

            if (texture == null)
                return;

            if (type == AssetType.Texture)
            {
                try
                {
                    if (texture.Decode())
                        assetBase.Data = texture.Image.ExportTGA();
                }
                catch { }
            }
        }
예제 #2
0
파일: AssetIrr.cs 프로젝트: yooyke/work
 public void AddMaterial(AssetBase material)
 {
     materials.Add(material);
 }
예제 #3
0
파일: AssetIrr.cs 프로젝트: yooyke/work
 public AssetIrrMemory(AssetBase assetBase)
 {
     irrFile = assetBase;
 }