mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-17 01:51:14 -05:00
c1a88c9cf7
* abstracted palettes, colors, and palette manager * make asset manager use the palette manager interface * added BGRA setter/getter, fixed lint errors * abstraction for animation and animation manager
23 lines
338 B
Go
23 lines
338 B
Go
package d2interface
|
|
|
|
const numColors = 256
|
|
|
|
// Color represents a color
|
|
type Color interface {
|
|
R() uint8
|
|
G() uint8
|
|
B() uint8
|
|
A() uint8
|
|
RGBA() uint32
|
|
SetRGBA(uint32)
|
|
BGRA() uint32
|
|
SetBGRA(uint32)
|
|
}
|
|
|
|
// Palette is a color palette
|
|
type Palette interface {
|
|
NumColors() int
|
|
GetColors() [256]Color
|
|
GetColor(idx int) (Color, error)
|
|
}
|