Switch from encoding/binary to struc

It's not perfect, but struc can deserialize the whole thing into one
struct while encoding/binary can't. It's nice to have that.
This commit is contained in:
2020-06-09 00:35:57 +01:00
parent 65bae80d40
commit cf624cc77b
7 changed files with 118 additions and 172 deletions

View File

@@ -9,7 +9,7 @@ type CellPoint struct {
Z int
}
func (s *Scenario) CellAtCursor() (maps.Cell, CellPoint) {
func (s *Scenario) CellAtCursor() (*maps.Cell, CellPoint) {
cell := s.area.Cell(int(s.selectedCell.X), int(s.selectedCell.Y), 0)
return cell, CellPoint{IsoPt: s.selectedCell, Z: 0}
}