Skip to content

Commit

Permalink
DPI issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yongyi781 committed May 27, 2023
1 parent 7448f09 commit 025ea85
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 286 deletions.
8 changes: 4 additions & 4 deletions Common/MapWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public MapWriter(ResourceManager resources)
this.resources = resources;
}

public Image? BaseOverlay => resources.GetObject("BaseOverlay") as Image;
public Image? BossOverlay => resources.GetObject("BossOverlay") as Image;
public Bitmap? BaseOverlay => resources.GetObject("BaseOverlay") as Bitmap;
public Bitmap? BossOverlay => resources.GetObject("BossOverlay") as Bitmap;

public void Draw(Graphics g, Map map, bool drawCritRooms = false, bool drawDeadEnds = true)
{
Expand Down Expand Up @@ -43,9 +43,9 @@ public void Draw(Graphics g, Map map, bool drawCritRooms = false, bool drawDeadE
}

if (BaseOverlay != null)
g.DrawImage(BaseOverlay, 32 * map.Base.X, 32 * (map.Height - 1 - map.Base.Y));
g.DrawImage(BaseOverlay, 32 * map.Base.X, 32 * (map.Height - 1 - map.Base.Y), 32, 32);
if (BossOverlay != null)
g.DrawImage(BossOverlay, 32 * map.Boss.X, 32 * (map.Height - 1 - map.Boss.Y));
g.DrawImage(BossOverlay, 32 * map.Boss.X, 32 * (map.Height - 1 - map.Boss.Y), 32, 32);
}

public Bitmap WriteToImage(Map map, bool drawCritRooms = false, bool drawDeadEnds = false)
Expand Down
Loading

0 comments on commit 025ea85

Please sign in to comment.