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:
@@ -47,7 +47,7 @@ func (a *AssetStore) Map(name string) (*Map, error) {
|
||||
}
|
||||
|
||||
m := &Map{
|
||||
Rect: raw.Rect(),
|
||||
Rect: raw.Rect(),
|
||||
assets: a,
|
||||
raw: raw,
|
||||
set: set,
|
||||
@@ -74,8 +74,8 @@ func (m *Map) LoadSprites() error {
|
||||
}
|
||||
|
||||
// FIXME: get rid of this
|
||||
func (m *Map) Cell(x, y, z int) maps.Cell {
|
||||
return m.raw.Cells.At(x, y, z)
|
||||
func (m *Map) Cell(x, y, z int) *maps.Cell {
|
||||
return m.raw.At(x, y, z)
|
||||
}
|
||||
|
||||
// SpritesForCell returns the sprites needed to correctly render this cell.
|
||||
|
Reference in New Issue
Block a user