mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-06 19:01:06 +03:00
Moved GameScriptPosition, GameScriptRotation and GameScriptColor classes in separate files
This commit is contained in:
parent
aaee0e833a
commit
a507e9e1be
12 changed files with 247 additions and 215 deletions
57
TR5Main/Scripting/GameScriptColor.cpp
Normal file
57
TR5Main/Scripting/GameScriptColor.cpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#include "framework.h"
|
||||
#include "GameScriptColor.h"
|
||||
|
||||
GameScriptColor::GameScriptColor(byte r, byte g, byte b)
|
||||
{
|
||||
SetR(r);
|
||||
SetG(g);
|
||||
SetB(b);
|
||||
}
|
||||
|
||||
GameScriptColor::GameScriptColor(byte r, byte g, byte b, byte a)
|
||||
{
|
||||
SetR(r);
|
||||
SetG(g);
|
||||
SetB(b);
|
||||
SetA(a);
|
||||
}
|
||||
|
||||
byte GameScriptColor::GetR()
|
||||
{
|
||||
return r;
|
||||
}
|
||||
|
||||
void GameScriptColor::SetR(byte v)
|
||||
{
|
||||
r = std::clamp<byte>(v, 0, 255);
|
||||
}
|
||||
|
||||
byte GameScriptColor::GetG()
|
||||
{
|
||||
return g;
|
||||
}
|
||||
|
||||
void GameScriptColor::SetG(byte v)
|
||||
{
|
||||
g = std::clamp<byte>(v, 0, 255);
|
||||
}
|
||||
|
||||
byte GameScriptColor::GetB()
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
void GameScriptColor::SetB(byte v)
|
||||
{
|
||||
b = std::clamp<byte>(v, 0, 255);
|
||||
}
|
||||
|
||||
byte GameScriptColor::GetA()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
void GameScriptColor::SetA(byte v)
|
||||
{
|
||||
a = std::clamp<byte>(v, 0, 255);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue