mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-25 04:36:12 -04:00
d2pl2: lintfix
This commit is contained in:
parent
0f08c722f5
commit
fd9c806928
@ -5,6 +5,8 @@ const (
|
|||||||
bitShift8
|
bitShift8
|
||||||
bitShift16
|
bitShift16
|
||||||
bitShift24
|
bitShift24
|
||||||
|
|
||||||
|
mask = 0xff
|
||||||
)
|
)
|
||||||
|
|
||||||
// PL2Color represents an RGBA color
|
// PL2Color represents an RGBA color
|
||||||
@ -15,14 +17,12 @@ type PL2Color struct {
|
|||||||
_ uint8
|
_ uint8
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
// RGBA returns RGBA values of PL2Color
|
||||||
mask = 0xff
|
|
||||||
)
|
|
||||||
|
|
||||||
func (p *PL2Color) RGBA() uint32 {
|
func (p *PL2Color) RGBA() uint32 {
|
||||||
return toComposite(p.R, p.G, p.B, mask)
|
return toComposite(p.R, p.G, p.B, mask)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetRGBA sets PL2Color's value to rgba given
|
||||||
func (p *PL2Color) SetRGBA(rgba uint32) {
|
func (p *PL2Color) SetRGBA(rgba uint32) {
|
||||||
p.R, p.G, p.B, _ = toComponent(rgba)
|
p.R, p.G, p.B, _ = toComponent(rgba)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user