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); }
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); }
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(); }
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(); }
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(); }
public ScImage(ScImage im) { m_vWidth = im.GetWidth(); m_vHeight = im.GetHeight(); m_vBitmap = new Bitmap(im.GetBitmap()); }
public override void ParseData(BinaryReader br) { m_vImageType = br.ReadByte(); m_vImage = new ScImage(); m_vImage.ParseImage(br, 0); }