2021-06-29 05:28:17 +02:00
|
|
|
#include "framework.h"
|
|
|
|
#include "GameScriptRotation.h"
|
|
|
|
|
|
|
|
GameScriptRotation::GameScriptRotation(int x, int y, int z)
|
|
|
|
{
|
|
|
|
SetX(x);
|
|
|
|
SetY(y);
|
|
|
|
SetZ(z);
|
|
|
|
}
|
|
|
|
|
2021-06-30 14:08:46 +01:00
|
|
|
int GameScriptRotation::GetX() const
|
2021-06-29 05:28:17 +02:00
|
|
|
{
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
|
|
|
void GameScriptRotation::SetX(int x)
|
|
|
|
{
|
|
|
|
this->x = std::clamp(x, -360, 360);
|
|
|
|
}
|
|
|
|
|
2021-06-30 14:08:46 +01:00
|
|
|
int GameScriptRotation::GetY() const
|
2021-06-29 05:28:17 +02:00
|
|
|
{
|
|
|
|
return y;
|
|
|
|
}
|
|
|
|
|
|
|
|
void GameScriptRotation::SetY(int y)
|
|
|
|
{
|
|
|
|
this->y = std::clamp(y, -360, 360);
|
|
|
|
}
|
|
|
|
|
2021-06-30 14:08:46 +01:00
|
|
|
int GameScriptRotation::GetZ() const
|
2021-06-29 05:28:17 +02:00
|
|
|
{
|
|
|
|
return z;
|
|
|
|
}
|
|
|
|
|
|
|
|
void GameScriptRotation::SetZ(int z)
|
|
|
|
{
|
|
|
|
this->z = std::clamp(z, -360, 360);
|
|
|
|
}
|