Documentation ¶
Overview ¶
Package d2dat contains the logic for loading and processing DAT files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DATColor ¶
type DATColor struct {
// contains filtered or unexported fields
}
DATColor represents a single color in a DAT file.
type DATPalette ¶
type DATPalette struct {
// contains filtered or unexported fields
}
DATPalette represents a 256 color palette.
func (*DATPalette) GetColor ¶
func (p *DATPalette) GetColor(idx int) (d2interface.Color, error)
GetColor returns a color by index
func (*DATPalette) GetColors ¶
func (p *DATPalette) GetColors() [numColors]d2interface.Color
GetColors returns the slice of colors in the palette
func (*DATPalette) Marshal ¶
func (p *DATPalette) Marshal() []byte
Marshal encodes data palette back into byte slice
func (*DATPalette) NumColors ¶
func (p *DATPalette) NumColors() int
NumColors returns the number of colors in the palette
Click to show internal directories.
Click to hide internal directories.