mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 12:19:10 +00:00
Hoist MOULOpenSourceClientPlugin/Plasma20/* to top level
to match H'uru layout and make patching/cherry-picking easier.
This commit is contained in:
61
Sources/Plasma/CoreLib/HS_POINT2.inc
Normal file
61
Sources/Plasma/CoreLib/HS_POINT2.inc
Normal file
@ -0,0 +1,61 @@
|
||||
struct HS_POINT2_NAME {
|
||||
HS_POINT2_TYPE fX, fY;
|
||||
|
||||
HS_POINT2_NAME& Set(HS_POINT2_TYPE x, HS_POINT2_TYPE y)
|
||||
{
|
||||
fX = x;
|
||||
fY = y;
|
||||
return *this;
|
||||
}
|
||||
HS_POINT2_NAME& operator+=(const HS_POINT2_NAME& s)
|
||||
{
|
||||
this->fX += s.fX;
|
||||
this->fY += s.fY;
|
||||
return *this;
|
||||
}
|
||||
HS_POINT2_NAME& operator-=(const HS_POINT2_NAME& s)
|
||||
{
|
||||
this->fX -= s.fX;
|
||||
this->fY -= s.fY;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if 0 // Havok reeks
|
||||
friend int operator==(const HS_POINT2_NAME& s, const HS_POINT2_NAME& t)
|
||||
{
|
||||
return (s.fX == t.fX && s.fY == t.fY);
|
||||
}
|
||||
friend int operator!=(const HS_POINT2_NAME& s, const HS_POINT2_NAME& t)
|
||||
{
|
||||
return !(s == t);
|
||||
}
|
||||
#else // Havok reeks
|
||||
int operator==(const HS_POINT2_NAME& ss) const
|
||||
{
|
||||
return (ss.fX == fX && ss.fY == fY);
|
||||
}
|
||||
int operator!=(const HS_POINT2_NAME& ss)
|
||||
{
|
||||
return !(ss == *this);
|
||||
}
|
||||
#endif // Havok reeks
|
||||
friend HS_POINT2_NAME operator+(const HS_POINT2_NAME& s, const HS_POINT2_NAME& t)
|
||||
{
|
||||
HS_POINT2_NAME result;
|
||||
result.Set(s.fX + t.fX, s.fY + t.fY);
|
||||
return result;
|
||||
}
|
||||
friend HS_POINT2_NAME operator-(const HS_POINT2_NAME& s, const HS_POINT2_NAME& t)
|
||||
{
|
||||
HS_POINT2_NAME result;
|
||||
result.Set(s.fX - t.fX, s.fY - t.fY);
|
||||
return result;
|
||||
}
|
||||
friend HS_POINT2_NAME operator-(const HS_POINT2_NAME& s)
|
||||
{
|
||||
HS_POINT2_NAME result = { -s.fX, -s.fY };
|
||||
return result;
|
||||
}
|
||||
|
||||
#undef HS_POINT2_NAME
|
||||
#undef HS_POINT2_TYPE
|
Reference in New Issue
Block a user