lazarus/formats/dat/dat.go

22 lines
311 B
Go
Raw Normal View History

2018-12-16 22:09:18 +00:00
package dat
import (
"encoding/binary"
"io"
"github.com/FooSoft/lazarus/math"
)
type Palette struct {
Colors [256]math.Color3b
}
func NewFromReader(r io.Reader) (*Palette, error) {
p := new(Palette)
if err := binary.Read(r, binary.LittleEndian, p); err != nil {
return nil, err
}
return p, nil
}