public void UpdateConfigCollision() { try { if (CollisionMaskA != null) { CollisionMaskA.Dispose(); } if (CollisionMaskB != null) { CollisionMaskB.Dispose(); } if (CollectiveImage != null) { CollectiveImage.Dispose(); } CollisionMaskA = new Classes.Rendering.GIF(DrawCollisionMaskA()); CollisionMaskB = new Classes.Rendering.GIF(DrawCollisionMaskB()); CollectiveImage = new Classes.Rendering.GIF(CreateCollectiveImage()); } catch (Exception ex) { throw new Events.TileConfigException("Unable to load Tileconfig.bin!" + Environment.NewLine + "Full Exception Details: " + ex.Message); } }
public void Reload(string PaletteDataPath = null) { if (BaseImage != null) { BaseImage.Reload(PaletteDataPath); } if (IDImage != null) { IDImage.Reload(); } if (InternalImage != null) { InternalImage.Reload(); } if (CollisionMaskA != null) { CollisionMaskA.Reload(DrawCollisionMaskA()); } if (CollisionMaskB != null) { CollisionMaskB.Reload(DrawCollisionMaskB()); } if (CollectiveImage != null) { CollectiveImage.Reload(CreateCollectiveImage()); } }
public void Dispose() { if (BaseImage != null) { BaseImage.Dispose(); } if (IDImage != null) { IDImage.Dispose(); } if (CollisionMaskA != null) { CollisionMaskA.Dispose(); } if (CollisionMaskB != null) { CollisionMaskB.Dispose(); } if (InternalImage != null) { InternalImage.Dispose(); } if (CollectiveImage != null) { CollectiveImage.Dispose(); } }
public Bitmap CreateCollectiveImage() { int bitmap_width = 16 * 5; int bitmap_height = 16384; Bitmap bitmap = new Bitmap(bitmap_width, bitmap_height); using (Graphics gfx = Graphics.FromImage(bitmap)) { if (BaseImage != null) { gfx.DrawImage(BaseImage.ToBitmap(), new Point(0, 0)); } if (IDImage != null) { gfx.DrawImage(IDImage.ToBitmap(), new Point(16, 0)); } if (CollisionMaskA != null) { gfx.DrawImage(CollisionMaskA.ToBitmap(), new Point(32, 0)); } if (CollisionMaskB != null) { gfx.DrawImage(CollisionMaskB.ToBitmap(), new Point(48, 0)); } if (InternalImage != null) { gfx.DrawImage(InternalImage.ToBitmap(), new Point(64, 0)); } } return(bitmap); }