mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 20:46:47 +03:00
Make GameScriptColor able to convert to D3DCOLOR.
This commit is contained in:
parent
88f056dc41
commit
f3b9b18ede
2 changed files with 17 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue