Skip to content

Commit

Permalink
Fixed tile editor bug when using the "Clear Tileset" with LUT and Til…
Browse files Browse the repository at this point in the history
…eset #.
  • Loading branch information
dtremblay committed May 20, 2021
1 parent 740abb6 commit 11547b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Main/UI/TileEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,11 @@ private void ClearTilemapButton_Click(object sender, EventArgs e)
byte selectedTile = (byte)(selectedY * 16 + selectedX);
int width = Convert.ToInt32(Width.Text);
int height = Convert.ToInt32(Height.Text);
byte lut = (byte)LutList.SelectedIndex;
for (int i = 0; i < width * height * 2 + 1; i = i+ 2)
{
MemMgr.WriteByte(tilemapAddress + i, selectedTile);
MemMgr.WriteByte(tilemapAddress + i + 1, 0);
MemMgr.WriteByte(tilemapAddress + i + 1, (byte)((lut << 3) + TilesetList.SelectedIndex));
}
}

Expand Down
Binary file modified bin/Release/FoenixIDE.exe
Binary file not shown.

0 comments on commit 11547b4

Please sign in to comment.