public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(SubtypeImage(obj.SubType).Image); bits.Flip(obj.XFlip, obj.YFlip); return(new Sprite(bits, new Point(obj.X + SubtypeImage(obj.SubType).X, obj.Y + SubtypeImage(obj.SubType).Y))); }
public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(imgs[imgindex(obj.SubType)].Image); bits.Flip(obj.XFlip, obj.YFlip); return(new Sprite(bits, new Point(obj.X + imgs[imgindex(obj.SubType)].Offset.X, obj.Y + imgs[imgindex(obj.SubType)].Offset.Y))); }
public override Sprite GetSprite(ObjectEntry obj) { byte subtype = obj.SubType; if (subtype <= 7 | subtype > 9) { BitmapBits bits = new BitmapBits(img.Image); bits.Flip(obj.XFlip, obj.YFlip); Sprite spr = new Sprite(bits, new Point(obj.X + img.Offset.X, obj.Y + img.Offset.Y)); if (subtype <= 7) { bits = new BitmapBits(imgs[subtype].Image); bits.Flip(obj.XFlip, obj.YFlip); spr = new Sprite(spr, new Sprite(bits, new Point(obj.X + imgs[subtype].Offset.X, obj.Y + imgs[subtype].Offset.Y))); } return(spr); } else { BitmapBits bits = new BitmapBits(postimg.Image); bits.Flip(obj.XFlip, obj.YFlip); Sprite spr = new Sprite(bits, new Point(obj.X + postimg.Offset.X, obj.Y + postimg.Offset.Y)); bits = new BitmapBits(imgs[subtype].Image); bits.Flip(obj.XFlip, obj.YFlip); return(new Sprite(spr, new Sprite(bits, new Point(obj.X + imgs[subtype].Offset.X, obj.Y + imgs[subtype].Offset.Y)))); } }
public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(imgs[(obj.SubType & 0xE) << 1].Image); bits.Flip(obj.XFlip, obj.YFlip); return(new Sprite(bits, new Point(obj.X + imgs[(obj.SubType & 0xE) << 1].X, obj.Y + imgs[(obj.SubType & 0xE) << 1].Y))); }
public override Sprite GetSprite(ObjectEntry obj) { byte subtype = obj.SubType; if (obj.SubType > labels.Length) subtype = 0; BitmapBits bits = new BitmapBits(imgs[subtype].Image); bits.Flip(obj.XFlip, obj.YFlip); return new Sprite(bits, new Point(obj.X + imgs[subtype].Offset.X, obj.Y + imgs[subtype].Offset.Y)); }
public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(imgs[imgindex(obj.SubType)].Image); bits.Flip(obj.XFlip, obj.YFlip); Sprite spr = new Sprite(bits, imgs[imgindex(obj.SubType)].Offset); spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y); return(spr); }
public void Flip(bool xflip, bool yflip) { Image.Flip(xflip, yflip); if (xflip) { X = -(Width + X); } if (yflip) { Y = -(Height + Y); } }
public override Sprite GetSprite(ObjectEntry obj) { byte subtype = obj.SubType; if (obj.SubType > labels.Length) { subtype = 0; } BitmapBits bits = new BitmapBits(imgs[subtype].Image); bits.Flip(obj.XFlip, obj.YFlip); return(new Sprite(bits, new Point(obj.X + imgs[subtype].X, obj.Y + imgs[subtype].Y))); }
public override Sprite GetSprite(ObjectEntry obj) { int frame = obj.SubType >> 4; if (frame > 5) { frame = 0; } BitmapBits bits = new BitmapBits(imgs[frame].Image); bits.Flip(obj.XFlip, obj.YFlip); return(new Sprite(bits, new Point(obj.X + imgs[frame].X, obj.Y + imgs[frame].Y))); }
public override Sprite GetSprite(ObjectEntry obj) { Sprite img = new Sprite(); if (obj.YFlip == true) { img = imgs[1]; } else { img = imgs[0]; } Sprite spr = new Sprite(img.Image, new Point(img.X, img.Y)); BitmapBits bits = new BitmapBits(spr.Image); bits.Flip(obj.XFlip, obj.YFlip); spr.Image = bits; spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y); return(spr); }
public override Sprite GetSprite(ObjectEntry obj) { int frame = obj.SubType >> 4; if (frame > 5) frame = 0; BitmapBits bits = new BitmapBits(imgs[frame].Image); bits.Flip(obj.XFlip, obj.YFlip); return new Sprite(bits, new Point(obj.X + imgs[frame].X, obj.Y + imgs[frame].Y)); }
public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(imgs[imgindex(obj.SubType)].Image); bits.Flip(obj.XFlip, obj.YFlip); return new Sprite(bits, new Point(obj.X + imgs[imgindex(obj.SubType)].Offset.X, obj.Y + imgs[imgindex(obj.SubType)].Offset.Y)); }
public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(imgs[(obj.SubType & 0xE) << 1].Image); bits.Flip(obj.XFlip, obj.YFlip); return new Sprite(bits, new Point(obj.X + imgs[(obj.SubType & 0xE) << 1].X, obj.Y + imgs[(obj.SubType & 0xE) << 1].Y)); }
public override Sprite GetSprite(ObjectEntry obj) { BitmapBits bits = new BitmapBits(SubtypeImage(obj.SubType).Image); bits.Flip(obj.XFlip, obj.YFlip); return new Sprite(bits, new Point(obj.X + SubtypeImage(obj.SubType).X, obj.Y + SubtypeImage(obj.SubType).Y)); }