示例#1
0
        public override void ParseData(BinaryReader br)
        {
            m_vImageType = br.ReadByte();

            if (m_vScImageTypes.ContainsKey(m_vImageType))
            {
                m_vImage = (ScImage)Activator.CreateInstance(m_vScImageTypes[m_vImageType]);
            }
            else
            {
                m_vImage = new ScImage();
            }
            m_vImage.ParseImage(br);
        }
示例#2
0
        public void ParseData2(BinaryReader br, byte fileType)
        {
            m_vFileType  = fileType;
            m_vImageType = br.ReadByte();

            if (m_vScImageTypes.ContainsKey(m_vImageType))
            {
                m_vImage = (ScImage)Activator.CreateInstance(m_vScImageTypes[m_vImageType]);
            }
            else
            {
                m_vImage = new ScImage();
            }
            m_vImage.ParseImage(br, fileType);
        }
示例#3
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();
 }
示例#4
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();
 }
示例#5
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();
 }
示例#6
0
 public ScImage(ScImage im)
 {
     m_vWidth = im.GetWidth();
     m_vHeight = im.GetHeight();
     m_vBitmap = new Bitmap(im.GetBitmap());
 }
示例#7
0
        public override void ParseData(BinaryReader br)
        {
            m_vImageType = br.ReadByte();

            if (m_vScImageTypes.ContainsKey(m_vImageType))
            {
                m_vImage = (ScImage)Activator.CreateInstance(m_vScImageTypes[m_vImageType]);
            }
            else
            {
                m_vImage = new ScImage();
            }
            m_vImage.ParseImage(br);
        }
示例#8
0
 public override void ParseData(BinaryReader br)
 {
     m_vImageType = br.ReadByte();
     m_vImage     = new ScImage();
     m_vImage.ParseImage(br, 0);
 }
示例#9
0
 public ScImage(ScImage im)
 {
     m_vWidth  = im.GetWidth();
     m_vHeight = im.GetHeight();
     m_vBitmap = new Bitmap(im.GetBitmap());
 }