mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-29 22:56:07 -04:00
pl2: lintfix
This commit is contained in:
parent
a7b8f82204
commit
ce692eb829
@ -24,7 +24,7 @@ func (p *PL2Color) RGBA() uint32 {
|
||||
|
||||
// SetRGBA sets PL2Color's value to rgba given
|
||||
func (p *PL2Color) SetRGBA(rgba uint32) {
|
||||
p.R, p.G, p.B, _ = toComponent(rgba)
|
||||
p.R, p.G, p.B = toComponent(rgba)
|
||||
}
|
||||
|
||||
func toComposite(w, x, y, z uint8) uint32 {
|
||||
@ -36,11 +36,10 @@ func toComposite(w, x, y, z uint8) uint32 {
|
||||
return composite
|
||||
}
|
||||
|
||||
func toComponent(wxyz uint32) (w, x, y, z uint8) {
|
||||
func toComponent(wxyz uint32) (w, x, y uint8) {
|
||||
w = uint8(wxyz >> bitShift24 & mask)
|
||||
x = uint8(wxyz >> bitShift16 & mask)
|
||||
y = uint8(wxyz >> bitShift8 & mask)
|
||||
z = uint8(wxyz >> bitShift0 & mask)
|
||||
|
||||
return w, x, y, z
|
||||
return w, x, y
|
||||
}
|
||||
|
@ -14,5 +14,5 @@ func (p *PL2Color24Bits) RGBA() uint32 {
|
||||
|
||||
// SetRGBA sets PL2Color's value to rgba given
|
||||
func (p *PL2Color24Bits) 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