예제 #1
0
 public Texture(Texture t)
 {
     m_vFileType      = t.m_vFileType;
     m_vImageType     = t.GetImageType();
     m_vStorageObject = t.GetStorageObject();
     m_vTextureId     = (short)m_vStorageObject.GetTextures().Count();
     if (m_vScImageTypes.ContainsKey(m_vImageType))
     {
         m_vImage = (ScImage)Activator.CreateInstance(m_vScImageTypes[m_vImageType]);
     }
     else
     {
         m_vImage = new ScImage();
     }
     m_vImage.SetBitmap(new Bitmap(t.GetBitmap()));
     m_vOffset = t.GetOffset() > 0 ? -t.GetOffset() : t.GetOffset();
 }
예제 #2
0
 public Texture(Texture t)
 {
     m_vImageType     = t.GetImageType();
     m_vStorageObject = t.GetStorageObject();
     m_vTextureId     = (short)m_vStorageObject.GetTextures().Count();
     m_vScImageTypes  = new Dictionary <byte, Type>();
     m_vScImageTypes.Add(0, typeof(ImageRgba8888));
     m_vScImageTypes.Add(2, typeof(ImageRgba4444));
     m_vScImageTypes.Add(4, typeof(ImageRgb565));
     if (m_vScImageTypes.ContainsKey(m_vImageType))
     {
         m_vImage = (ScImage)Activator.CreateInstance(m_vScImageTypes[m_vImageType]);
     }
     else
     {
         m_vImage = new ScImage();
     }
     m_vImage.SetBitmap(new Bitmap(t.GetBitmap()));
     m_vOffset = t.GetOffset() > 0 ? -t.GetOffset() : t.GetOffset();
 }
예제 #3
0
 public Texture(Texture t)
 {
     m_vImageType = t.GetImageType();
     m_vStorageObject = t.GetStorageObject();
     m_vTextureId = (short)m_vStorageObject.GetTextures().Count();
     m_vScImageTypes = new Dictionary<byte, Type>();
     m_vScImageTypes.Add(0, typeof(ImageRgba8888));
     m_vScImageTypes.Add(2, typeof(ImageRgba4444));
     m_vScImageTypes.Add(4, typeof(ImageRgb565));
     if (m_vScImageTypes.ContainsKey(m_vImageType))
     {
         m_vImage = (ScImage)Activator.CreateInstance(m_vScImageTypes[m_vImageType]);
     }
     else
     {
         m_vImage = new ScImage();
     }
     m_vImage.SetBitmap(new Bitmap(t.GetBitmap()));
     m_vOffset = t.GetOffset() > 0 ? -t.GetOffset() : t.GetOffset();
 }