Move glyph functions out to the glyph file
This commit is contained in:
parent
7bdfa44fb6
commit
4a89cb9d6e
3 changed files with 36 additions and 34 deletions
|
@ -1,26 +1,9 @@
|
|||
package atlas
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/mdiluz/rove/proto/roveapi"
|
||||
)
|
||||
|
||||
// ObjectGlyph returns the glyph for this object type
|
||||
func ObjectGlyph(o roveapi.Object) Glyph {
|
||||
switch o {
|
||||
case roveapi.Object_RoverLive:
|
||||
return GlyphRoverLive
|
||||
case roveapi.Object_RockSmall:
|
||||
return GlyphRockSmall
|
||||
case roveapi.Object_RockLarge:
|
||||
return GlyphRockLarge
|
||||
}
|
||||
|
||||
log.Fatalf("Unknown object type: %c", o)
|
||||
return 0
|
||||
}
|
||||
|
||||
// Object represents an object in the world
|
||||
type Object struct {
|
||||
// The type of the object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue