Make GameScriptColor able to convert to D3DCOLOR.

This commit is contained in:
hispidence 2021-08-27 14:30:41 +01:00
parent 88f056dc41
commit f3b9b18ede
2 changed files with 17 additions and 1 deletions

View file

@ -73,6 +73,20 @@ GameScriptColor::operator Vector4() const
return Vector4{ float(r), float(g), float(b), float(a) };
}
GameScriptColor::operator D3DCOLOR() const
{
D3DCOLOR col = a;
col <<= 8;
col += b;
col <<= 8;
col += g;
col <<= 8;
col += r;
return col;
}
byte GameScriptColor::GetR() const
{
return r;