mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-03 01:37:18 -04:00
783993470e
* fixed lint error in d2app/app.go * go fmt entire project * adding doc.go for d2records * fixed lint issues in d2core/d2map * fixed lint error in d2interface/palette.go * fixed lint error in d2core/d2hero/hero_state_factory.go * adding dov.go to d2common/d2geom * fixing lint errors in d2common/d2loader * adding doc.go to d2common/d2cache * adding doc files for d2datautils, d2util, d2path * adding package doc strings for mapgen, in-geam help screen, and tcp client connection * removed all cuddling lint errors * changed stamina equality check to '<=' instead of '<'
23 lines
344 B
Go
23 lines
344 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() [numColors]Color
|
|
GetColor(idx int) (Color, error)
|
|
}
|