Fix up the concept of "None" tiles and objects

Replace with "Unknown" which is effectively an invalid value
This commit is contained in:
Marc Di Luzio 2020-07-19 12:33:11 +01:00
parent 305f64ec38
commit 7bdfa44fb6
10 changed files with 72 additions and 87 deletions

View file

@ -10,8 +10,6 @@ import (
// TileGlyph returns the glyph for this tile type
func TileGlyph(t roveapi.Tile) Glyph {
switch t {
case roveapi.Tile_TileNone:
return GlyphNone
case roveapi.Tile_Rock:
return GlyphGroundRock
case roveapi.Tile_Gravel:
@ -21,7 +19,7 @@ func TileGlyph(t roveapi.Tile) Glyph {
}
log.Fatalf("Unknown tile type: %c", t)
return GlyphNone
return 0
}
// Atlas represents a 2D world atlas of tiles and objects