Fix some errors in iso->pix->iso conversions, add debugging

Maps now render a bit more properly, and our mouse position can be
correctly assigned to a cell. Kind of, mostly.
This commit is contained in:
2020-04-18 00:12:15 +01:00
parent 1e141a2fb9
commit 6e70ddcb60
8 changed files with 156 additions and 23 deletions

View File

@@ -77,6 +77,11 @@ func (m *Map) LoadSprites() error {
return nil
}
// FIXME: get rid of this
func (m *Map) Cell(x, y, z int) maps.Cell {
return m.raw.Cells.At(x, y, z)
}
// SpritesForCell returns the sprites needed to correctly render this cell.
// They should be rendered from first to last to get the correct ordering
func (m *Map) SpritesForCell(x, y, z int) ([]*Sprite, error) {