mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-27 05:35:57 -04:00
pl2: RGBA and SetRGBA methods for PL2Color24Bits
This commit is contained in:
parent
fd9c806928
commit
a7b8f82204
@ -6,3 +6,13 @@ type PL2Color24Bits struct {
|
|||||||
G uint8
|
G uint8
|
||||||
B uint8
|
B uint8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RGBA returns RGBA values of PL2Color
|
||||||
|
func (p *PL2Color24Bits) RGBA() uint32 {
|
||||||
|
return toComposite(p.R, p.G, p.B, mask)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRGBA sets PL2Color's value to rgba given
|
||||||
|
func (p *PL2Color24Bits) SetRGBA(rgba uint32) {
|
||||||
|
p.R, p.G, p.B, _ = toComponent(rgba)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user