1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 22:57:12 +02:00

Discarded the noexcept specifier entirely.

This commit is contained in:
Sandu Liviu Catalin
2015-11-01 05:48:01 +02:00
parent 2409a896df
commit 46801b1ce8
85 changed files with 4874 additions and 4874 deletions

View File

@ -15,71 +15,71 @@ const AABB AABB::MAX = AABB(Vector3::MIN, Vector3::MAX);
SQChar AABB::Delim = ',';
// ------------------------------------------------------------------------------------------------
AABB::AABB() noexcept
AABB::AABB()
: min(-1), max(1)
{
}
AABB::AABB(Value s) noexcept
AABB::AABB(Value s)
: min(-s), max(std::fabs(s))
{
}
AABB::AABB(Value xv, Value yv, Value zv) noexcept
AABB::AABB(Value xv, Value yv, Value zv)
: min(-xv, -yv, -zv), max(std::fabs(xv), std::fabs(yv), std::fabs(zv))
{
}
AABB::AABB(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax) noexcept
AABB::AABB(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax)
: min(xmin, ymin, zmin), max(xmax, ymax, zmax)
{
}
// ------------------------------------------------------------------------------------------------
AABB::AABB(const Vector3 & v) noexcept
AABB::AABB(const Vector3 & v)
: min(-v), max(v.Abs())
{
}
AABB::AABB(const Vector3 & vmin, const Vector3 & vmax) noexcept
AABB::AABB(const Vector3 & vmin, const Vector3 & vmax)
: min(vmin), max(vmax)
{
}
// ------------------------------------------------------------------------------------------------
AABB::AABB(const Vector4 & v) noexcept
AABB::AABB(const Vector4 & v)
: min(-v), max(v.Abs())
{
}
AABB::AABB(const Vector4 & vmin, const Vector4 & vmax) noexcept
AABB::AABB(const Vector4 & vmin, const Vector4 & vmax)
: min(vmin), max(vmax)
{
}
// ------------------------------------------------------------------------------------------------
AABB::AABB(const SQChar * values, SQChar delim) noexcept
AABB::AABB(const SQChar * values, SQChar delim)
: AABB(GetAABB(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
AABB::AABB(const AABB & b) noexcept
AABB::AABB(const AABB & b)
: min(b.min), max(b.max)
{
}
AABB::AABB(AABB && b) noexcept
AABB::AABB(AABB && b)
: min(b.min), max(b.max)
{
@ -92,14 +92,14 @@ AABB::~AABB()
}
// ------------------------------------------------------------------------------------------------
AABB & AABB::operator = (const AABB & b) noexcept
AABB & AABB::operator = (const AABB & b)
{
min = b.min;
max = b.max;
return *this;
}
AABB & AABB::operator = (AABB && b) noexcept
AABB & AABB::operator = (AABB && b)
{
min = b.min;
max = b.max;
@ -107,21 +107,21 @@ AABB & AABB::operator = (AABB && b) noexcept
}
// ------------------------------------------------------------------------------------------------
AABB & AABB::operator = (Value s) noexcept
AABB & AABB::operator = (Value s)
{
min.Set(-s);
max.Set(std::fabs(s));
return *this;
}
AABB & AABB::operator = (const Vector3 & v) noexcept
AABB & AABB::operator = (const Vector3 & v)
{
min.Set(-v);
max.Set(v.Abs());
return *this;
}
AABB & AABB::operator = (const Vector4 & v) noexcept
AABB & AABB::operator = (const Vector4 & v)
{
min.Set(-v);
max.Set(v.Abs());
@ -129,35 +129,35 @@ AABB & AABB::operator = (const Vector4 & v) noexcept
}
// ------------------------------------------------------------------------------------------------
AABB & AABB::operator += (const AABB & b) noexcept
AABB & AABB::operator += (const AABB & b)
{
min += b.min;
max += b.max;
return *this;
}
AABB & AABB::operator -= (const AABB & b) noexcept
AABB & AABB::operator -= (const AABB & b)
{
min -= b.min;
max -= b.max;
return *this;
}
AABB & AABB::operator *= (const AABB & b) noexcept
AABB & AABB::operator *= (const AABB & b)
{
min *= b.min;
max *= b.max;
return *this;
}
AABB & AABB::operator /= (const AABB & b) noexcept
AABB & AABB::operator /= (const AABB & b)
{
min /= b.min;
max /= b.max;
return *this;
}
AABB & AABB::operator %= (const AABB & b) noexcept
AABB & AABB::operator %= (const AABB & b)
{
min %= b.min;
max %= b.max;
@ -165,35 +165,35 @@ AABB & AABB::operator %= (const AABB & b) noexcept
}
// ------------------------------------------------------------------------------------------------
AABB & AABB::operator += (Value s) noexcept
AABB & AABB::operator += (Value s)
{
min += s;
max += s;
return *this;
}
AABB & AABB::operator -= (Value s) noexcept
AABB & AABB::operator -= (Value s)
{
min -= s;
max -= s;
return *this;
}
AABB & AABB::operator *= (Value s) noexcept
AABB & AABB::operator *= (Value s)
{
min *= s;
max *= s;
return *this;
}
AABB & AABB::operator /= (Value s) noexcept
AABB & AABB::operator /= (Value s)
{
min /= s;
max /= s;
return *this;
}
AABB & AABB::operator %= (Value s) noexcept
AABB & AABB::operator %= (Value s)
{
min %= s;
max %= s;
@ -201,14 +201,14 @@ AABB & AABB::operator %= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
AABB & AABB::operator ++ () noexcept
AABB & AABB::operator ++ ()
{
++min;
++max;
return *this;
}
AABB & AABB::operator -- () noexcept
AABB & AABB::operator -- ()
{
--min;
--max;
@ -216,7 +216,7 @@ AABB & AABB::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
AABB AABB::operator ++ (int) noexcept
AABB AABB::operator ++ (int)
{
AABB state(*this);
++min;
@ -224,7 +224,7 @@ AABB AABB::operator ++ (int) noexcept
return state;
}
AABB AABB::operator -- (int) noexcept
AABB AABB::operator -- (int)
{
AABB state(*this);
--min;
@ -233,171 +233,171 @@ AABB AABB::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
AABB AABB::operator + (const AABB & b) const noexcept
AABB AABB::operator + (const AABB & b) const
{
return AABB(min + b.min, max + b.max);
}
AABB AABB::operator - (const AABB & b) const noexcept
AABB AABB::operator - (const AABB & b) const
{
return AABB(min - b.min, max - b.max);
}
AABB AABB::operator * (const AABB & b) const noexcept
AABB AABB::operator * (const AABB & b) const
{
return AABB(min * b.min, max * b.max);
}
AABB AABB::operator / (const AABB & b) const noexcept
AABB AABB::operator / (const AABB & b) const
{
return AABB(min / b.min, max / b.max);
}
AABB AABB::operator % (const AABB & b) const noexcept
AABB AABB::operator % (const AABB & b) const
{
return AABB(min % b.min, max % b.max);
}
// ------------------------------------------------------------------------------------------------
AABB AABB::operator + (Value s) const noexcept
AABB AABB::operator + (Value s) const
{
return AABB(min + s, max + s);
}
AABB AABB::operator - (Value s) const noexcept
AABB AABB::operator - (Value s) const
{
return AABB(min - s, max - s);
}
AABB AABB::operator * (Value s) const noexcept
AABB AABB::operator * (Value s) const
{
return AABB(min * s, max * s);
}
AABB AABB::operator / (Value s) const noexcept
AABB AABB::operator / (Value s) const
{
return AABB(min / s, max / s);
}
AABB AABB::operator % (Value s) const noexcept
AABB AABB::operator % (Value s) const
{
return AABB(min % s, max % s);
}
// ------------------------------------------------------------------------------------------------
AABB AABB::operator + () const noexcept
AABB AABB::operator + () const
{
return AABB(min.Abs(), max.Abs());
}
AABB AABB::operator - () const noexcept
AABB AABB::operator - () const
{
return AABB(-min, -max);
}
// ------------------------------------------------------------------------------------------------
bool AABB::operator == (const AABB & b) const noexcept
bool AABB::operator == (const AABB & b) const
{
return (min == b.min) && (max == b.max);
}
bool AABB::operator != (const AABB & b) const noexcept
bool AABB::operator != (const AABB & b) const
{
return (min != b.min) && (max != b.max);
}
bool AABB::operator < (const AABB & b) const noexcept
bool AABB::operator < (const AABB & b) const
{
return (min < b.min) && (max < b.max);
}
bool AABB::operator > (const AABB & b) const noexcept
bool AABB::operator > (const AABB & b) const
{
return (min > b.min) && (max > b.max);
}
bool AABB::operator <= (const AABB & b) const noexcept
bool AABB::operator <= (const AABB & b) const
{
return (min <= b.min) && (max <= b.max);
}
bool AABB::operator >= (const AABB & b) const noexcept
bool AABB::operator >= (const AABB & b) const
{
return (min >= b.min) && (max >= b.max);
}
// ------------------------------------------------------------------------------------------------
SQInteger AABB::Cmp(const AABB & b) const noexcept
SQInteger AABB::Cmp(const AABB & b) const
{
return *this == b ? 0 : (*this > b ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * AABB::ToString() const noexcept
const SQChar * AABB::ToString() const
{
return ToStringF("%f,%f,%f,%f,%f,%f", min.x, min.y, min.z, max.x, max.y, max.z);
}
// ------------------------------------------------------------------------------------------------
void AABB::Set(Value ns) noexcept
void AABB::Set(Value ns)
{
min = -ns;
max = std::fabs(ns);
}
void AABB::Set(Value nx, Value ny, Value nz) noexcept
void AABB::Set(Value nx, Value ny, Value nz)
{
min.Set(-nx, -ny, -nz);
max.Set(std::fabs(nx), std::fabs(ny), std::fabs(nz));
}
void AABB::Set(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax) noexcept
void AABB::Set(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax)
{
min.Set(xmin, ymin, zmin);
max.Set(xmax, ymax, zmax);
}
// ------------------------------------------------------------------------------------------------
void AABB::Set(const AABB & b) noexcept
void AABB::Set(const AABB & b)
{
min = b.min;
max = b.max;
}
// ------------------------------------------------------------------------------------------------
void AABB::Set(const Vector3 & v) noexcept
void AABB::Set(const Vector3 & v)
{
min = -v;
max = v.Abs();
}
void AABB::Set(const Vector3 & nmin, const Vector3 & nmax) noexcept
void AABB::Set(const Vector3 & nmin, const Vector3 & nmax)
{
min = nmin;
max = nmax;
}
// ------------------------------------------------------------------------------------------------
void AABB::Set(const Vector4 & v) noexcept
void AABB::Set(const Vector4 & v)
{
min = -v;
max = v.Abs();
}
void AABB::Set(const Vector4 & nmin, const Vector4 & nmax) noexcept
void AABB::Set(const Vector4 & nmin, const Vector4 & nmax)
{
min = nmin;
max = nmax;
}
// ------------------------------------------------------------------------------------------------
void AABB::Set(const SQChar * values, SQChar delim) noexcept
void AABB::Set(const SQChar * values, SQChar delim)
{
Set(GetAABB(values, delim));
}
// ------------------------------------------------------------------------------------------------
AABB AABB::Abs() const noexcept
AABB AABB::Abs() const
{
return AABB(min.Abs(), max.Abs());
}

View File

@ -24,92 +24,92 @@ struct AABB
// --------------------------------------------------------------------------------------------
Vector3 min, max;
// --------------------------------------------------------------------------------------------
AABB() noexcept;
AABB(Value s) noexcept;
AABB(Value x, Value y, Value z) noexcept;
AABB(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax) noexcept;
AABB();
AABB(Value s);
AABB(Value x, Value y, Value z);
AABB(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax);
// --------------------------------------------------------------------------------------------
AABB(const Vector3 & b) noexcept;
AABB(const Vector3 & vmin, const Vector3 & vmax) noexcept;
AABB(const Vector3 & b);
AABB(const Vector3 & vmin, const Vector3 & vmax);
// --------------------------------------------------------------------------------------------
AABB(const Vector4 & b) noexcept;
AABB(const Vector4 & vmin, const Vector4 & vmax) noexcept;
AABB(const Vector4 & b);
AABB(const Vector4 & vmin, const Vector4 & vmax);
// --------------------------------------------------------------------------------------------
AABB(const SQChar * values, SQChar delim) noexcept;
AABB(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
AABB(const AABB & b) noexcept;
AABB(AABB && b) noexcept;
AABB(const AABB & b);
AABB(AABB && b);
// --------------------------------------------------------------------------------------------
~AABB();
// --------------------------------------------------------------------------------------------
AABB & operator = (const AABB & b) noexcept;
AABB & operator = (AABB && b) noexcept;
AABB & operator = (const AABB & b);
AABB & operator = (AABB && b);
// --------------------------------------------------------------------------------------------
AABB & operator = (Value s) noexcept;
AABB & operator = (const Vector3 & v) noexcept;
AABB & operator = (const Vector4 & v) noexcept;
AABB & operator = (Value s);
AABB & operator = (const Vector3 & v);
AABB & operator = (const Vector4 & v);
// --------------------------------------------------------------------------------------------
AABB & operator += (const AABB & b) noexcept;
AABB & operator -= (const AABB & b) noexcept;
AABB & operator *= (const AABB & b) noexcept;
AABB & operator /= (const AABB & b) noexcept;
AABB & operator %= (const AABB & b) noexcept;
AABB & operator += (const AABB & b);
AABB & operator -= (const AABB & b);
AABB & operator *= (const AABB & b);
AABB & operator /= (const AABB & b);
AABB & operator %= (const AABB & b);
// --------------------------------------------------------------------------------------------
AABB & operator += (Value s) noexcept;
AABB & operator -= (Value s) noexcept;
AABB & operator *= (Value s) noexcept;
AABB & operator /= (Value s) noexcept;
AABB & operator %= (Value s) noexcept;
AABB & operator += (Value s);
AABB & operator -= (Value s);
AABB & operator *= (Value s);
AABB & operator /= (Value s);
AABB & operator %= (Value s);
// --------------------------------------------------------------------------------------------
AABB & operator ++ () noexcept;
AABB & operator -- () noexcept;
AABB & operator ++ ();
AABB & operator -- ();
// --------------------------------------------------------------------------------------------
AABB operator ++ (int) noexcept;
AABB operator -- (int) noexcept;
AABB operator ++ (int);
AABB operator -- (int);
// --------------------------------------------------------------------------------------------
AABB operator + (const AABB & b) const noexcept;
AABB operator - (const AABB & b) const noexcept;
AABB operator * (const AABB & b) const noexcept;
AABB operator / (const AABB & b) const noexcept;
AABB operator % (const AABB & b) const noexcept;
AABB operator + (const AABB & b) const;
AABB operator - (const AABB & b) const;
AABB operator * (const AABB & b) const;
AABB operator / (const AABB & b) const;
AABB operator % (const AABB & b) const;
// --------------------------------------------------------------------------------------------
AABB operator + (Value s) const noexcept;
AABB operator - (Value s) const noexcept;
AABB operator * (Value s) const noexcept;
AABB operator / (Value s) const noexcept;
AABB operator % (Value s) const noexcept;
AABB operator + (Value s) const;
AABB operator - (Value s) const;
AABB operator * (Value s) const;
AABB operator / (Value s) const;
AABB operator % (Value s) const;
// --------------------------------------------------------------------------------------------
AABB operator + () const noexcept;
AABB operator - () const noexcept;
AABB operator + () const;
AABB operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const AABB & b) const noexcept;
bool operator != (const AABB & b) const noexcept;
bool operator < (const AABB & b) const noexcept;
bool operator > (const AABB & b) const noexcept;
bool operator <= (const AABB & b) const noexcept;
bool operator >= (const AABB & b) const noexcept;
bool operator == (const AABB & b) const;
bool operator != (const AABB & b) const;
bool operator < (const AABB & b) const;
bool operator > (const AABB & b) const;
bool operator <= (const AABB & b) const;
bool operator >= (const AABB & b) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const AABB & b) const noexcept;
SQInteger Cmp(const AABB & b) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny, Value nz) noexcept;
void Set(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny, Value nz);
void Set(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax);
// --------------------------------------------------------------------------------------------
void Set(const AABB & b) noexcept;
void Set(const AABB & b);
// --------------------------------------------------------------------------------------------
void Set(const Vector3 & v) noexcept;
void Set(const Vector3 & nmin, const Vector3 & nmax) noexcept;
void Set(const Vector3 & v);
void Set(const Vector3 & nmin, const Vector3 & nmax);
// --------------------------------------------------------------------------------------------
void Set(const Vector4 & v) noexcept;
void Set(const Vector4 & nmin, const Vector4 & nmax) noexcept;
void Set(const Vector4 & v);
void Set(const Vector4 & nmin, const Vector4 & nmax);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { min.Clear(); max.Clear(); }
void Clear() { min.Clear(); max.Clear(); }
// --------------------------------------------------------------------------------------------
AABB Abs() const noexcept;
AABB Abs() const;
};
} // Namespace:: SqMod

View File

@ -14,44 +14,44 @@ const Circle Circle::MAX = Circle(std::numeric_limits<Circle::Value>::max());
SQChar Circle::Delim = ',';
// ------------------------------------------------------------------------------------------------
Circle::Circle() noexcept
Circle::Circle()
: pos(0.0, 0.0), rad(0.0)
{
}
Circle::Circle(Value r) noexcept
Circle::Circle(Value r)
: pos(0.0, 0.0), rad(r)
{
}
Circle::Circle(const Vector2f & p) noexcept
Circle::Circle(const Vector2f & p)
: pos(p), rad(0.0)
{
}
Circle::Circle(const Vector2f & p, Value r) noexcept
Circle::Circle(const Vector2f & p, Value r)
: pos(p), rad(r)
{
}
Circle::Circle(Value x, Value y, Value r) noexcept
Circle::Circle(Value x, Value y, Value r)
: pos(x, y), rad(r)
{
}
// ------------------------------------------------------------------------------------------------
Circle::Circle(const Circle & c) noexcept
Circle::Circle(const Circle & c)
: pos(c.pos), rad(c.rad)
{
}
Circle::Circle(Circle && c) noexcept
Circle::Circle(Circle && c)
: pos(c.pos), rad(c.rad)
{
@ -64,14 +64,14 @@ Circle::~Circle()
}
// ------------------------------------------------------------------------------------------------
Circle & Circle::operator = (const Circle & c) noexcept
Circle & Circle::operator = (const Circle & c)
{
pos = c.pos;
rad = c.rad;
return *this;
}
Circle & Circle::operator = (Circle && c) noexcept
Circle & Circle::operator = (Circle && c)
{
pos = c.pos;
rad = c.rad;
@ -79,48 +79,48 @@ Circle & Circle::operator = (Circle && c) noexcept
}
// ------------------------------------------------------------------------------------------------
Circle & Circle::operator = (Value r) noexcept
Circle & Circle::operator = (Value r)
{
rad = r;
return *this;
}
Circle & Circle::operator = (const Vector2f & p) noexcept
Circle & Circle::operator = (const Vector2f & p)
{
pos = p;
return *this;
}
// ------------------------------------------------------------------------------------------------
Circle & Circle::operator += (const Circle & c) noexcept
Circle & Circle::operator += (const Circle & c)
{
pos += c.pos;
rad += c.rad;
return *this;
}
Circle & Circle::operator -= (const Circle & c) noexcept
Circle & Circle::operator -= (const Circle & c)
{
pos -= c.pos;
rad -= c.rad;
return *this;
}
Circle & Circle::operator *= (const Circle & c) noexcept
Circle & Circle::operator *= (const Circle & c)
{
pos *= c.pos;
rad *= c.rad;
return *this;
}
Circle & Circle::operator /= (const Circle & c) noexcept
Circle & Circle::operator /= (const Circle & c)
{
pos /= c.pos;
rad /= c.rad;
return *this;
}
Circle & Circle::operator %= (const Circle & c) noexcept
Circle & Circle::operator %= (const Circle & c)
{
pos %= c.pos;
rad = std::fmod(rad, c.rad);
@ -129,76 +129,76 @@ Circle & Circle::operator %= (const Circle & c) noexcept
}
// ------------------------------------------------------------------------------------------------
Circle & Circle::operator += (Value r) noexcept
Circle & Circle::operator += (Value r)
{
rad += r;
return *this;
}
Circle & Circle::operator -= (Value r) noexcept
Circle & Circle::operator -= (Value r)
{
rad -= r;
return *this;
}
Circle & Circle::operator *= (Value r) noexcept
Circle & Circle::operator *= (Value r)
{
rad *= r;
return *this;
}
Circle & Circle::operator /= (Value r) noexcept
Circle & Circle::operator /= (Value r)
{
rad /= r;
return *this;
}
Circle & Circle::operator %= (Value r) noexcept
Circle & Circle::operator %= (Value r)
{
rad = std::fmod(rad, r);
return *this;
}
// ------------------------------------------------------------------------------------------------
Circle & Circle::operator += (const Vector2f & p) noexcept
Circle & Circle::operator += (const Vector2f & p)
{
pos += p;
return *this;
}
Circle & Circle::operator -= (const Vector2f & p) noexcept
Circle & Circle::operator -= (const Vector2f & p)
{
pos -= p;
return *this;
}
Circle & Circle::operator *= (const Vector2f & p) noexcept
Circle & Circle::operator *= (const Vector2f & p)
{
pos *= p;
return *this;
}
Circle & Circle::operator /= (const Vector2f & p) noexcept
Circle & Circle::operator /= (const Vector2f & p)
{
pos /= p;
return *this;
}
Circle & Circle::operator %= (const Vector2f & p) noexcept
Circle & Circle::operator %= (const Vector2f & p)
{
pos %= p;
return *this;
}
// ------------------------------------------------------------------------------------------------
Circle & Circle::operator ++ () noexcept
Circle & Circle::operator ++ ()
{
++pos;
++rad;
return *this;
}
Circle & Circle::operator -- () noexcept
Circle & Circle::operator -- ()
{
--pos;
--rad;
@ -206,7 +206,7 @@ Circle & Circle::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Circle Circle::operator ++ (int) noexcept
Circle Circle::operator ++ (int)
{
Circle state(*this);
++pos;
@ -214,7 +214,7 @@ Circle Circle::operator ++ (int) noexcept
return state;
}
Circle Circle::operator -- (int) noexcept
Circle Circle::operator -- (int)
{
Circle state(*this);
--pos;
@ -223,186 +223,186 @@ Circle Circle::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Circle Circle::operator + (const Circle & c) const noexcept
Circle Circle::operator + (const Circle & c) const
{
return Circle(pos + c.pos, rad + c.rad);
}
Circle Circle::operator - (const Circle & c) const noexcept
Circle Circle::operator - (const Circle & c) const
{
return Circle(pos - c.pos, rad - c.rad);
}
Circle Circle::operator * (const Circle & c) const noexcept
Circle Circle::operator * (const Circle & c) const
{
return Circle(pos * c.pos, rad * c.rad);
}
Circle Circle::operator / (const Circle & c) const noexcept
Circle Circle::operator / (const Circle & c) const
{
return Circle(pos / c.pos, rad / c.rad);
}
Circle Circle::operator % (const Circle & c) const noexcept
Circle Circle::operator % (const Circle & c) const
{
return Circle(pos % c.pos, std::fmod(rad, c.rad));
}
// ------------------------------------------------------------------------------------------------
Circle Circle::operator + (Value r) const noexcept
Circle Circle::operator + (Value r) const
{
return Circle(rad + r);
}
Circle Circle::operator - (Value r) const noexcept
Circle Circle::operator - (Value r) const
{
return Circle(rad - r);
}
Circle Circle::operator * (Value r) const noexcept
Circle Circle::operator * (Value r) const
{
return Circle(rad * r);
}
Circle Circle::operator / (Value r) const noexcept
Circle Circle::operator / (Value r) const
{
return Circle(rad / r);
}
Circle Circle::operator % (Value r) const noexcept
Circle Circle::operator % (Value r) const
{
return Circle(std::fmod(rad, r));
}
// ------------------------------------------------------------------------------------------------
Circle Circle::operator + (const Vector2f & p) const noexcept
Circle Circle::operator + (const Vector2f & p) const
{
return Circle(pos + p);
}
Circle Circle::operator - (const Vector2f & p) const noexcept
Circle Circle::operator - (const Vector2f & p) const
{
return Circle(pos - p);
}
Circle Circle::operator * (const Vector2f & p) const noexcept
Circle Circle::operator * (const Vector2f & p) const
{
return Circle(pos * p);
}
Circle Circle::operator / (const Vector2f & p) const noexcept
Circle Circle::operator / (const Vector2f & p) const
{
return Circle(pos / p);
}
Circle Circle::operator % (const Vector2f & p) const noexcept
Circle Circle::operator % (const Vector2f & p) const
{
return Circle(pos % p);
}
// ------------------------------------------------------------------------------------------------
Circle Circle::operator + () const noexcept
Circle Circle::operator + () const
{
return Circle(pos.Abs(), std::fabs(rad));
}
Circle Circle::operator - () const noexcept
Circle Circle::operator - () const
{
return Circle(-pos, -rad);
}
// ------------------------------------------------------------------------------------------------
bool Circle::operator == (const Circle & c) const noexcept
bool Circle::operator == (const Circle & c) const
{
return (rad == c.rad) && (pos == c.pos);
}
bool Circle::operator != (const Circle & c) const noexcept
bool Circle::operator != (const Circle & c) const
{
return (rad != c.rad) && (pos != c.pos);
}
bool Circle::operator < (const Circle & c) const noexcept
bool Circle::operator < (const Circle & c) const
{
return (rad < c.rad) && (pos < c.pos);
}
bool Circle::operator > (const Circle & c) const noexcept
bool Circle::operator > (const Circle & c) const
{
return (rad > c.rad) && (pos > c.pos);
}
bool Circle::operator <= (const Circle & c) const noexcept
bool Circle::operator <= (const Circle & c) const
{
return (rad <= c.rad) && (pos <= c.pos);
}
bool Circle::operator >= (const Circle & c) const noexcept
bool Circle::operator >= (const Circle & c) const
{
return (rad >= c.rad) && (pos >= c.pos);
}
// ------------------------------------------------------------------------------------------------
SQInteger Circle::Cmp(const Circle & c) const noexcept
SQInteger Circle::Cmp(const Circle & c) const
{
return *this == c ? 0 : (*this > c ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Circle::ToString() const noexcept
const SQChar * Circle::ToString() const
{
return ToStringF("%f,%f,%f", pos.x, pos.y, rad);
}
// ------------------------------------------------------------------------------------------------
void Circle::Set(Value nr) noexcept
void Circle::Set(Value nr)
{
rad = nr;
}
void Circle::Set(const Circle & nc) noexcept
void Circle::Set(const Circle & nc)
{
pos = nc.pos;
rad = nc.rad;
}
void Circle::Set(const Vector2f & np) noexcept
void Circle::Set(const Vector2f & np)
{
pos = np;
}
void Circle::Set(const Vector2f & np, Value nr) noexcept
void Circle::Set(const Vector2f & np, Value nr)
{
pos = np;
rad = nr;
}
// ------------------------------------------------------------------------------------------------
void Circle::Set(Value nx, Value ny) noexcept
void Circle::Set(Value nx, Value ny)
{
pos.Set(nx, ny);
}
void Circle::Set(Value nx, Value ny, Value nr) noexcept
void Circle::Set(Value nx, Value ny, Value nr)
{
pos.Set(nx, ny);
rad = nr;
}
// ------------------------------------------------------------------------------------------------
void Circle::Set(const SQChar * values, SQChar delim) noexcept
void Circle::Set(const SQChar * values, SQChar delim)
{
Set(GetCircle(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Circle::Generate() noexcept
void Circle::Generate()
{
pos.Generate();
rad = RandomVal<Value>::Get();
}
void Circle::Generate(Value min, Value max, bool r) noexcept
void Circle::Generate(Value min, Value max, bool r)
{
if (max < min)
{
@ -418,12 +418,12 @@ void Circle::Generate(Value min, Value max, bool r) noexcept
}
}
void Circle::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
void Circle::Generate(Value xmin, Value xmax, Value ymin, Value ymax)
{
pos.Generate(xmin, xmax, ymin, ymax);
}
void Circle::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value rmin, Value rmax) noexcept
void Circle::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value rmin, Value rmax)
{
if (std::isless(rmax, rmin))
{
@ -437,7 +437,7 @@ void Circle::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value rmin
}
// ------------------------------------------------------------------------------------------------
Circle Circle::Abs() const noexcept
Circle Circle::Abs() const
{
return Circle(pos.Abs(), std::fabs(rad));
}

View File

@ -25,97 +25,97 @@ struct Circle
Vector2f pos;
Value rad;
// --------------------------------------------------------------------------------------------
Circle() noexcept;
Circle(Value r) noexcept;
Circle(const Vector2f & p) noexcept;
Circle(const Vector2f & p, Value r) noexcept;
Circle(Value x, Value y, Value r) noexcept;
Circle();
Circle(Value r);
Circle(const Vector2f & p);
Circle(const Vector2f & p, Value r);
Circle(Value x, Value y, Value r);
// --------------------------------------------------------------------------------------------
Circle(const Circle & c) noexcept;
Circle(Circle && c) noexcept;
Circle(const Circle & c);
Circle(Circle && c);
// --------------------------------------------------------------------------------------------
~Circle();
// --------------------------------------------------------------------------------------------
Circle & operator = (const Circle & c) noexcept;
Circle & operator = (Circle && c) noexcept;
Circle & operator = (const Circle & c);
Circle & operator = (Circle && c);
// --------------------------------------------------------------------------------------------
Circle & operator = (Value r) noexcept;
Circle & operator = (const Vector2f & p) noexcept;
Circle & operator = (Value r);
Circle & operator = (const Vector2f & p);
// --------------------------------------------------------------------------------------------
Circle & operator += (const Circle & c) noexcept;
Circle & operator -= (const Circle & c) noexcept;
Circle & operator *= (const Circle & c) noexcept;
Circle & operator /= (const Circle & c) noexcept;
Circle & operator %= (const Circle & c) noexcept;
Circle & operator += (const Circle & c);
Circle & operator -= (const Circle & c);
Circle & operator *= (const Circle & c);
Circle & operator /= (const Circle & c);
Circle & operator %= (const Circle & c);
// --------------------------------------------------------------------------------------------
Circle & operator += (Value r) noexcept;
Circle & operator -= (Value r) noexcept;
Circle & operator *= (Value r) noexcept;
Circle & operator /= (Value r) noexcept;
Circle & operator %= (Value r) noexcept;
Circle & operator += (Value r);
Circle & operator -= (Value r);
Circle & operator *= (Value r);
Circle & operator /= (Value r);
Circle & operator %= (Value r);
// --------------------------------------------------------------------------------------------
Circle & operator += (const Vector2f & p) noexcept;
Circle & operator -= (const Vector2f & p) noexcept;
Circle & operator *= (const Vector2f & p) noexcept;
Circle & operator /= (const Vector2f & p) noexcept;
Circle & operator %= (const Vector2f & p) noexcept;
Circle & operator += (const Vector2f & p);
Circle & operator -= (const Vector2f & p);
Circle & operator *= (const Vector2f & p);
Circle & operator /= (const Vector2f & p);
Circle & operator %= (const Vector2f & p);
// --------------------------------------------------------------------------------------------
Circle & operator ++ () noexcept;
Circle & operator -- () noexcept;
Circle & operator ++ ();
Circle & operator -- ();
// --------------------------------------------------------------------------------------------
Circle operator ++ (int) noexcept;
Circle operator -- (int) noexcept;
Circle operator ++ (int);
Circle operator -- (int);
// --------------------------------------------------------------------------------------------
Circle operator + (const Circle & c) const noexcept;
Circle operator - (const Circle & c) const noexcept;
Circle operator * (const Circle & c) const noexcept;
Circle operator / (const Circle & c) const noexcept;
Circle operator % (const Circle & c) const noexcept;
Circle operator + (const Circle & c) const;
Circle operator - (const Circle & c) const;
Circle operator * (const Circle & c) const;
Circle operator / (const Circle & c) const;
Circle operator % (const Circle & c) const;
// --------------------------------------------------------------------------------------------
Circle operator + (Value r) const noexcept;
Circle operator - (Value r) const noexcept;
Circle operator * (Value r) const noexcept;
Circle operator / (Value r) const noexcept;
Circle operator % (Value r) const noexcept;
Circle operator + (Value r) const;
Circle operator - (Value r) const;
Circle operator * (Value r) const;
Circle operator / (Value r) const;
Circle operator % (Value r) const;
// --------------------------------------------------------------------------------------------
Circle operator + (const Vector2f & p) const noexcept;
Circle operator - (const Vector2f & p) const noexcept;
Circle operator * (const Vector2f & p) const noexcept;
Circle operator / (const Vector2f & p) const noexcept;
Circle operator % (const Vector2f & p) const noexcept;
Circle operator + (const Vector2f & p) const;
Circle operator - (const Vector2f & p) const;
Circle operator * (const Vector2f & p) const;
Circle operator / (const Vector2f & p) const;
Circle operator % (const Vector2f & p) const;
// --------------------------------------------------------------------------------------------
Circle operator + () const noexcept;
Circle operator - () const noexcept;
Circle operator + () const;
Circle operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Circle & c) const noexcept;
bool operator != (const Circle & c) const noexcept;
bool operator < (const Circle & c) const noexcept;
bool operator > (const Circle & c) const noexcept;
bool operator <= (const Circle & c) const noexcept;
bool operator >= (const Circle & c) const noexcept;
bool operator == (const Circle & c) const;
bool operator != (const Circle & c) const;
bool operator < (const Circle & c) const;
bool operator > (const Circle & c) const;
bool operator <= (const Circle & c) const;
bool operator >= (const Circle & c) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Circle & c) const noexcept;
SQInteger Cmp(const Circle & c) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value nr) noexcept;
void Set(const Circle & nc) noexcept;
void Set(const Vector2f & np) noexcept;
void Set(const Vector2f & np, Value nr) noexcept;
void Set(Value nr);
void Set(const Circle & nc);
void Set(const Vector2f & np);
void Set(const Vector2f & np, Value nr);
// --------------------------------------------------------------------------------------------
void Set(Value nx, Value ny) noexcept;
void Set(Value nx, Value ny, Value nr) noexcept;
void Set(Value nx, Value ny);
void Set(Value nx, Value ny, Value nr);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max, bool r) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value rmin, Value rmax) noexcept;
void Generate();
void Generate(Value min, Value max, bool r);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value rmin, Value rmax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { pos.Clear(); rad = 0.0; }
void Clear() { pos.Clear(); rad = 0.0; }
// --------------------------------------------------------------------------------------------
Circle Abs() const noexcept;
Circle Abs() const;
};
} // Namespace:: SqMod

View File

@ -15,52 +15,52 @@ const Color3 Color3::MAX = Color3(std::numeric_limits<Color3::Value>::max());
SQChar Color3::Delim = ',';
// ------------------------------------------------------------------------------------------------
Color3::Color3() noexcept
Color3::Color3()
: r(0), g(0), b(0)
{
}
Color3::Color3(Value s) noexcept
Color3::Color3(Value s)
: r(s), g(s), b(s)
{
}
Color3::Color3(Value rv, Value gv, Value bv) noexcept
Color3::Color3(Value rv, Value gv, Value bv)
: r(rv), g(gv), b(bv)
{
}
// ------------------------------------------------------------------------------------------------
Color3::Color3(const Color4 & c) noexcept
Color3::Color3(const Color4 & c)
: r(c.r), g(c.g), b(c.b)
{
}
// ------------------------------------------------------------------------------------------------
Color3::Color3(const SQChar * name) noexcept
Color3::Color3(const SQChar * name)
: Color3(GetColor(name))
{
}
Color3::Color3(const SQChar * str, SQChar delim) noexcept
Color3::Color3(const SQChar * str, SQChar delim)
: Color3(GetColor3(str, delim))
{
}
// ------------------------------------------------------------------------------------------------
Color3::Color3(const Color3 & c) noexcept
Color3::Color3(const Color3 & c)
: r(c.r), g(c.g), b(c.b)
{
}
Color3::Color3(Color3 && c) noexcept
Color3::Color3(Color3 && c)
: r(c.r), g(c.g), b(c.b)
{
@ -73,7 +73,7 @@ Color3::~Color3()
}
// ------------------------------------------------------------------------------------------------
Color3 & Color3::operator = (const Color3 & c) noexcept
Color3 & Color3::operator = (const Color3 & c)
{
r = c.r;
g = c.g;
@ -81,7 +81,7 @@ Color3 & Color3::operator = (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator = (Color3 && c) noexcept
Color3 & Color3::operator = (Color3 && c)
{
r = c.r;
g = c.g;
@ -90,7 +90,7 @@ Color3 & Color3::operator = (Color3 && c) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 & Color3::operator = (Value s) noexcept
Color3 & Color3::operator = (Value s)
{
r = s;
g = s;
@ -98,13 +98,13 @@ Color3 & Color3::operator = (Value s) noexcept
return *this;
}
Color3 & Color3::operator = (const SQChar * name) noexcept
Color3 & Color3::operator = (const SQChar * name)
{
Set(GetColor(name));
return *this;
}
Color3 & Color3::operator = (const Color4 & c) noexcept
Color3 & Color3::operator = (const Color4 & c)
{
r = c.r;
g = c.g;
@ -113,7 +113,7 @@ Color3 & Color3::operator = (const Color4 & c) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 & Color3::operator += (const Color3 & c) noexcept
Color3 & Color3::operator += (const Color3 & c)
{
r += c.r;
g += c.g;
@ -121,7 +121,7 @@ Color3 & Color3::operator += (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator -= (const Color3 & c) noexcept
Color3 & Color3::operator -= (const Color3 & c)
{
r -= c.r;
g -= c.g;
@ -129,7 +129,7 @@ Color3 & Color3::operator -= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator *= (const Color3 & c) noexcept
Color3 & Color3::operator *= (const Color3 & c)
{
r *= c.r;
g *= c.g;
@ -137,7 +137,7 @@ Color3 & Color3::operator *= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator /= (const Color3 & c) noexcept
Color3 & Color3::operator /= (const Color3 & c)
{
r /= c.r;
g /= c.g;
@ -145,7 +145,7 @@ Color3 & Color3::operator /= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator %= (const Color3 & c) noexcept
Color3 & Color3::operator %= (const Color3 & c)
{
r %= c.r;
g %= c.g;
@ -153,7 +153,7 @@ Color3 & Color3::operator %= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator &= (const Color3 & c) noexcept
Color3 & Color3::operator &= (const Color3 & c)
{
r &= c.r;
g &= c.g;
@ -161,7 +161,7 @@ Color3 & Color3::operator &= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator |= (const Color3 & c) noexcept
Color3 & Color3::operator |= (const Color3 & c)
{
r |= c.r;
g |= c.g;
@ -169,7 +169,7 @@ Color3 & Color3::operator |= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator ^= (const Color3 & c) noexcept
Color3 & Color3::operator ^= (const Color3 & c)
{
r ^= c.r;
g ^= c.g;
@ -177,7 +177,7 @@ Color3 & Color3::operator ^= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator <<= (const Color3 & c) noexcept
Color3 & Color3::operator <<= (const Color3 & c)
{
r <<= c.r;
g <<= c.g;
@ -185,7 +185,7 @@ Color3 & Color3::operator <<= (const Color3 & c) noexcept
return *this;
}
Color3 & Color3::operator >>= (const Color3 & c) noexcept
Color3 & Color3::operator >>= (const Color3 & c)
{
r >>= c.r;
g >>= c.g;
@ -194,7 +194,7 @@ Color3 & Color3::operator >>= (const Color3 & c) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 & Color3::operator += (Value s) noexcept
Color3 & Color3::operator += (Value s)
{
r += s;
g += s;
@ -202,7 +202,7 @@ Color3 & Color3::operator += (Value s) noexcept
return *this;
}
Color3 & Color3::operator -= (Value s) noexcept
Color3 & Color3::operator -= (Value s)
{
r -= s;
g -= s;
@ -210,7 +210,7 @@ Color3 & Color3::operator -= (Value s) noexcept
return *this;
}
Color3 & Color3::operator *= (Value s) noexcept
Color3 & Color3::operator *= (Value s)
{
r *= s;
g *= s;
@ -218,7 +218,7 @@ Color3 & Color3::operator *= (Value s) noexcept
return *this;
}
Color3 & Color3::operator /= (Value s) noexcept
Color3 & Color3::operator /= (Value s)
{
r /= s;
g /= s;
@ -226,7 +226,7 @@ Color3 & Color3::operator /= (Value s) noexcept
return *this;
}
Color3 & Color3::operator %= (Value s) noexcept
Color3 & Color3::operator %= (Value s)
{
r %= s;
g %= s;
@ -234,7 +234,7 @@ Color3 & Color3::operator %= (Value s) noexcept
return *this;
}
Color3 & Color3::operator &= (Value s) noexcept
Color3 & Color3::operator &= (Value s)
{
r &= s;
g &= s;
@ -242,7 +242,7 @@ Color3 & Color3::operator &= (Value s) noexcept
return *this;
}
Color3 & Color3::operator |= (Value s) noexcept
Color3 & Color3::operator |= (Value s)
{
r |= s;
g |= s;
@ -250,7 +250,7 @@ Color3 & Color3::operator |= (Value s) noexcept
return *this;
}
Color3 & Color3::operator ^= (Value s) noexcept
Color3 & Color3::operator ^= (Value s)
{
r ^= s;
g ^= s;
@ -258,7 +258,7 @@ Color3 & Color3::operator ^= (Value s) noexcept
return *this;
}
Color3 & Color3::operator <<= (Value s) noexcept
Color3 & Color3::operator <<= (Value s)
{
r <<= s;
g <<= s;
@ -266,7 +266,7 @@ Color3 & Color3::operator <<= (Value s) noexcept
return *this;
}
Color3 & Color3::operator >>= (Value s) noexcept
Color3 & Color3::operator >>= (Value s)
{
r >>= s;
g >>= s;
@ -275,7 +275,7 @@ Color3 & Color3::operator >>= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 & Color3::operator ++ () noexcept
Color3 & Color3::operator ++ ()
{
++r;
++g;
@ -283,7 +283,7 @@ Color3 & Color3::operator ++ () noexcept
return *this;
}
Color3 & Color3::operator -- () noexcept
Color3 & Color3::operator -- ()
{
--r;
--g;
@ -292,7 +292,7 @@ Color3 & Color3::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 Color3::operator ++ (int) noexcept
Color3 Color3::operator ++ (int)
{
Color3 state(*this);
++r;
@ -301,7 +301,7 @@ Color3 Color3::operator ++ (int) noexcept
return state;
}
Color3 Color3::operator -- (int) noexcept
Color3 Color3::operator -- (int)
{
Color3 state(*this);
--r;
@ -311,176 +311,176 @@ Color3 Color3::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 Color3::operator + (const Color3 & c) const noexcept
Color3 Color3::operator + (const Color3 & c) const
{
return Color3(r + c.r, g + c.g, b + c.b);
}
Color3 Color3::operator - (const Color3 & c) const noexcept
Color3 Color3::operator - (const Color3 & c) const
{
return Color3(r - c.r, g - c.g, b - c.b);
}
Color3 Color3::operator * (const Color3 & c) const noexcept
Color3 Color3::operator * (const Color3 & c) const
{
return Color3(r * c.r, g * c.g, b * c.b);
}
Color3 Color3::operator / (const Color3 & c) const noexcept
Color3 Color3::operator / (const Color3 & c) const
{
return Color3(r / c.r, g / c.g, b / c.b);
}
Color3 Color3::operator % (const Color3 & c) const noexcept
Color3 Color3::operator % (const Color3 & c) const
{
return Color3(r % c.r, g % c.g, b % c.b);
}
Color3 Color3::operator & (const Color3 & c) const noexcept
Color3 Color3::operator & (const Color3 & c) const
{
return Color3(r & c.r, g & c.g, b & c.b);
}
Color3 Color3::operator | (const Color3 & c) const noexcept
Color3 Color3::operator | (const Color3 & c) const
{
return Color3(r | c.r, g | c.g, b | c.b);
}
Color3 Color3::operator ^ (const Color3 & c) const noexcept
Color3 Color3::operator ^ (const Color3 & c) const
{
return Color3(r ^ c.r, g ^ c.g, b ^ c.b);
}
Color3 Color3::operator << (const Color3 & c) const noexcept
Color3 Color3::operator << (const Color3 & c) const
{
return Color3(r << c.r, g << c.g, b << c.b);
}
Color3 Color3::operator >> (const Color3 & c) const noexcept
Color3 Color3::operator >> (const Color3 & c) const
{
return Color3(r >> c.r, g >> c.g, b >> c.b);
}
// ------------------------------------------------------------------------------------------------
Color3 Color3::operator + (Value s) const noexcept
Color3 Color3::operator + (Value s) const
{
return Color3(r + s, g + s, b + s);
}
Color3 Color3::operator - (Value s) const noexcept
Color3 Color3::operator - (Value s) const
{
return Color3(r - s, g - s, b - s);
}
Color3 Color3::operator * (Value s) const noexcept
Color3 Color3::operator * (Value s) const
{
return Color3(r * s, g * s, b * s);
}
Color3 Color3::operator / (Value s) const noexcept
Color3 Color3::operator / (Value s) const
{
return Color3(r / s, g / s, b / s);
}
Color3 Color3::operator % (Value s) const noexcept
Color3 Color3::operator % (Value s) const
{
return Color3(r % s, g % s, b % s);
}
Color3 Color3::operator & (Value s) const noexcept
Color3 Color3::operator & (Value s) const
{
return Color3(r & s, g & s, b & s);
}
Color3 Color3::operator | (Value s) const noexcept
Color3 Color3::operator | (Value s) const
{
return Color3(r | s, g | s, b | s);
}
Color3 Color3::operator ^ (Value s) const noexcept
Color3 Color3::operator ^ (Value s) const
{
return Color3(r ^ s, g ^ s, b ^ s);
}
Color3 Color3::operator << (Value s) const noexcept
Color3 Color3::operator << (Value s) const
{
return Color3(r << s, g << s, b << s);
}
Color3 Color3::operator >> (Value s) const noexcept
Color3 Color3::operator >> (Value s) const
{
return Color3(r >> s, g >> s, b >> s);
}
// ------------------------------------------------------------------------------------------------
Color3 Color3::operator + () const noexcept
Color3 Color3::operator + () const
{
return Color3(r, g, b);
}
Color3 Color3::operator - () const noexcept
Color3 Color3::operator - () const
{
return Color3(0, 0, 0);
}
// ------------------------------------------------------------------------------------------------
Color3 Color3::operator ~ () const noexcept
Color3 Color3::operator ~ () const
{
return Color3(~r, ~g, ~b);
}
// ------------------------------------------------------------------------------------------------
bool Color3::operator == (const Color3 & c) const noexcept
bool Color3::operator == (const Color3 & c) const
{
return (r == c.r) && (g == c.g) && (b == c.b);
}
bool Color3::operator != (const Color3 & c) const noexcept
bool Color3::operator != (const Color3 & c) const
{
return (r != c.r) && (g != c.g) && (b != c.b);
}
bool Color3::operator < (const Color3 & c) const noexcept
bool Color3::operator < (const Color3 & c) const
{
return (r < c.r) && (g < c.g) && (b < c.b);
}
bool Color3::operator > (const Color3 & c) const noexcept
bool Color3::operator > (const Color3 & c) const
{
return (r > c.r) && (g > c.g) && (b > c.b);
}
bool Color3::operator <= (const Color3 & c) const noexcept
bool Color3::operator <= (const Color3 & c) const
{
return (r <= c.r) && (g <= c.g) && (b <= c.b);
}
bool Color3::operator >= (const Color3 & c) const noexcept
bool Color3::operator >= (const Color3 & c) const
{
return (r >= c.r) && (g >= c.g) && (b >= c.b);
}
// ------------------------------------------------------------------------------------------------
SQInteger Color3::Cmp(const Color3 & c) const noexcept
SQInteger Color3::Cmp(const Color3 & c) const
{
return *this == c ? 0 : (*this > c ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Color3::ToString() const noexcept
const SQChar * Color3::ToString() const
{
return ToStringF("%u,%u,%u", r, g, b);
}
// ------------------------------------------------------------------------------------------------
void Color3::Set(Value ns) noexcept
void Color3::Set(Value ns)
{
r = ns;
g = ns;
b = ns;
}
void Color3::Set(Value nr, Value ng, Value nb) noexcept
void Color3::Set(Value nr, Value ng, Value nb)
{
r = nr;
g = ng;
@ -488,14 +488,14 @@ void Color3::Set(Value nr, Value ng, Value nb) noexcept
}
// ------------------------------------------------------------------------------------------------
void Color3::Set(const Color3 & c) noexcept
void Color3::Set(const Color3 & c)
{
r = c.r;
g = c.g;
b = c.b;
}
void Color3::Set(const Color4 & c) noexcept
void Color3::Set(const Color4 & c)
{
r = c.r;
g = c.g;
@ -503,24 +503,24 @@ void Color3::Set(const Color4 & c) noexcept
}
// ------------------------------------------------------------------------------------------------
void Color3::Set(const SQChar * str, SQChar delim) noexcept
void Color3::Set(const SQChar * str, SQChar delim)
{
Set(GetColor3(str, delim));
}
// ------------------------------------------------------------------------------------------------
void Color3::SetCol(const SQChar * name) noexcept
void Color3::SetCol(const SQChar * name)
{
Set(GetColor(name));
}
// ------------------------------------------------------------------------------------------------
SQUint32 Color3::GetRGB() const noexcept
SQUint32 Color3::GetRGB() const
{
return static_cast<SQUint32>(r << 16 | g << 8 | b);
}
void Color3::SetRGB(SQUint32 p) noexcept
void Color3::SetRGB(SQUint32 p)
{
r = static_cast<Value>((p >> 16) & 0xFF);
g = static_cast<Value>((p >> 8) & 0xFF);
@ -528,12 +528,12 @@ void Color3::SetRGB(SQUint32 p) noexcept
}
// ------------------------------------------------------------------------------------------------
SQUint32 Color3::GetRGBA() const noexcept
SQUint32 Color3::GetRGBA() const
{
return static_cast<SQUint32>(r << 24 | g << 16 | b << 8 | 0x00);
}
void Color3::SetRGBA(SQUint32 p) noexcept
void Color3::SetRGBA(SQUint32 p)
{
r = static_cast<Value>((p >> 24) & 0xFF);
g = static_cast<Value>((p >> 16) & 0xFF);
@ -541,12 +541,12 @@ void Color3::SetRGBA(SQUint32 p) noexcept
}
// ------------------------------------------------------------------------------------------------
SQUint32 Color3::GetARGB() const noexcept
SQUint32 Color3::GetARGB() const
{
return static_cast<SQUint32>(0x00 << 24 | r << 16 | g << 8 | b);
}
void Color3::SetARGB(SQUint32 p) noexcept
void Color3::SetARGB(SQUint32 p)
{
r = static_cast<Value>((p >> 16) & 0xFF);
g = static_cast<Value>((p >> 8) & 0xFF);
@ -554,14 +554,14 @@ void Color3::SetARGB(SQUint32 p) noexcept
}
// ------------------------------------------------------------------------------------------------
void Color3::Generate() noexcept
void Color3::Generate()
{
r = RandomVal<Value>::Get();
g = RandomVal<Value>::Get();
b = RandomVal<Value>::Get();
}
void Color3::Generate(Value min, Value max) noexcept
void Color3::Generate(Value min, Value max)
{
if (max < min)
{
@ -575,7 +575,7 @@ void Color3::Generate(Value min, Value max) noexcept
}
}
void Color3::Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax) noexcept
void Color3::Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax)
{
if (rmax < rmin || gmax < gmin || bmax < bmin)
{
@ -590,13 +590,13 @@ void Color3::Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin
}
// ------------------------------------------------------------------------------------------------
void Color3::Random() noexcept
void Color3::Random()
{
Set(GetRandomColor());
}
// ------------------------------------------------------------------------------------------------
void Color3::Inverse() noexcept
void Color3::Inverse()
{
r = static_cast<Value>(~r);
g = static_cast<Value>(~g);

View File

@ -23,121 +23,121 @@ struct Color3
// --------------------------------------------------------------------------------------------
Value r, g, b;
// --------------------------------------------------------------------------------------------
Color3() noexcept;
Color3(Value s) noexcept;
Color3(Value r, Value g, Value b) noexcept;
Color3();
Color3(Value s);
Color3(Value r, Value g, Value b);
// --------------------------------------------------------------------------------------------
Color3(const Color4 & c) noexcept;
Color3(const Color4 & c);
// --------------------------------------------------------------------------------------------
Color3(const SQChar * name) noexcept;
Color3(const SQChar * str, SQChar delim) noexcept;
Color3(const SQChar * name);
Color3(const SQChar * str, SQChar delim);
// --------------------------------------------------------------------------------------------
Color3(const Color3 & c) noexcept;
Color3(Color3 && c) noexcept;
Color3(const Color3 & c);
Color3(Color3 && c);
// --------------------------------------------------------------------------------------------
~Color3();
// --------------------------------------------------------------------------------------------
Color3 & operator = (const Color3 & c) noexcept;
Color3 & operator = (Color3 && c) noexcept;
Color3 & operator = (const Color3 & c);
Color3 & operator = (Color3 && c);
// --------------------------------------------------------------------------------------------
Color3 & operator = (Value s) noexcept;
Color3 & operator = (const SQChar * name) noexcept;
Color3 & operator = (const Color4 & c) noexcept;
Color3 & operator = (Value s);
Color3 & operator = (const SQChar * name);
Color3 & operator = (const Color4 & c);
// --------------------------------------------------------------------------------------------
Color3 & operator += (const Color3 & c) noexcept;
Color3 & operator -= (const Color3 & c) noexcept;
Color3 & operator *= (const Color3 & c) noexcept;
Color3 & operator /= (const Color3 & c) noexcept;
Color3 & operator %= (const Color3 & c) noexcept;
Color3 & operator &= (const Color3 & c) noexcept;
Color3 & operator |= (const Color3 & c) noexcept;
Color3 & operator ^= (const Color3 & c) noexcept;
Color3 & operator <<= (const Color3 & c) noexcept;
Color3 & operator >>= (const Color3 & c) noexcept;
Color3 & operator += (const Color3 & c);
Color3 & operator -= (const Color3 & c);
Color3 & operator *= (const Color3 & c);
Color3 & operator /= (const Color3 & c);
Color3 & operator %= (const Color3 & c);
Color3 & operator &= (const Color3 & c);
Color3 & operator |= (const Color3 & c);
Color3 & operator ^= (const Color3 & c);
Color3 & operator <<= (const Color3 & c);
Color3 & operator >>= (const Color3 & c);
// --------------------------------------------------------------------------------------------
Color3 & operator += (Value s) noexcept;
Color3 & operator -= (Value s) noexcept;
Color3 & operator *= (Value s) noexcept;
Color3 & operator /= (Value s) noexcept;
Color3 & operator %= (Value s) noexcept;
Color3 & operator &= (Value s) noexcept;
Color3 & operator |= (Value s) noexcept;
Color3 & operator ^= (Value s) noexcept;
Color3 & operator <<= (Value s) noexcept;
Color3 & operator >>= (Value s) noexcept;
Color3 & operator += (Value s);
Color3 & operator -= (Value s);
Color3 & operator *= (Value s);
Color3 & operator /= (Value s);
Color3 & operator %= (Value s);
Color3 & operator &= (Value s);
Color3 & operator |= (Value s);
Color3 & operator ^= (Value s);
Color3 & operator <<= (Value s);
Color3 & operator >>= (Value s);
// --------------------------------------------------------------------------------------------
Color3 & operator ++ () noexcept;
Color3 & operator -- () noexcept;
Color3 & operator ++ ();
Color3 & operator -- ();
// --------------------------------------------------------------------------------------------
Color3 operator ++ (int) noexcept;
Color3 operator -- (int) noexcept;
Color3 operator ++ (int);
Color3 operator -- (int);
// --------------------------------------------------------------------------------------------
Color3 operator + (const Color3 & c) const noexcept;
Color3 operator - (const Color3 & c) const noexcept;
Color3 operator * (const Color3 & c) const noexcept;
Color3 operator / (const Color3 & c) const noexcept;
Color3 operator % (const Color3 & c) const noexcept;
Color3 operator & (const Color3 & c) const noexcept;
Color3 operator | (const Color3 & c) const noexcept;
Color3 operator ^ (const Color3 & c) const noexcept;
Color3 operator << (const Color3 & c) const noexcept;
Color3 operator >> (const Color3 & c) const noexcept;
Color3 operator + (const Color3 & c) const;
Color3 operator - (const Color3 & c) const;
Color3 operator * (const Color3 & c) const;
Color3 operator / (const Color3 & c) const;
Color3 operator % (const Color3 & c) const;
Color3 operator & (const Color3 & c) const;
Color3 operator | (const Color3 & c) const;
Color3 operator ^ (const Color3 & c) const;
Color3 operator << (const Color3 & c) const;
Color3 operator >> (const Color3 & c) const;
// --------------------------------------------------------------------------------------------
Color3 operator + (Value s) const noexcept;
Color3 operator - (Value s) const noexcept;
Color3 operator * (Value s) const noexcept;
Color3 operator / (Value s) const noexcept;
Color3 operator % (Value s) const noexcept;
Color3 operator & (Value s) const noexcept;
Color3 operator | (Value s) const noexcept;
Color3 operator ^ (Value s) const noexcept;
Color3 operator << (Value s) const noexcept;
Color3 operator >> (Value s) const noexcept;
Color3 operator + (Value s) const;
Color3 operator - (Value s) const;
Color3 operator * (Value s) const;
Color3 operator / (Value s) const;
Color3 operator % (Value s) const;
Color3 operator & (Value s) const;
Color3 operator | (Value s) const;
Color3 operator ^ (Value s) const;
Color3 operator << (Value s) const;
Color3 operator >> (Value s) const;
// --------------------------------------------------------------------------------------------
Color3 operator + () const noexcept;
Color3 operator - () const noexcept;
Color3 operator + () const;
Color3 operator - () const;
// --------------------------------------------------------------------------------------------
Color3 operator ~ () const noexcept;
Color3 operator ~ () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Color3 & c) const noexcept;
bool operator != (const Color3 & c) const noexcept;
bool operator < (const Color3 & c) const noexcept;
bool operator > (const Color3 & c) const noexcept;
bool operator <= (const Color3 & c) const noexcept;
bool operator >= (const Color3 & c) const noexcept;
bool operator == (const Color3 & c) const;
bool operator != (const Color3 & c) const;
bool operator < (const Color3 & c) const;
bool operator > (const Color3 & c) const;
bool operator <= (const Color3 & c) const;
bool operator >= (const Color3 & c) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Color3 & c) const noexcept;
SQInteger Cmp(const Color3 & c) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nr, Value ng, Value nb) noexcept;
void Set(Value ns);
void Set(Value nr, Value ng, Value nb);
// --------------------------------------------------------------------------------------------
void Set(const Color3 & c) noexcept;
void Set(const Color4 & c) noexcept;
void Set(const Color3 & c);
void Set(const Color4 & c);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * str, SQChar delim) noexcept;
void Set(const SQChar * str, SQChar delim);
// --------------------------------------------------------------------------------------------
void SetCol(const SQChar * name) noexcept;
void SetCol(const SQChar * name);
// --------------------------------------------------------------------------------------------
SQUint32 GetRGB() const noexcept;
void SetRGB(SQUint32 p) noexcept;
SQUint32 GetRGB() const;
void SetRGB(SQUint32 p);
// --------------------------------------------------------------------------------------------
SQUint32 GetRGBA() const noexcept;
void SetRGBA(SQUint32 p) noexcept;
SQUint32 GetRGBA() const;
void SetRGBA(SQUint32 p);
// --------------------------------------------------------------------------------------------
SQUint32 GetARGB() const noexcept;
void SetARGB(SQUint32 p) noexcept;
SQUint32 GetARGB() const;
void SetARGB(SQUint32 p);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { r = 0, g = 0, b = 0; }
void Clear() { r = 0, g = 0, b = 0; }
// --------------------------------------------------------------------------------------------
void Random() noexcept;
void Random();
// --------------------------------------------------------------------------------------------
void Inverse() noexcept;
void Inverse();
};
} // Namespace:: SqMod

View File

@ -15,58 +15,58 @@ const Color4 Color4::MAX = Color4(std::numeric_limits<Color4::Value>::max());
SQChar Color4::Delim = ',';
// ------------------------------------------------------------------------------------------------
Color4::Color4() noexcept
Color4::Color4()
: r(0), g(0), b(0), a(0)
{
}
Color4::Color4(Value s) noexcept
Color4::Color4(Value s)
: r(s), g(s), b(s), a(s)
{
}
Color4::Color4(Value rv, Value gv, Value bv) noexcept
Color4::Color4(Value rv, Value gv, Value bv)
: r(rv), g(gv), b(bv), a(0)
{
}
Color4::Color4(Value rv, Value gv, Value bv, Value av) noexcept
Color4::Color4(Value rv, Value gv, Value bv, Value av)
: r(rv), g(gv), b(bv), a(av)
{
}
// ------------------------------------------------------------------------------------------------
Color4::Color4(const Color3 & c) noexcept
Color4::Color4(const Color3 & c)
: r(c.r), g(c.g), b(c.b), a(0)
{
}
// ------------------------------------------------------------------------------------------------
Color4::Color4(const SQChar * name) noexcept
Color4::Color4(const SQChar * name)
: Color4(GetColor(name))
{
}
Color4::Color4(const SQChar * str, SQChar delim) noexcept
Color4::Color4(const SQChar * str, SQChar delim)
: Color4(GetColor4(str, delim))
{
}
// ------------------------------------------------------------------------------------------------
Color4::Color4(const Color4 & c) noexcept
Color4::Color4(const Color4 & c)
: r(c.r), g(c.g), b(c.b), a(c.a)
{
}
Color4::Color4(Color4 && c) noexcept
Color4::Color4(Color4 && c)
: r(c.r), g(c.g), b(c.b), a(c.a)
{
@ -79,7 +79,7 @@ Color4::~Color4()
}
// ------------------------------------------------------------------------------------------------
Color4 & Color4::operator = (const Color4 & c) noexcept
Color4 & Color4::operator = (const Color4 & c)
{
r = c.r;
g = c.g;
@ -88,7 +88,7 @@ Color4 & Color4::operator = (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator = (Color4 && c) noexcept
Color4 & Color4::operator = (Color4 && c)
{
r = c.r;
g = c.g;
@ -98,7 +98,7 @@ Color4 & Color4::operator = (Color4 && c) noexcept
}
// ------------------------------------------------------------------------------------------------
Color4 & Color4::operator = (Value s) noexcept
Color4 & Color4::operator = (Value s)
{
r = s;
g = s;
@ -107,13 +107,13 @@ Color4 & Color4::operator = (Value s) noexcept
return *this;
}
Color4 & Color4::operator = (const SQChar * name) noexcept
Color4 & Color4::operator = (const SQChar * name)
{
Set(GetColor(name));
return *this;
}
Color4 & Color4::operator = (const Color3 & c) noexcept
Color4 & Color4::operator = (const Color3 & c)
{
r = c.r;
g = c.g;
@ -122,7 +122,7 @@ Color4 & Color4::operator = (const Color3 & c) noexcept
}
// ------------------------------------------------------------------------------------------------
Color4 & Color4::operator += (const Color4 & c) noexcept
Color4 & Color4::operator += (const Color4 & c)
{
r += c.r;
g += c.g;
@ -131,7 +131,7 @@ Color4 & Color4::operator += (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator -= (const Color4 & c) noexcept
Color4 & Color4::operator -= (const Color4 & c)
{
r -= c.r;
g -= c.g;
@ -140,7 +140,7 @@ Color4 & Color4::operator -= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator *= (const Color4 & c) noexcept
Color4 & Color4::operator *= (const Color4 & c)
{
r *= c.r;
g *= c.g;
@ -149,7 +149,7 @@ Color4 & Color4::operator *= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator /= (const Color4 & c) noexcept
Color4 & Color4::operator /= (const Color4 & c)
{
r /= c.r;
g /= c.g;
@ -158,7 +158,7 @@ Color4 & Color4::operator /= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator %= (const Color4 & c) noexcept
Color4 & Color4::operator %= (const Color4 & c)
{
r %= c.r;
g %= c.g;
@ -167,7 +167,7 @@ Color4 & Color4::operator %= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator &= (const Color4 & c) noexcept
Color4 & Color4::operator &= (const Color4 & c)
{
r &= c.r;
g &= c.g;
@ -176,7 +176,7 @@ Color4 & Color4::operator &= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator |= (const Color4 & c) noexcept
Color4 & Color4::operator |= (const Color4 & c)
{
r |= c.r;
g |= c.g;
@ -185,7 +185,7 @@ Color4 & Color4::operator |= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator ^= (const Color4 & c) noexcept
Color4 & Color4::operator ^= (const Color4 & c)
{
r ^= c.r;
g ^= c.g;
@ -194,7 +194,7 @@ Color4 & Color4::operator ^= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator <<= (const Color4 & c) noexcept
Color4 & Color4::operator <<= (const Color4 & c)
{
r <<= c.r;
g <<= c.g;
@ -203,7 +203,7 @@ Color4 & Color4::operator <<= (const Color4 & c) noexcept
return *this;
}
Color4 & Color4::operator >>= (const Color4 & c) noexcept
Color4 & Color4::operator >>= (const Color4 & c)
{
r >>= c.r;
g >>= c.g;
@ -213,7 +213,7 @@ Color4 & Color4::operator >>= (const Color4 & c) noexcept
}
// ------------------------------------------------------------------------------------------------
Color4 & Color4::operator += (Value s) noexcept
Color4 & Color4::operator += (Value s)
{
r += s;
g += s;
@ -222,7 +222,7 @@ Color4 & Color4::operator += (Value s) noexcept
return *this;
}
Color4 & Color4::operator -= (Value s) noexcept
Color4 & Color4::operator -= (Value s)
{
r -= s;
g -= s;
@ -231,7 +231,7 @@ Color4 & Color4::operator -= (Value s) noexcept
return *this;
}
Color4 & Color4::operator *= (Value s) noexcept
Color4 & Color4::operator *= (Value s)
{
r *= s;
g *= s;
@ -240,7 +240,7 @@ Color4 & Color4::operator *= (Value s) noexcept
return *this;
}
Color4 & Color4::operator /= (Value s) noexcept
Color4 & Color4::operator /= (Value s)
{
r /= s;
g /= s;
@ -249,7 +249,7 @@ Color4 & Color4::operator /= (Value s) noexcept
return *this;
}
Color4 & Color4::operator %= (Value s) noexcept
Color4 & Color4::operator %= (Value s)
{
r %= s;
g %= s;
@ -258,7 +258,7 @@ Color4 & Color4::operator %= (Value s) noexcept
return *this;
}
Color4 & Color4::operator &= (Value s) noexcept
Color4 & Color4::operator &= (Value s)
{
r &= s;
g &= s;
@ -267,7 +267,7 @@ Color4 & Color4::operator &= (Value s) noexcept
return *this;
}
Color4 & Color4::operator |= (Value s) noexcept
Color4 & Color4::operator |= (Value s)
{
r |= s;
g |= s;
@ -276,7 +276,7 @@ Color4 & Color4::operator |= (Value s) noexcept
return *this;
}
Color4 & Color4::operator ^= (Value s) noexcept
Color4 & Color4::operator ^= (Value s)
{
r ^= s;
g ^= s;
@ -285,7 +285,7 @@ Color4 & Color4::operator ^= (Value s) noexcept
return *this;
}
Color4 & Color4::operator <<= (Value s) noexcept
Color4 & Color4::operator <<= (Value s)
{
r <<= s;
g <<= s;
@ -294,7 +294,7 @@ Color4 & Color4::operator <<= (Value s) noexcept
return *this;
}
Color4 & Color4::operator >>= (Value s) noexcept
Color4 & Color4::operator >>= (Value s)
{
r >>= s;
g >>= s;
@ -304,7 +304,7 @@ Color4 & Color4::operator >>= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Color4 & Color4::operator ++ () noexcept
Color4 & Color4::operator ++ ()
{
++r;
++g;
@ -313,7 +313,7 @@ Color4 & Color4::operator ++ () noexcept
return *this;
}
Color4 & Color4::operator -- () noexcept
Color4 & Color4::operator -- ()
{
--r;
--g;
@ -323,7 +323,7 @@ Color4 & Color4::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Color4 Color4::operator ++ (int) noexcept
Color4 Color4::operator ++ (int)
{
Color4 state(*this);
++r;
@ -333,7 +333,7 @@ Color4 Color4::operator ++ (int) noexcept
return state;
}
Color4 Color4::operator -- (int) noexcept
Color4 Color4::operator -- (int)
{
Color4 state(*this);
--r;
@ -344,169 +344,169 @@ Color4 Color4::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Color4 Color4::operator + (const Color4 & c) const noexcept
Color4 Color4::operator + (const Color4 & c) const
{
return Color4(r + c.r, g + c.g, b + c.b, a + c.a);
}
Color4 Color4::operator - (const Color4 & c) const noexcept
Color4 Color4::operator - (const Color4 & c) const
{
return Color4(r - c.r, g - c.g, b - c.b, a - c.a);
}
Color4 Color4::operator * (const Color4 & c) const noexcept
Color4 Color4::operator * (const Color4 & c) const
{
return Color4(r * c.r, g * c.g, b * c.b, a * c.a);
}
Color4 Color4::operator / (const Color4 & c) const noexcept
Color4 Color4::operator / (const Color4 & c) const
{
return Color4(r / c.r, g / c.g, b / c.b, a / c.a);
}
Color4 Color4::operator % (const Color4 & c) const noexcept
Color4 Color4::operator % (const Color4 & c) const
{
return Color4(r % c.r, g % c.g, b % c.b, a % c.a);
}
Color4 Color4::operator & (const Color4 & c) const noexcept
Color4 Color4::operator & (const Color4 & c) const
{
return Color4(r & c.r, g & c.g, b & c.b, a & c.a);
}
Color4 Color4::operator | (const Color4 & c) const noexcept
Color4 Color4::operator | (const Color4 & c) const
{
return Color4(r | c.r, g | c.g, b | c.b, a | c.a);
}
Color4 Color4::operator ^ (const Color4 & c) const noexcept
Color4 Color4::operator ^ (const Color4 & c) const
{
return Color4(r ^ c.r, g ^ c.g, b ^ c.b, a ^ c.a);
}
Color4 Color4::operator << (const Color4 & c) const noexcept
Color4 Color4::operator << (const Color4 & c) const
{
return Color4(r << c.r, g << c.g, b << c.b, a << c.a);
}
Color4 Color4::operator >> (const Color4 & c) const noexcept
Color4 Color4::operator >> (const Color4 & c) const
{
return Color4(r >> c.r, g >> c.g, b >> c.b, a >> c.a);
}
// ------------------------------------------------------------------------------------------------
Color4 Color4::operator + (Value s) const noexcept
Color4 Color4::operator + (Value s) const
{
return Color4(r + s, g + s, b + s, a + s);
}
Color4 Color4::operator - (Value s) const noexcept
Color4 Color4::operator - (Value s) const
{
return Color4(r - s, g - s, b - s, a - s);
}
Color4 Color4::operator * (Value s) const noexcept
Color4 Color4::operator * (Value s) const
{
return Color4(r * s, g * s, b * s, a * s);
}
Color4 Color4::operator / (Value s) const noexcept
Color4 Color4::operator / (Value s) const
{
return Color4(r / s, g / s, b / s, a / s);
}
Color4 Color4::operator % (Value s) const noexcept
Color4 Color4::operator % (Value s) const
{
return Color4(r % s, g % s, b % s, a % s);
}
Color4 Color4::operator & (Value s) const noexcept
Color4 Color4::operator & (Value s) const
{
return Color4(r & s, g & s, b & s, a & s);
}
Color4 Color4::operator | (Value s) const noexcept
Color4 Color4::operator | (Value s) const
{
return Color4(r | s, g | s, b | s, a | s);
}
Color4 Color4::operator ^ (Value s) const noexcept
Color4 Color4::operator ^ (Value s) const
{
return Color4(r ^ s, g ^ s, b ^ s, a ^ s);
}
Color4 Color4::operator << (Value s) const noexcept
Color4 Color4::operator << (Value s) const
{
return Color4(r << s, g << s, b << s, a << s);
}
Color4 Color4::operator >> (Value s) const noexcept
Color4 Color4::operator >> (Value s) const
{
return Color4(r >> s, g >> s, b >> s, a >> s);
}
// ------------------------------------------------------------------------------------------------
Color4 Color4::operator + () const noexcept
Color4 Color4::operator + () const
{
return Color4(r, g, b, a);
}
Color4 Color4::operator - () const noexcept
Color4 Color4::operator - () const
{
return Color4(0, 0, 0, 0);
}
// ------------------------------------------------------------------------------------------------
Color4 Color4::operator ~ () const noexcept
Color4 Color4::operator ~ () const
{
return Color4(~r, ~g, ~b, ~a);
}
// ------------------------------------------------------------------------------------------------
bool Color4::operator == (const Color4 & c) const noexcept
bool Color4::operator == (const Color4 & c) const
{
return (r == c.r) && (g == c.g) && (b == c.b) && (a == c.a);
}
bool Color4::operator != (const Color4 & c) const noexcept
bool Color4::operator != (const Color4 & c) const
{
return (r != c.r) && (g != c.g) && (b != c.b) && (a != c.a);
}
bool Color4::operator < (const Color4 & c) const noexcept
bool Color4::operator < (const Color4 & c) const
{
return (r < c.r) && (g < c.g) && (b < c.b) && (a < c.a);
}
bool Color4::operator > (const Color4 & c) const noexcept
bool Color4::operator > (const Color4 & c) const
{
return (r > c.r) && (g > c.g) && (b > c.b) && (a > c.a);
}
bool Color4::operator <= (const Color4 & c) const noexcept
bool Color4::operator <= (const Color4 & c) const
{
return (r <= c.r) && (g <= c.g) && (b <= c.b) && (a <= c.a);
}
bool Color4::operator >= (const Color4 & c) const noexcept
bool Color4::operator >= (const Color4 & c) const
{
return (r >= c.r) && (g >= c.g) && (b >= c.b) && (a >= c.a);
}
// ------------------------------------------------------------------------------------------------
SQInteger Color4::Cmp(const Color4 & c) const noexcept
SQInteger Color4::Cmp(const Color4 & c) const
{
return *this == c ? 0 : (*this > c ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Color4::ToString() const noexcept
const SQChar * Color4::ToString() const
{
return ToStringF("%u,%u,%u,%u", r, g, b, a);
}
// ------------------------------------------------------------------------------------------------
void Color4::Set(Value ns) noexcept
void Color4::Set(Value ns)
{
r = ns;
g = ns;
@ -514,14 +514,14 @@ void Color4::Set(Value ns) noexcept
a = ns;
}
void Color4::Set(Value nr, Value ng, Value nb) noexcept
void Color4::Set(Value nr, Value ng, Value nb)
{
r = nr;
g = ng;
b = nb;
}
void Color4::Set(Value nr, Value ng, Value nb, Value na) noexcept
void Color4::Set(Value nr, Value ng, Value nb, Value na)
{
r = nr;
g = ng;
@ -530,7 +530,7 @@ void Color4::Set(Value nr, Value ng, Value nb, Value na) noexcept
}
// ------------------------------------------------------------------------------------------------
void Color4::Set(const Color4 & c) noexcept
void Color4::Set(const Color4 & c)
{
r = c.r;
g = c.g;
@ -538,7 +538,7 @@ void Color4::Set(const Color4 & c) noexcept
a = c.a;
}
void Color4::Set(const Color3 & c) noexcept
void Color4::Set(const Color3 & c)
{
r = c.r;
g = c.g;
@ -547,24 +547,24 @@ void Color4::Set(const Color3 & c) noexcept
}
// ------------------------------------------------------------------------------------------------
void Color4::Set(const SQChar * str, SQChar delim) noexcept
void Color4::Set(const SQChar * str, SQChar delim)
{
Set(GetColor4(str, delim));
}
// ------------------------------------------------------------------------------------------------
void Color4::SetCol(const SQChar * name) noexcept
void Color4::SetCol(const SQChar * name)
{
Set(GetColor(name));
}
// ------------------------------------------------------------------------------------------------
SQUint32 Color4::GetRGB() const noexcept
SQUint32 Color4::GetRGB() const
{
return static_cast<SQUint32>(r << 16 | g << 8 | b);
}
void Color4::SetRGB(SQUint32 p) noexcept
void Color4::SetRGB(SQUint32 p)
{
r = static_cast<Value>((p >> 16) & 0xFF);
g = static_cast<Value>((p >> 8) & 0xFF);
@ -572,12 +572,12 @@ void Color4::SetRGB(SQUint32 p) noexcept
}
// ------------------------------------------------------------------------------------------------
SQUint32 Color4::GetRGBA() const noexcept
SQUint32 Color4::GetRGBA() const
{
return static_cast<SQUint32>(r << 24 | g << 16 | b << 8 | a);
}
void Color4::SetRGBA(SQUint32 p) noexcept
void Color4::SetRGBA(SQUint32 p)
{
r = static_cast<Value>((p >> 24) & 0xFF);
g = static_cast<Value>((p >> 16) & 0xFF);
@ -586,12 +586,12 @@ void Color4::SetRGBA(SQUint32 p) noexcept
}
// ------------------------------------------------------------------------------------------------
SQUint32 Color4::GetARGB() const noexcept
SQUint32 Color4::GetARGB() const
{
return static_cast<SQUint32>(a << 24 | r << 16 | g << 8 | b);
}
void Color4::SetARGB(SQUint32 p) noexcept
void Color4::SetARGB(SQUint32 p)
{
a = static_cast<Value>((p >> 24) & 0xFF);
r = static_cast<Value>((p >> 16) & 0xFF);
@ -600,7 +600,7 @@ void Color4::SetARGB(SQUint32 p) noexcept
}
// ------------------------------------------------------------------------------------------------
void Color4::Generate() noexcept
void Color4::Generate()
{
r = RandomVal<Value>::Get();
g = RandomVal<Value>::Get();
@ -608,7 +608,7 @@ void Color4::Generate() noexcept
a = RandomVal<Value>::Get();
}
void Color4::Generate(Value min, Value max) noexcept
void Color4::Generate(Value min, Value max)
{
if (max < min)
{
@ -623,7 +623,7 @@ void Color4::Generate(Value min, Value max) noexcept
}
}
void Color4::Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax, Value amin, Value amax) noexcept
void Color4::Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax, Value amin, Value amax)
{
if (rmax < rmin || gmax < gmin || bmax < bmin || amax < amin)
{
@ -639,13 +639,13 @@ void Color4::Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin
}
// ------------------------------------------------------------------------------------------------
void Color4::Random() noexcept
void Color4::Random()
{
Set(GetRandomColor());
}
// ------------------------------------------------------------------------------------------------
void Color4::Inverse() noexcept
void Color4::Inverse()
{
r = static_cast<Value>(~r);
g = static_cast<Value>(~g);

View File

@ -23,123 +23,123 @@ struct Color4
// --------------------------------------------------------------------------------------------
Value r, g, b, a;
// --------------------------------------------------------------------------------------------
Color4() noexcept;
Color4(Value s) noexcept;
Color4(Value r, Value g, Value b) noexcept;
Color4(Value r, Value g, Value b, Value a) noexcept;
Color4();
Color4(Value s);
Color4(Value r, Value g, Value b);
Color4(Value r, Value g, Value b, Value a);
// --------------------------------------------------------------------------------------------
Color4(const Color3 & c) noexcept;
Color4(const Color3 & c);
// --------------------------------------------------------------------------------------------
Color4(const SQChar * name) noexcept;
Color4(const SQChar * str, SQChar delim) noexcept;
Color4(const SQChar * name);
Color4(const SQChar * str, SQChar delim);
// --------------------------------------------------------------------------------------------
Color4(const Color4 & c) noexcept;
Color4(Color4 && c) noexcept;
Color4(const Color4 & c);
Color4(Color4 && c);
// --------------------------------------------------------------------------------------------
~Color4();
// --------------------------------------------------------------------------------------------
Color4 & operator = (const Color4 & c) noexcept;
Color4 & operator = (Color4 && c) noexcept;
Color4 & operator = (const Color4 & c);
Color4 & operator = (Color4 && c);
// --------------------------------------------------------------------------------------------
Color4 & operator = (Value s) noexcept;
Color4 & operator = (const SQChar * name) noexcept;
Color4 & operator = (const Color3 & c) noexcept;
Color4 & operator = (Value s);
Color4 & operator = (const SQChar * name);
Color4 & operator = (const Color3 & c);
// --------------------------------------------------------------------------------------------
Color4 & operator += (const Color4 & c) noexcept;
Color4 & operator -= (const Color4 & c) noexcept;
Color4 & operator *= (const Color4 & c) noexcept;
Color4 & operator /= (const Color4 & c) noexcept;
Color4 & operator %= (const Color4 & c) noexcept;
Color4 & operator &= (const Color4 & c) noexcept;
Color4 & operator |= (const Color4 & c) noexcept;
Color4 & operator ^= (const Color4 & c) noexcept;
Color4 & operator <<= (const Color4 & c) noexcept;
Color4 & operator >>= (const Color4 & c) noexcept;
Color4 & operator += (const Color4 & c);
Color4 & operator -= (const Color4 & c);
Color4 & operator *= (const Color4 & c);
Color4 & operator /= (const Color4 & c);
Color4 & operator %= (const Color4 & c);
Color4 & operator &= (const Color4 & c);
Color4 & operator |= (const Color4 & c);
Color4 & operator ^= (const Color4 & c);
Color4 & operator <<= (const Color4 & c);
Color4 & operator >>= (const Color4 & c);
// --------------------------------------------------------------------------------------------
Color4 & operator += (Value s) noexcept;
Color4 & operator -= (Value s) noexcept;
Color4 & operator *= (Value s) noexcept;
Color4 & operator /= (Value s) noexcept;
Color4 & operator %= (Value s) noexcept;
Color4 & operator &= (Value s) noexcept;
Color4 & operator |= (Value s) noexcept;
Color4 & operator ^= (Value s) noexcept;
Color4 & operator <<= (Value s) noexcept;
Color4 & operator >>= (Value s) noexcept;
Color4 & operator += (Value s);
Color4 & operator -= (Value s);
Color4 & operator *= (Value s);
Color4 & operator /= (Value s);
Color4 & operator %= (Value s);
Color4 & operator &= (Value s);
Color4 & operator |= (Value s);
Color4 & operator ^= (Value s);
Color4 & operator <<= (Value s);
Color4 & operator >>= (Value s);
// --------------------------------------------------------------------------------------------
Color4 & operator ++ () noexcept;
Color4 & operator -- () noexcept;
Color4 & operator ++ ();
Color4 & operator -- ();
// --------------------------------------------------------------------------------------------
Color4 operator ++ (int) noexcept;
Color4 operator -- (int) noexcept;
Color4 operator ++ (int);
Color4 operator -- (int);
// --------------------------------------------------------------------------------------------
Color4 operator + (const Color4 & c) const noexcept;
Color4 operator - (const Color4 & c) const noexcept;
Color4 operator * (const Color4 & c) const noexcept;
Color4 operator / (const Color4 & c) const noexcept;
Color4 operator % (const Color4 & c) const noexcept;
Color4 operator & (const Color4 & c) const noexcept;
Color4 operator | (const Color4 & c) const noexcept;
Color4 operator ^ (const Color4 & c) const noexcept;
Color4 operator << (const Color4 & c) const noexcept;
Color4 operator >> (const Color4 & c) const noexcept;
Color4 operator + (const Color4 & c) const;
Color4 operator - (const Color4 & c) const;
Color4 operator * (const Color4 & c) const;
Color4 operator / (const Color4 & c) const;
Color4 operator % (const Color4 & c) const;
Color4 operator & (const Color4 & c) const;
Color4 operator | (const Color4 & c) const;
Color4 operator ^ (const Color4 & c) const;
Color4 operator << (const Color4 & c) const;
Color4 operator >> (const Color4 & c) const;
// --------------------------------------------------------------------------------------------
Color4 operator + (Value s) const noexcept;
Color4 operator - (Value s) const noexcept;
Color4 operator * (Value s) const noexcept;
Color4 operator / (Value s) const noexcept;
Color4 operator % (Value s) const noexcept;
Color4 operator & (Value s) const noexcept;
Color4 operator | (Value s) const noexcept;
Color4 operator ^ (Value s) const noexcept;
Color4 operator << (Value s) const noexcept;
Color4 operator >> (Value s) const noexcept;
Color4 operator + (Value s) const;
Color4 operator - (Value s) const;
Color4 operator * (Value s) const;
Color4 operator / (Value s) const;
Color4 operator % (Value s) const;
Color4 operator & (Value s) const;
Color4 operator | (Value s) const;
Color4 operator ^ (Value s) const;
Color4 operator << (Value s) const;
Color4 operator >> (Value s) const;
// --------------------------------------------------------------------------------------------
Color4 operator + () const noexcept;
Color4 operator - () const noexcept;
Color4 operator + () const;
Color4 operator - () const;
// --------------------------------------------------------------------------------------------
Color4 operator ~ () const noexcept;
Color4 operator ~ () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Color4 & c) const noexcept;
bool operator != (const Color4 & c) const noexcept;
bool operator < (const Color4 & c) const noexcept;
bool operator > (const Color4 & c) const noexcept;
bool operator <= (const Color4 & c) const noexcept;
bool operator >= (const Color4 & c) const noexcept;
bool operator == (const Color4 & c) const;
bool operator != (const Color4 & c) const;
bool operator < (const Color4 & c) const;
bool operator > (const Color4 & c) const;
bool operator <= (const Color4 & c) const;
bool operator >= (const Color4 & c) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Color4 & c) const noexcept;
SQInteger Cmp(const Color4 & c) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nr, Value ng, Value nb) noexcept;
void Set(Value nr, Value ng, Value nb, Value na) noexcept;
void Set(Value ns);
void Set(Value nr, Value ng, Value nb);
void Set(Value nr, Value ng, Value nb, Value na);
// --------------------------------------------------------------------------------------------
void Set(const Color4 & c) noexcept;
void Set(const Color3 & c) noexcept;
void Set(const Color4 & c);
void Set(const Color3 & c);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * name, SQChar delim) noexcept;
void Set(const SQChar * name, SQChar delim);
// --------------------------------------------------------------------------------------------
void SetCol(const SQChar * name) noexcept;
void SetCol(const SQChar * name);
// --------------------------------------------------------------------------------------------
SQUint32 GetRGB() const noexcept;
void SetRGB(SQUint32 p) noexcept;
SQUint32 GetRGB() const;
void SetRGB(SQUint32 p);
// --------------------------------------------------------------------------------------------
SQUint32 GetRGBA() const noexcept;
void SetRGBA(SQUint32 p) noexcept;
SQUint32 GetRGBA() const;
void SetRGBA(SQUint32 p);
// --------------------------------------------------------------------------------------------
SQUint32 GetARGB() const noexcept;
void SetARGB(SQUint32 p) noexcept;
SQUint32 GetARGB() const;
void SetARGB(SQUint32 p);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax, Value amin, Value amax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value rmin, Value rmax, Value gmin, Value gmax, Value bmin, Value bmax, Value amin, Value amax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { r = 0, g = 0, b = 0, a = 0; }
void Clear() { r = 0, g = 0, b = 0, a = 0; }
// --------------------------------------------------------------------------------------------
void Random() noexcept;
void Random();
// --------------------------------------------------------------------------------------------
void Inverse() noexcept;
void Inverse();
};
} // Namespace:: SqMod

View File

@ -16,58 +16,58 @@ const Quaternion Quaternion::MAX = Quaternion(std::numeric_limits<Quaternion::Va
SQChar Quaternion::Delim = ',';
// ------------------------------------------------------------------------------------------------
Quaternion::Quaternion() noexcept
Quaternion::Quaternion()
: x(0.0), y(0.0), z(0.0), w(0.0)
{
}
Quaternion::Quaternion(Value s) noexcept
Quaternion::Quaternion(Value s)
: x(s), y(s), z(s), w(s)
{
}
Quaternion::Quaternion(Value xv, Value yv, Value zv) noexcept
Quaternion::Quaternion(Value xv, Value yv, Value zv)
: x(xv), y(yv), z(zv), w(0.0)
{
}
Quaternion::Quaternion(Value xv, Value yv, Value zv, Value wv) noexcept
Quaternion::Quaternion(Value xv, Value yv, Value zv, Value wv)
: x(xv), y(yv), z(zv), w(wv)
{
}
// ------------------------------------------------------------------------------------------------
Quaternion::Quaternion(const Vector3 & v) noexcept
Quaternion::Quaternion(const Vector3 & v)
: x(v.x), y(v.y), z(v.z), w(0.0)
{
}
Quaternion::Quaternion(const Vector4 & v) noexcept
Quaternion::Quaternion(const Vector4 & v)
: x(v.x), y(v.y), z(v.z), w(v.w)
{
}
// ------------------------------------------------------------------------------------------------
Quaternion::Quaternion(const SQChar * values, SQChar delim) noexcept
Quaternion::Quaternion(const SQChar * values, SQChar delim)
: Quaternion(GetQuaternion(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
Quaternion::Quaternion(const Quaternion & q) noexcept
Quaternion::Quaternion(const Quaternion & q)
: x(q.x), y(q.y), z(q.z), w(q.w)
{
}
Quaternion::Quaternion(Quaternion && q) noexcept
Quaternion::Quaternion(Quaternion && q)
: x(q.x), y(q.y), z(q.z), w(q.w)
{
@ -80,7 +80,7 @@ Quaternion::~Quaternion()
}
// ------------------------------------------------------------------------------------------------
Quaternion & Quaternion::operator = (const Quaternion & q) noexcept
Quaternion & Quaternion::operator = (const Quaternion & q)
{
x = q.x;
y = q.y;
@ -89,7 +89,7 @@ Quaternion & Quaternion::operator = (const Quaternion & q) noexcept
return *this;
}
Quaternion & Quaternion::operator = (Quaternion && q) noexcept
Quaternion & Quaternion::operator = (Quaternion && q)
{
x = q.x;
y = q.y;
@ -99,7 +99,7 @@ Quaternion & Quaternion::operator = (Quaternion && q) noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion & Quaternion::operator = (Value s) noexcept
Quaternion & Quaternion::operator = (Value s)
{
x = s;
y = s;
@ -108,7 +108,7 @@ Quaternion & Quaternion::operator = (Value s) noexcept
return *this;
}
Quaternion & Quaternion::operator = (const Vector3 & q) noexcept
Quaternion & Quaternion::operator = (const Vector3 & q)
{
x = q.x;
y = q.y;
@ -117,7 +117,7 @@ Quaternion & Quaternion::operator = (const Vector3 & q) noexcept
return *this;
}
Quaternion & Quaternion::operator = (const Vector4 & q) noexcept
Quaternion & Quaternion::operator = (const Vector4 & q)
{
x = q.x;
y = q.y;
@ -127,7 +127,7 @@ Quaternion & Quaternion::operator = (const Vector4 & q) noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion & Quaternion::operator += (const Quaternion & q) noexcept
Quaternion & Quaternion::operator += (const Quaternion & q)
{
x += q.x;
y += q.y;
@ -136,7 +136,7 @@ Quaternion & Quaternion::operator += (const Quaternion & q) noexcept
return *this;
}
Quaternion & Quaternion::operator -= (const Quaternion & q) noexcept
Quaternion & Quaternion::operator -= (const Quaternion & q)
{
x -= q.x;
y -= q.y;
@ -145,7 +145,7 @@ Quaternion & Quaternion::operator -= (const Quaternion & q) noexcept
return *this;
}
Quaternion & Quaternion::operator *= (const Quaternion & q) noexcept
Quaternion & Quaternion::operator *= (const Quaternion & q)
{
x *= q.x;
y *= q.y;
@ -154,7 +154,7 @@ Quaternion & Quaternion::operator *= (const Quaternion & q) noexcept
return *this;
}
Quaternion & Quaternion::operator /= (const Quaternion & q) noexcept
Quaternion & Quaternion::operator /= (const Quaternion & q)
{
x /= q.x;
y /= q.y;
@ -163,7 +163,7 @@ Quaternion & Quaternion::operator /= (const Quaternion & q) noexcept
return *this;
}
Quaternion & Quaternion::operator %= (const Quaternion & q) noexcept
Quaternion & Quaternion::operator %= (const Quaternion & q)
{
x = std::fmod(x, q.x);
y = std::fmod(y, q.y);
@ -173,7 +173,7 @@ Quaternion & Quaternion::operator %= (const Quaternion & q) noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion & Quaternion::operator += (Value s) noexcept
Quaternion & Quaternion::operator += (Value s)
{
x += s;
y += s;
@ -182,7 +182,7 @@ Quaternion & Quaternion::operator += (Value s) noexcept
return *this;
}
Quaternion & Quaternion::operator -= (Value s) noexcept
Quaternion & Quaternion::operator -= (Value s)
{
x -= s;
y -= s;
@ -191,7 +191,7 @@ Quaternion & Quaternion::operator -= (Value s) noexcept
return *this;
}
Quaternion & Quaternion::operator *= (Value s) noexcept
Quaternion & Quaternion::operator *= (Value s)
{
x *= s;
y *= s;
@ -200,7 +200,7 @@ Quaternion & Quaternion::operator *= (Value s) noexcept
return *this;
}
Quaternion & Quaternion::operator /= (Value s) noexcept
Quaternion & Quaternion::operator /= (Value s)
{
x /= s;
y /= s;
@ -209,7 +209,7 @@ Quaternion & Quaternion::operator /= (Value s) noexcept
return *this;
}
Quaternion & Quaternion::operator %= (Value s) noexcept
Quaternion & Quaternion::operator %= (Value s)
{
x = std::fmod(x, s);
y = std::fmod(y, s);
@ -219,7 +219,7 @@ Quaternion & Quaternion::operator %= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion & Quaternion::operator ++ () noexcept
Quaternion & Quaternion::operator ++ ()
{
++x;
++y;
@ -228,7 +228,7 @@ Quaternion & Quaternion::operator ++ () noexcept
return *this;
}
Quaternion & Quaternion::operator -- () noexcept
Quaternion & Quaternion::operator -- ()
{
--x;
--y;
@ -238,7 +238,7 @@ Quaternion & Quaternion::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator ++ (int) noexcept
Quaternion Quaternion::operator ++ (int)
{
Quaternion state(*this);
++x;
@ -248,7 +248,7 @@ Quaternion Quaternion::operator ++ (int) noexcept
return state;
}
Quaternion Quaternion::operator -- (int) noexcept
Quaternion Quaternion::operator -- (int)
{
Quaternion state(*this);
--x;
@ -259,116 +259,116 @@ Quaternion Quaternion::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator + (const Quaternion & q) const noexcept
Quaternion Quaternion::operator + (const Quaternion & q) const
{
return Quaternion(x + q.x, y + q.y, z + q.z, w + q.w);
}
Quaternion Quaternion::operator + (Value s) const noexcept
Quaternion Quaternion::operator + (Value s) const
{
return Quaternion(x + s, y + s, z + s, w + s);
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator - (const Quaternion & q) const noexcept
Quaternion Quaternion::operator - (const Quaternion & q) const
{
return Quaternion(x - q.x, y - q.y, z - q.z, w - q.w);
}
Quaternion Quaternion::operator - (Value s) const noexcept
Quaternion Quaternion::operator - (Value s) const
{
return Quaternion(x - s, y - s, z - s, w - s);
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator * (const Quaternion & q) const noexcept
Quaternion Quaternion::operator * (const Quaternion & q) const
{
return Quaternion(x * q.x, y * q.y, z * q.z, w * q.w);
}
Quaternion Quaternion::operator * (Value s) const noexcept
Quaternion Quaternion::operator * (Value s) const
{
return Quaternion(x * s, y * s, z * s, w * s);
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator / (const Quaternion & q) const noexcept
Quaternion Quaternion::operator / (const Quaternion & q) const
{
return Quaternion(x / q.x, y / q.y, z / q.z, w / q.w);
}
Quaternion Quaternion::operator / (Value s) const noexcept
Quaternion Quaternion::operator / (Value s) const
{
return Quaternion(x / s, y / s, z / s, w / s);
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator % (const Quaternion & q) const noexcept
Quaternion Quaternion::operator % (const Quaternion & q) const
{
return Quaternion(std::fmod(x, q.x), std::fmod(y, q.y), std::fmod(z, q.z), std::fmod(w, q.w));
}
Quaternion Quaternion::operator % (Value s) const noexcept
Quaternion Quaternion::operator % (Value s) const
{
return Quaternion(std::fmod(x, s), std::fmod(y, s), std::fmod(z, s), std::fmod(w, s));
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::operator + () const noexcept
Quaternion Quaternion::operator + () const
{
return Quaternion(std::fabs(x), std::fabs(y), std::fabs(z), std::fabs(w));
}
Quaternion Quaternion::operator - () const noexcept
Quaternion Quaternion::operator - () const
{
return Quaternion(-x, -y, -z, -w);
}
// ------------------------------------------------------------------------------------------------
bool Quaternion::operator == (const Quaternion & q) const noexcept
bool Quaternion::operator == (const Quaternion & q) const
{
return EpsEq(x, q.x) && EpsEq(y, q.y) && EpsEq(z, q.z) && EpsEq(w, q.w);
}
bool Quaternion::operator != (const Quaternion & q) const noexcept
bool Quaternion::operator != (const Quaternion & q) const
{
return !EpsEq(x, q.x) && !EpsEq(y, q.y) && !EpsEq(z, q.z) && !EpsEq(w, q.w);
}
bool Quaternion::operator < (const Quaternion & q) const noexcept
bool Quaternion::operator < (const Quaternion & q) const
{
return std::isless(x, q.x) && std::isless(y, q.y) && std::isless(z, q.z) && std::isless(w, q.w);
}
bool Quaternion::operator > (const Quaternion & q) const noexcept
bool Quaternion::operator > (const Quaternion & q) const
{
return std::isgreater(x, q.x) && std::isgreater(y, q.y) && std::isgreater(z, q.z) && std::isgreater(w, q.w);
}
bool Quaternion::operator <= (const Quaternion & q) const noexcept
bool Quaternion::operator <= (const Quaternion & q) const
{
return std::islessequal(x, q.x) && std::islessequal(y, q.y) && std::islessequal(z, q.z) && std::islessequal(w, q.w);
}
bool Quaternion::operator >= (const Quaternion & q) const noexcept
bool Quaternion::operator >= (const Quaternion & q) const
{
return std::isgreaterequal(x, q.x) && std::isgreaterequal(y, q.y) && std::isgreaterequal(z, q.z) && std::isgreaterequal(w, q.w);
}
// ------------------------------------------------------------------------------------------------
SQInteger Quaternion::Cmp(const Quaternion & q) const noexcept
SQInteger Quaternion::Cmp(const Quaternion & q) const
{
return *this == q ? 0 : (*this > q ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Quaternion::ToString() const noexcept
const SQChar * Quaternion::ToString() const
{
return ToStringF("%f,%f,%f,%f", x, y, z, w);
}
// ------------------------------------------------------------------------------------------------
void Quaternion::Set(Value ns) noexcept
void Quaternion::Set(Value ns)
{
x = ns;
y = ns;
@ -376,14 +376,14 @@ void Quaternion::Set(Value ns) noexcept
w = ns;
}
void Quaternion::Set(Value nx, Value ny, Value nz) noexcept
void Quaternion::Set(Value nx, Value ny, Value nz)
{
x = nx;
y = ny;
z = nz;
}
void Quaternion::Set(Value nx, Value ny, Value nz, Value nw) noexcept
void Quaternion::Set(Value nx, Value ny, Value nz, Value nw)
{
x = nx;
y = ny;
@ -392,7 +392,7 @@ void Quaternion::Set(Value nx, Value ny, Value nz, Value nw) noexcept
}
// ------------------------------------------------------------------------------------------------
void Quaternion::Set(const Quaternion & q) noexcept
void Quaternion::Set(const Quaternion & q)
{
x = q.x;
y = q.y;
@ -400,7 +400,7 @@ void Quaternion::Set(const Quaternion & q) noexcept
w = q.w;
}
void Quaternion::Set(const Vector3 & v) noexcept
void Quaternion::Set(const Vector3 & v)
{
x = v.x;
y = v.y;
@ -408,7 +408,7 @@ void Quaternion::Set(const Vector3 & v) noexcept
w = 0.0;
}
void Quaternion::Set(const Vector4 & v) noexcept
void Quaternion::Set(const Vector4 & v)
{
x = v.x;
y = v.y;
@ -417,13 +417,13 @@ void Quaternion::Set(const Vector4 & v) noexcept
}
// ------------------------------------------------------------------------------------------------
void Quaternion::Set(const SQChar * values, SQChar delim) noexcept
void Quaternion::Set(const SQChar * values, SQChar delim)
{
Set(GetQuaternion(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Quaternion::Generate() noexcept
void Quaternion::Generate()
{
x = RandomVal<Value>::Get();
y = RandomVal<Value>::Get();
@ -431,7 +431,7 @@ void Quaternion::Generate() noexcept
w = RandomVal<Value>::Get();
}
void Quaternion::Generate(Value min, Value max) noexcept
void Quaternion::Generate(Value min, Value max)
{
if (max < min)
{
@ -446,7 +446,7 @@ void Quaternion::Generate(Value min, Value max) noexcept
}
}
void Quaternion::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax) noexcept
void Quaternion::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax)
{
if (std::isless(xmax, xmin) || std::isless(ymax, ymin) || std::isless(zmax, zmin) || std::isless(wmax, wmin))
{
@ -462,7 +462,7 @@ void Quaternion::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value
}
// ------------------------------------------------------------------------------------------------
Quaternion Quaternion::Abs() const noexcept
Quaternion Quaternion::Abs() const
{
return Quaternion(std::fabs(x), std::fabs(y), std::fabs(z), std::fabs(w));
}

View File

@ -23,89 +23,89 @@ struct Quaternion
// --------------------------------------------------------------------------------------------
Value x, y, z, w;
// --------------------------------------------------------------------------------------------
Quaternion() noexcept;
Quaternion(Value s) noexcept;
Quaternion(Value xv, Value yv, Value zv) noexcept;
Quaternion(Value xv, Value yv, Value zv, Value wv) noexcept;
Quaternion();
Quaternion(Value s);
Quaternion(Value xv, Value yv, Value zv);
Quaternion(Value xv, Value yv, Value zv, Value wv);
// --------------------------------------------------------------------------------------------
Quaternion(const Vector3 & v) noexcept;
Quaternion(const Vector4 & v) noexcept;
Quaternion(const Vector3 & v);
Quaternion(const Vector4 & v);
// --------------------------------------------------------------------------------------------
Quaternion(const SQChar * values, SQChar delim) noexcept;
Quaternion(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
Quaternion(const Quaternion & q) noexcept;
Quaternion(Quaternion && q) noexcept;
Quaternion(const Quaternion & q);
Quaternion(Quaternion && q);
// --------------------------------------------------------------------------------------------
~Quaternion();
// --------------------------------------------------------------------------------------------
Quaternion & operator = (const Quaternion & q) noexcept;
Quaternion & operator = (Quaternion && q) noexcept;
Quaternion & operator = (const Quaternion & q);
Quaternion & operator = (Quaternion && q);
// --------------------------------------------------------------------------------------------
Quaternion & operator = (Value s) noexcept;
Quaternion & operator = (const Vector3 & q) noexcept;
Quaternion & operator = (const Vector4 & q) noexcept;
Quaternion & operator = (Value s);
Quaternion & operator = (const Vector3 & q);
Quaternion & operator = (const Vector4 & q);
// --------------------------------------------------------------------------------------------
Quaternion & operator += (const Quaternion & q) noexcept;
Quaternion & operator -= (const Quaternion & q) noexcept;
Quaternion & operator *= (const Quaternion & q) noexcept;
Quaternion & operator /= (const Quaternion & q) noexcept;
Quaternion & operator %= (const Quaternion & q) noexcept;
Quaternion & operator += (const Quaternion & q);
Quaternion & operator -= (const Quaternion & q);
Quaternion & operator *= (const Quaternion & q);
Quaternion & operator /= (const Quaternion & q);
Quaternion & operator %= (const Quaternion & q);
// --------------------------------------------------------------------------------------------
Quaternion & operator += (Value s) noexcept;
Quaternion & operator -= (Value s) noexcept;
Quaternion & operator *= (Value s) noexcept;
Quaternion & operator /= (Value s) noexcept;
Quaternion & operator %= (Value s) noexcept;
Quaternion & operator += (Value s);
Quaternion & operator -= (Value s);
Quaternion & operator *= (Value s);
Quaternion & operator /= (Value s);
Quaternion & operator %= (Value s);
// --------------------------------------------------------------------------------------------
Quaternion & operator ++ () noexcept;
Quaternion & operator -- () noexcept;
Quaternion & operator ++ ();
Quaternion & operator -- ();
// --------------------------------------------------------------------------------------------
Quaternion operator ++ (int) noexcept;
Quaternion operator -- (int) noexcept;
Quaternion operator ++ (int);
Quaternion operator -- (int);
// --------------------------------------------------------------------------------------------
Quaternion operator + (const Quaternion & q) const noexcept;
Quaternion operator - (const Quaternion & q) const noexcept;
Quaternion operator * (const Quaternion & q) const noexcept;
Quaternion operator / (const Quaternion & q) const noexcept;
Quaternion operator % (const Quaternion & q) const noexcept;
Quaternion operator + (const Quaternion & q) const;
Quaternion operator - (const Quaternion & q) const;
Quaternion operator * (const Quaternion & q) const;
Quaternion operator / (const Quaternion & q) const;
Quaternion operator % (const Quaternion & q) const;
// --------------------------------------------------------------------------------------------
Quaternion operator + (Value s) const noexcept;
Quaternion operator - (Value s) const noexcept;
Quaternion operator * (Value s) const noexcept;
Quaternion operator / (Value s) const noexcept;
Quaternion operator % (Value s) const noexcept;
Quaternion operator + (Value s) const;
Quaternion operator - (Value s) const;
Quaternion operator * (Value s) const;
Quaternion operator / (Value s) const;
Quaternion operator % (Value s) const;
// --------------------------------------------------------------------------------------------
Quaternion operator + () const noexcept;
Quaternion operator - () const noexcept;
Quaternion operator + () const;
Quaternion operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Quaternion & q) const noexcept;
bool operator != (const Quaternion & q) const noexcept;
bool operator < (const Quaternion & q) const noexcept;
bool operator > (const Quaternion & q) const noexcept;
bool operator <= (const Quaternion & q) const noexcept;
bool operator >= (const Quaternion & q) const noexcept;
bool operator == (const Quaternion & q) const;
bool operator != (const Quaternion & q) const;
bool operator < (const Quaternion & q) const;
bool operator > (const Quaternion & q) const;
bool operator <= (const Quaternion & q) const;
bool operator >= (const Quaternion & q) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Quaternion & q) const noexcept;
SQInteger Cmp(const Quaternion & q) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny, Value nz) noexcept;
void Set(Value nx, Value ny, Value nz, Value nw) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny, Value nz);
void Set(Value nx, Value ny, Value nz, Value nw);
// --------------------------------------------------------------------------------------------
void Set(const Quaternion & q) noexcept;
void Set(const Vector3 & v) noexcept;
void Set(const Vector4 & v) noexcept;
void Set(const Quaternion & q);
void Set(const Vector3 & v);
void Set(const Vector4 & v);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { x = 0.0, y = 0.0, z = 0.0, w = 0.0; }
void Clear() { x = 0.0, y = 0.0, z = 0.0, w = 0.0; }
// --------------------------------------------------------------------------------------------
Quaternion Abs() const noexcept;
Quaternion Abs() const;
};
} // Namespace:: SqMod

View File

@ -198,7 +198,7 @@ static const std::vector<Color3> SQ_Color_List
};
// ------------------------------------------------------------------------------------------------
void LogDbg(const char * fmt, ...) noexcept
void LogDbg(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -206,7 +206,7 @@ void LogDbg(const char * fmt, ...) noexcept
va_end(args);
}
void LogMsg(const char * fmt, ...) noexcept
void LogMsg(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -214,7 +214,7 @@ void LogMsg(const char * fmt, ...) noexcept
va_end(args);
}
void LogScs(const char * fmt, ...) noexcept
void LogScs(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -222,7 +222,7 @@ void LogScs(const char * fmt, ...) noexcept
va_end(args);
}
void LogInf(const char * fmt, ...) noexcept
void LogInf(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -230,7 +230,7 @@ void LogInf(const char * fmt, ...) noexcept
va_end(args);
}
void LogWrn(const char * fmt, ...) noexcept
void LogWrn(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -238,7 +238,7 @@ void LogWrn(const char * fmt, ...) noexcept
va_end(args);
}
void LogErr(const char * fmt, ...) noexcept
void LogErr(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -246,7 +246,7 @@ void LogErr(const char * fmt, ...) noexcept
va_end(args);
}
void LogFtl(const char * fmt, ...) noexcept
void LogFtl(const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
@ -255,7 +255,7 @@ void LogFtl(const char * fmt, ...) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * ToStringF(const char * fmt, ...) noexcept
const SQChar * ToStringF(const char * fmt, ...)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -290,7 +290,7 @@ const SQChar * ToStringF(const char * fmt, ...) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * InsertStr(const SQChar * f, const std::vector< const SQChar * > & a) noexcept
const SQChar * InsertStr(const SQChar * f, const std::vector< const SQChar * > & a)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -366,13 +366,13 @@ const SQChar * InsertStr(const SQChar * f, const std::vector< const SQChar * > &
}
// Utility for the <InsertStr> function
const SQChar * InsStr(const SQChar * f) noexcept
const SQChar * InsStr(const SQChar * f)
{
return InsertStr(f, std::vector< const SQChar * >());
}
// ------------------------------------------------------------------------------------------------
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w) noexcept
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -412,7 +412,7 @@ const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w) noexcept
return buf;
}
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w, SQUint32 o) noexcept
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w, SQUint32 o)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -453,7 +453,7 @@ const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w, SQUint32 o) noexc
}
// ------------------------------------------------------------------------------------------------
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w) noexcept
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -493,7 +493,7 @@ const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w) noexcept
return buf;
}
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w, SQUint32 o) noexcept
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w, SQUint32 o)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -534,7 +534,7 @@ const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w, SQUint32 o) noex
}
// ------------------------------------------------------------------------------------------------
const SQChar * CenterStr(const SQChar * t, SQChar f, SQUint32 w) noexcept
const SQChar * CenterStr(const SQChar * t, SQChar f, SQUint32 w)
{
// Acquire a buffer from the buffer pool
Core::Buffer vbuf = _Core->PullBuffer();
@ -575,146 +575,146 @@ const SQChar * CenterStr(const SQChar * t, SQChar f, SQUint32 w) noexcept
}
// ------------------------------------------------------------------------------------------------
void InitMTRG32() noexcept
void InitMTRG32()
{
RG32_MT19937.reset(new std::mt19937(static_cast<unsigned>(std::time(0))));
}
// ------------------------------------------------------------------------------------------------
void InitMTRG64() noexcept
void InitMTRG64()
{
RG64_MT19937.reset(new std::mt19937_64(static_cast<unsigned>(std::time(0))));
}
// ------------------------------------------------------------------------------------------------
Int8 GetRandomInt8() noexcept
Int8 GetRandomInt8()
{
return Int8_Dist(*RG32_MT19937);
}
Int8 GetRandomInt8(Int8 min, Int8 max) noexcept
Int8 GetRandomInt8(Int8 min, Int8 max)
{
std::uniform_int_distribution<Int8> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Uint8 GetRandomUint8() noexcept
Uint8 GetRandomUint8()
{
return UInt8_Dist(*RG32_MT19937);
}
Uint8 GetRandomUint8(Uint8 min, Uint8 max) noexcept
Uint8 GetRandomUint8(Uint8 min, Uint8 max)
{
std::uniform_int_distribution<Uint8> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Int16 GetRandomInt16() noexcept
Int16 GetRandomInt16()
{
return Int16_Dist(*RG32_MT19937);
}
Int16 GetRandomInt16(Int16 min, Int16 max) noexcept
Int16 GetRandomInt16(Int16 min, Int16 max)
{
std::uniform_int_distribution<Int16> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Uint16 GetRandomUint16() noexcept
Uint16 GetRandomUint16()
{
return UInt16_Dist(*RG32_MT19937);
}
Uint16 GetRandomUint16(Uint16 min, Uint16 max) noexcept
Uint16 GetRandomUint16(Uint16 min, Uint16 max)
{
std::uniform_int_distribution<Uint16> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Int32 GetRandomInt32() noexcept
Int32 GetRandomInt32()
{
return Int32_Dist(*RG32_MT19937);
}
Int32 GetRandomInt32(Int32 min, Int32 max) noexcept
Int32 GetRandomInt32(Int32 min, Int32 max)
{
std::uniform_int_distribution<Int32> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Uint32 GetRandomUint32() noexcept
Uint32 GetRandomUint32()
{
return UInt32_Dist(*RG32_MT19937);
}
Uint32 GetRandomUint32(Uint32 min, Uint32 max) noexcept
Uint32 GetRandomUint32(Uint32 min, Uint32 max)
{
std::uniform_int_distribution<Uint32> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Int64 GetRandomInt64() noexcept
Int64 GetRandomInt64()
{
return Int64_Dist(*RG64_MT19937);
}
Int64 GetRandomInt64(Int64 min, Int64 max) noexcept
Int64 GetRandomInt64(Int64 min, Int64 max)
{
std::uniform_int_distribution<Int64> dist(min, max);
return dist(*RG64_MT19937);
}
// ------------------------------------------------------------------------------------------------
Uint64 GetRandomUint64() noexcept
Uint64 GetRandomUint64()
{
return UInt64_Dist(*RG64_MT19937);
}
Uint64 GetRandomUint64(Uint64 min, Uint64 max) noexcept
Uint64 GetRandomUint64(Uint64 min, Uint64 max)
{
std::uniform_int_distribution<Uint64> dist(min, max);
return dist(*RG64_MT19937);
}
// ------------------------------------------------------------------------------------------------
Float32 GetRandomFloat32() noexcept
Float32 GetRandomFloat32()
{
return Float32_Dist(*RG32_MT19937);
}
Float32 GetRandomFloat32(Float32 min, Float32 max) noexcept
Float32 GetRandomFloat32(Float32 min, Float32 max)
{
std::uniform_real_distribution<Float32> dist(min, max);
return dist(*RG32_MT19937);
}
// ------------------------------------------------------------------------------------------------
Float64 GetRandomFloat64() noexcept
Float64 GetRandomFloat64()
{
return Float64_Dist(*RG64_MT19937);
}
Float64 GetRandomFloat64(Float64 min, Float64 max) noexcept
Float64 GetRandomFloat64(Float64 min, Float64 max)
{
std::uniform_real_distribution<Float64> dist(min, max);
return dist(*RG64_MT19937);
}
// ------------------------------------------------------------------------------------------------
String GetRandomString(String::size_type len) noexcept
String GetRandomString(String::size_type len)
{
String str(len, 0);
std::generate(str.begin(), str.end(), [&] () -> String::value_type { return String_Dist(*RG32_MT19937); });
return std::move(str);
}
String GetRandomString(String::size_type len, String::value_type min, String::value_type max) noexcept
String GetRandomString(String::size_type len, String::value_type min, String::value_type max)
{
String str(len, 0);
std::uniform_int_distribution<String::value_type> dist(min, max);
@ -723,19 +723,19 @@ String GetRandomString(String::size_type len, String::value_type min, String::va
}
// ------------------------------------------------------------------------------------------------
bool GetRandomBool() noexcept
bool GetRandomBool()
{
return Int8_Dist(*RG32_MT19937) > 0 ? true : false;
}
// ------------------------------------------------------------------------------------------------
const Color3 & GetRandomColor() noexcept
const Color3 & GetRandomColor()
{
return SQ_Color_List.at(GetRandomUint32(0, SQ_Color_List.size()-1));
}
// --------------------------------------------------------------------------------------------
bool SToB(const SQChar * str) noexcept
bool SToB(const SQChar * str)
{
return (strcmp(str, "true") == 0 || \
strcmp(str, "yes") == 0 || \
@ -744,7 +744,7 @@ bool SToB(const SQChar * str) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 GetColor(const SQChar * name) noexcept
Color3 GetColor(const SQChar * name)
{
// See if we actually have something to search for
if(std::strlen(name) <= 0)
@ -1355,7 +1355,7 @@ Color3 GetColor(const SQChar * name) noexcept
}
// ------------------------------------------------------------------------------------------------
AABB GetAABB(const SQChar * str, SQChar delim) noexcept
AABB GetAABB(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f , %f , %f , %f , %f ");
static AABB box;
@ -1390,7 +1390,7 @@ AABB GetAABB(const SQChar * str, SQChar delim) noexcept
}
// ------------------------------------------------------------------------------------------------
Circle GetCircle(const SQChar * str, SQChar delim) noexcept
Circle GetCircle(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f , %f ");
static Circle circle;
@ -1419,7 +1419,7 @@ Circle GetCircle(const SQChar * str, SQChar delim) noexcept
}
// ------------------------------------------------------------------------------------------------
Color3 GetColor3(const SQChar * str, SQChar delim) noexcept
Color3 GetColor3(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %u , %u , %u ");
SQUint32 r = 0, g = 0, b = 0;
@ -1445,7 +1445,7 @@ Color3 GetColor3(const SQChar * str, SQChar delim) noexcept
return Color3(static_cast<Color3::Value>(r), static_cast<Color3::Value>(g), static_cast<Color3::Value>(b));
}
Color4 GetColor4(const SQChar * str, SQChar delim) noexcept
Color4 GetColor4(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %u , %u , %u , %u ");
SQUint32 r = 0, g = 0, b = 0, a = 0;
@ -1474,7 +1474,7 @@ Color4 GetColor4(const SQChar * str, SQChar delim) noexcept
}
// ------------------------------------------------------------------------------------------------
Quaternion GetQuaternion(const SQChar * str, SQChar delim) noexcept
Quaternion GetQuaternion(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f , %f , %f ");
static Quaternion quat;
@ -1504,7 +1504,7 @@ Quaternion GetQuaternion(const SQChar * str, SQChar delim) noexcept
return quat;
}
Sphere GetSphere(const SQChar * str, SQChar delim) noexcept
Sphere GetSphere(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f , %f , %f ");
static Sphere sphere;
@ -1535,7 +1535,7 @@ Sphere GetSphere(const SQChar * str, SQChar delim) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f GetVector2f(const SQChar * str, SQChar delim) noexcept
Vector2f GetVector2f(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f ");
static Vector2f vec;
@ -1561,7 +1561,7 @@ Vector2f GetVector2f(const SQChar * str, SQChar delim) noexcept
return vec;
}
Vector2i GetVector2i(const SQChar * str, SQChar delim) noexcept
Vector2i GetVector2i(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %d , %d ");
static Vector2i vec;
@ -1587,7 +1587,7 @@ Vector2i GetVector2i(const SQChar * str, SQChar delim) noexcept
return vec;
}
Vector2u GetVector2u(const SQChar * str, SQChar delim) noexcept
Vector2u GetVector2u(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %u , %u ");
static Vector2u vec;
@ -1614,7 +1614,7 @@ Vector2u GetVector2u(const SQChar * str, SQChar delim) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 GetVector3(const SQChar * str, SQChar delim) noexcept
Vector3 GetVector3(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f , %f ");
static Vector3 vec;
@ -1642,7 +1642,7 @@ Vector3 GetVector3(const SQChar * str, SQChar delim) noexcept
return vec;
}
Vector4 GetVector4(const SQChar * str, SQChar delim) noexcept
Vector4 GetVector4(const SQChar * str, SQChar delim)
{
static SQChar fs[] = _SC(" %f , %f , %f , %f ");
static Vector4 vec;
@ -1673,7 +1673,7 @@ Vector4 GetVector4(const SQChar * str, SQChar delim) noexcept
}
// ------------------------------------------------------------------------------------------------
template < typename T > T StrToInt(const SQChar * str) noexcept
template < typename T > T StrToInt(const SQChar * str)
{
try
{
@ -1691,7 +1691,7 @@ template < typename T > T StrToInt(const SQChar * str) noexcept
}
// ------------------------------------------------------------------------------------------------
template < typename T > T StrToInt(const SQChar * str, SQInt32 base) noexcept
template < typename T > T StrToInt(const SQChar * str, SQInt32 base)
{
try
{
@ -1709,7 +1709,7 @@ template < typename T > T StrToInt(const SQChar * str, SQInt32 base) noexcept
}
// ------------------------------------------------------------------------------------------------
template < typename T > T StrToReal(const SQChar * str) noexcept
template < typename T > T StrToReal(const SQChar * str)
{
try
{
@ -1727,12 +1727,12 @@ template < typename T > T StrToReal(const SQChar * str) noexcept
}
// ------------------------------------------------------------------------------------------------
template < typename T > T RandomValue() noexcept
template < typename T > T RandomValue()
{
return RandomVal< T >::Get();
}
template < typename T > T RandomValue(T min, T max) noexcept
template < typename T > T RandomValue(T min, T max)
{
return RandomVal< T >::Get(min, max);
}

View File

@ -44,17 +44,17 @@ const Float64 RADTODEG64 = 180.0 / PI64;
/* ------------------------------------------------------------------------------------------------
* ...
*/
template< typename T > inline bool EpsEq(const T a, const T b) noexcept
template< typename T > inline bool EpsEq(const T a, const T b)
{
return abs(a - b) <= std::numeric_limits<T>::epsilon();
}
template <> inline bool EpsEq(const Float32 a, const Float32 b) noexcept
template <> inline bool EpsEq(const Float32 a, const Float32 b)
{
return fabs(a - b) <= 0.000001f;
}
template <> inline bool EpsEq(const Float64 a, const Float64 b) noexcept
template <> inline bool EpsEq(const Float64 a, const Float64 b)
{
return fabs(a - b) <= 0.000000001d;
}
@ -62,17 +62,17 @@ template <> inline bool EpsEq(const Float64 a, const Float64 b) noexcept
/* ------------------------------------------------------------------------------------------------
* ...
*/
template< typename T > inline T Clamp(T val, T min, T max) noexcept
template< typename T > inline T Clamp(T val, T min, T max)
{
return val < min ? min : (val > max ? max : val);
}
template<> inline Float32 Clamp(const Float32 val, const Float32 min, const Float32 max) noexcept
template<> inline Float32 Clamp(const Float32 val, const Float32 min, const Float32 max)
{
return std::isless(val, min) ? min : (std::isgreater(val, max) ? max : val);
}
template<> inline Float64 Clamp(const Float64 val, const Float64 min, const Float64 max) noexcept
template<> inline Float64 Clamp(const Float64 val, const Float64 min, const Float64 max)
{
return std::isless(val, min) ? min : (std::isgreater(val, max) ? max : val);
}
@ -80,95 +80,95 @@ template<> inline Float64 Clamp(const Float64 val, const Float64 min, const Floa
/* ------------------------------------------------------------------------------------------------
* Simple functions to quickly forward logging messages without including the logging system
*/
void LogDbg(const char * fmt, ...) noexcept;
void LogMsg(const char * fmt, ...) noexcept;
void LogScs(const char * fmt, ...) noexcept;
void LogInf(const char * fmt, ...) noexcept;
void LogWrn(const char * fmt, ...) noexcept;
void LogErr(const char * fmt, ...) noexcept;
void LogFtl(const char * fmt, ...) noexcept;
void LogDbg(const char * fmt, ...);
void LogMsg(const char * fmt, ...);
void LogScs(const char * fmt, ...);
void LogInf(const char * fmt, ...);
void LogWrn(const char * fmt, ...);
void LogErr(const char * fmt, ...);
void LogFtl(const char * fmt, ...);
/* ------------------------------------------------------------------------------------------------
* ...
*/
const SQChar * ToStringF(const char * fmt, ...) noexcept;
const SQChar * ToStringF(const char * fmt, ...);
/* ------------------------------------------------------------------------------------------------
* ...
*/
void InitMTRG64() noexcept;
void InitMTRG64() noexcept;
void InitMTRG64();
void InitMTRG64();
/* ------------------------------------------------------------------------------------------------
* ...
*/
Int8 GetRandomInt8() noexcept;
Int8 GetRandomInt8(Int8 min, Int8 max) noexcept;
Int8 GetRandomInt8();
Int8 GetRandomInt8(Int8 min, Int8 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Uint8 GetRandomUint8() noexcept;
Uint8 GetRandomUint8(Uint8 min, Uint8 max) noexcept;
Uint8 GetRandomUint8();
Uint8 GetRandomUint8(Uint8 min, Uint8 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Int16 GetRandomInt16() noexcept;
Int16 GetRandomInt16(Int16 min, Int16 max) noexcept;
Int16 GetRandomInt16();
Int16 GetRandomInt16(Int16 min, Int16 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Uint16 GetRandomUint16() noexcept;
Uint16 GetRandomUint16(Uint16 min, Uint16 max) noexcept;
Uint16 GetRandomUint16();
Uint16 GetRandomUint16(Uint16 min, Uint16 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Int32 GetRandomInt32() noexcept;
Int32 GetRandomInt32(Int32 min, Int32 max) noexcept;
Int32 GetRandomInt32();
Int32 GetRandomInt32(Int32 min, Int32 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Uint32 GetRandomUint32() noexcept;
Uint32 GetRandomUint32(Uint32 min, Uint32 max) noexcept;
Uint32 GetRandomUint32();
Uint32 GetRandomUint32(Uint32 min, Uint32 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Int64 GetRandomInt64() noexcept;
Int64 GetRandomInt64(Int64 min, Int64 max) noexcept;
Int64 GetRandomInt64();
Int64 GetRandomInt64(Int64 min, Int64 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Uint64 GetRandomUint64() noexcept;
Uint64 GetRandomUint64(Uint64 min, Uint64 max) noexcept;
Uint64 GetRandomUint64();
Uint64 GetRandomUint64(Uint64 min, Uint64 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Float32 GetRandomFloat32() noexcept;
Float32 GetRandomFloat32(Float32 min, Float32 max) noexcept;
Float32 GetRandomFloat32();
Float32 GetRandomFloat32(Float32 min, Float32 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Float64 GetRandomFloat64() noexcept;
Float64 GetRandomFloat64(Float64 min, Float64 max) noexcept;
Float64 GetRandomFloat64();
Float64 GetRandomFloat64(Float64 min, Float64 max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
String GetRandomString(String::size_type len) noexcept;
String GetRandomString(String::size_type len, String::value_type min, String::value_type max) noexcept;
String GetRandomString(String::size_type len);
String GetRandomString(String::size_type len, String::value_type min, String::value_type max);
/* ------------------------------------------------------------------------------------------------
* ...
*/
bool GetRandomBool() noexcept;
bool GetRandomBool();
/* ------------------------------------------------------------------------------------------------
* ...
@ -181,14 +181,14 @@ template <typename T> struct RandomVal
*/
template <> struct RandomVal<Int8>
{
static inline Int8 Get() noexcept { return GetRandomInt8(); }
static inline Int8 Get(Int8 min, Int8 max) noexcept { return GetRandomInt8(min, max); }
static inline Int8 Get() { return GetRandomInt8(); }
static inline Int8 Get(Int8 min, Int8 max) { return GetRandomInt8(min, max); }
};
template <> struct RandomVal<Uint8>
{
static inline Uint8 Get() noexcept { return GetRandomUint8(); }
static inline Uint8 Get(Uint8 min, Uint8 max) noexcept { return GetRandomUint8(min, max); }
static inline Uint8 Get() { return GetRandomUint8(); }
static inline Uint8 Get(Uint8 min, Uint8 max) { return GetRandomUint8(min, max); }
};
/* ------------------------------------------------------------------------------------------------
@ -196,14 +196,14 @@ template <> struct RandomVal<Uint8>
*/
template <> struct RandomVal<Int16>
{
static inline Int16 Get() noexcept { return GetRandomInt16(); }
static inline Int16 Get(Int16 min, Int16 max) noexcept { return GetRandomInt16(min, max); }
static inline Int16 Get() { return GetRandomInt16(); }
static inline Int16 Get(Int16 min, Int16 max) { return GetRandomInt16(min, max); }
};
template <> struct RandomVal<Uint16>
{
static inline Uint16 Get() noexcept { return GetRandomUint16(); }
static inline Uint16 Get(Uint16 min, Uint16 max) noexcept { return GetRandomUint16(min, max); }
static inline Uint16 Get() { return GetRandomUint16(); }
static inline Uint16 Get(Uint16 min, Uint16 max) { return GetRandomUint16(min, max); }
};
/* ------------------------------------------------------------------------------------------------
@ -211,14 +211,14 @@ template <> struct RandomVal<Uint16>
*/
template <> struct RandomVal<Int32>
{
static inline Int32 Get() noexcept { return GetRandomInt32(); }
static inline Int32 Get(Int32 min, Int32 max) noexcept { return GetRandomInt32(min, max); }
static inline Int32 Get() { return GetRandomInt32(); }
static inline Int32 Get(Int32 min, Int32 max) { return GetRandomInt32(min, max); }
};
template <> struct RandomVal<Uint32>
{
static inline Uint32 Get() noexcept { return GetRandomUint32(); }
static inline Uint32 Get(Uint32 min, Uint32 max) noexcept { return GetRandomUint32(min, max); }
static inline Uint32 Get() { return GetRandomUint32(); }
static inline Uint32 Get(Uint32 min, Uint32 max) { return GetRandomUint32(min, max); }
};
/* ------------------------------------------------------------------------------------------------
@ -226,14 +226,14 @@ template <> struct RandomVal<Uint32>
*/
template <> struct RandomVal<Int64>
{
static inline Int64 Get() noexcept { return GetRandomInt64(); }
static inline Int64 Get(Int64 min, Int64 max) noexcept { return GetRandomInt64(min, max); }
static inline Int64 Get() { return GetRandomInt64(); }
static inline Int64 Get(Int64 min, Int64 max) { return GetRandomInt64(min, max); }
};
template <> struct RandomVal<Uint64>
{
static inline Uint64 Get() noexcept { return GetRandomUint64(); }
static inline Uint64 Get(Uint64 min, Uint64 max) noexcept { return GetRandomUint64(min, max); }
static inline Uint64 Get() { return GetRandomUint64(); }
static inline Uint64 Get(Uint64 min, Uint64 max) { return GetRandomUint64(min, max); }
};
/* ------------------------------------------------------------------------------------------------
@ -241,14 +241,14 @@ template <> struct RandomVal<Uint64>
*/
template <> struct RandomVal<Float32>
{
static inline Float32 Get() noexcept { return GetRandomFloat32(); }
static inline Float32 Get(Float32 min, Float32 max) noexcept { return GetRandomFloat32(min, max); }
static inline Float32 Get() { return GetRandomFloat32(); }
static inline Float32 Get(Float32 min, Float32 max) { return GetRandomFloat32(min, max); }
};
template <> struct RandomVal<Float64>
{
static inline Float64 Get() noexcept { return GetRandomFloat64(); }
static inline Float64 Get(Float64 min, Float64 max) noexcept { return GetRandomFloat64(min, max); }
static inline Float64 Get() { return GetRandomFloat64(); }
static inline Float64 Get(Float64 min, Float64 max) { return GetRandomFloat64(min, max); }
};
/* ------------------------------------------------------------------------------------------------
@ -256,8 +256,8 @@ template <> struct RandomVal<Float64>
*/
template <> struct RandomVal<String>
{
static inline String Get(String::size_type len) noexcept { return GetRandomString(len); }
static inline String Get(String::size_type len, String::value_type min, String::value_type max) noexcept
static inline String Get(String::size_type len) { return GetRandomString(len); }
static inline String Get(String::size_type len, String::value_type min, String::value_type max)
{ return GetRandomString(len, min, max); }
};
@ -266,18 +266,18 @@ template <> struct RandomVal<String>
*/
template <> struct RandomVal<bool>
{
static inline bool Get() noexcept { return GetRandomBool(); }
static inline bool Get() { return GetRandomBool(); }
};
/* ------------------------------------------------------------------------------------------------
* ...
*/
const Color3 & GetRandomColor() noexcept;
const Color3 & GetRandomColor();
/* ------------------------------------------------------------------------------------------------
* Simple function to check whether the specified string can be considered as a boolean value
*/
bool SToB(const SQChar * str) noexcept;
bool SToB(const SQChar * str);
/* ------------------------------------------------------------------------------------------------
* Utility used to unify the string converstion functions under one name.
@ -302,95 +302,95 @@ template <> struct SToF < double > { static constexpr auto Fn = static_cast< dou
template <> struct SToF < long double > { static constexpr auto Fn = static_cast< long double(*)(const String &, std::size_t*) >(std::stold); };
// ------------------------------------------------------------------------------------------------
template < typename T > inline String NToS(T n) noexcept { return std::to_string(n); }
template < typename T > inline const SQChar * NToCS(T n) noexcept { return std::to_string(n).c_str(); }
template < typename T > inline String NToS(T n) { return std::to_string(n); }
template < typename T > inline const SQChar * NToCS(T n) { return std::to_string(n).c_str(); }
/* ------------------------------------------------------------------------------------------------
* ...
*/
Color3 GetColor(const SQChar * name) noexcept;
Color3 GetColor(const SQChar * name);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Circle GetCircle(const SQChar * str, SQChar delim) noexcept;
Circle GetCircle(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
AABB GetAABB(const SQChar * str, SQChar delim) noexcept;
AABB GetAABB(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Color3 GetColor3(const SQChar * str, SQChar delim) noexcept;
Color3 GetColor3(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Color4 GetColor4(const SQChar * str, SQChar delim) noexcept;
Color4 GetColor4(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Quaternion GetQuaternion(const SQChar * str, SQChar delim) noexcept;
Quaternion GetQuaternion(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Sphere GetSphere(const SQChar * str, SQChar delim) noexcept;
Sphere GetSphere(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Vector2f GetVector2f(const SQChar * str, SQChar delim) noexcept;
Vector2f GetVector2f(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Vector2i GetVector2i(const SQChar * str, SQChar delim) noexcept;
Vector2i GetVector2i(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Vector2u GetVector2u(const SQChar * str, SQChar delim) noexcept;
Vector2u GetVector2u(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Vector3 GetVector3(const SQChar * str, SQChar delim) noexcept;
Vector3 GetVector3(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* ...
*/
Vector4 GetVector4(const SQChar * str, SQChar delim) noexcept;
Vector4 GetVector4(const SQChar * str, SQChar delim);
/* ------------------------------------------------------------------------------------------------
* Fake deleter meant for classes that should not be deleted by smart pointers
*/
template <typename T> struct FakeDeleter
{
void operator () (T * /* ptr */) const noexcept { /* Ignored... */ }
void operator () (T * /* ptr */) const { /* Ignored... */ }
};
/* ------------------------------------------------------------------------------------------------
* Utility used to generate a string with an arbitrary text surrounded by a specific character
*/
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w = 72) noexcept;
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w = 72, SQUint32 o = 0) noexcept;
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w = 72) noexcept;
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w = 72, SQUint32 o = 0) noexcept;
const SQChar * CenterStr(const SQChar * t, SQChar f, SQUint32 w = 72) noexcept;
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w = 72);
const SQChar * LeftStr(const SQChar * t, SQChar f, SQUint32 w = 72, SQUint32 o = 0);
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w = 72);
const SQChar * RightStr(const SQChar * t, SQChar f, SQUint32 w = 72, SQUint32 o = 0);
const SQChar * CenterStr(const SQChar * t, SQChar f, SQUint32 w = 72);
/* ------------------------------------------------------------------------------------------------
* Function used insert arbitrary text at certain positions within a string
*/
const SQChar * InsertStr(const SQChar * f, const std::vector< const SQChar * > & a) noexcept;
const SQChar * InsertStr(const SQChar * f, const std::vector< const SQChar * > & a);
// Utility for the <InsertStr> function
const SQChar * InsStr(const SQChar * f) noexcept;
const SQChar * InsStr(const SQChar * f);
template < typename... Args > const SQChar * InsStr(const SQChar * f, Args... args) noexcept
template < typename... Args > const SQChar * InsStr(const SQChar * f, Args... args)
{
return InsertStr(f, {{args...}});
}

View File

@ -14,44 +14,44 @@ const Sphere Sphere::MAX = Sphere(std::numeric_limits<Sphere::Value>::max());
SQChar Sphere::Delim = ',';
// ------------------------------------------------------------------------------------------------
Sphere::Sphere() noexcept
Sphere::Sphere()
: pos(0.0, 0.0, 0.0), rad(0.0)
{
}
Sphere::Sphere(Value r) noexcept
Sphere::Sphere(Value r)
: pos(0.0, 0.0, 0.0), rad(r)
{
}
Sphere::Sphere(const Vector3 & p) noexcept
Sphere::Sphere(const Vector3 & p)
: pos(p), rad(0.0)
{
}
Sphere::Sphere(const Vector3 & p, Value r) noexcept
Sphere::Sphere(const Vector3 & p, Value r)
: pos(p), rad(r)
{
}
Sphere::Sphere(Value x, Value y, Value z, Value r) noexcept
Sphere::Sphere(Value x, Value y, Value z, Value r)
: pos(x, y, z), rad(r)
{
}
// ------------------------------------------------------------------------------------------------
Sphere::Sphere(const Sphere & s) noexcept
Sphere::Sphere(const Sphere & s)
: pos(s.pos), rad(s.rad)
{
}
Sphere::Sphere(Sphere && s) noexcept
Sphere::Sphere(Sphere && s)
: pos(s.pos), rad(s.rad)
{
@ -64,14 +64,14 @@ Sphere::~Sphere()
}
// ------------------------------------------------------------------------------------------------
Sphere & Sphere::operator = (const Sphere & s) noexcept
Sphere & Sphere::operator = (const Sphere & s)
{
pos = s.pos;
rad = s.rad;
return *this;
}
Sphere & Sphere::operator = (Sphere && s) noexcept
Sphere & Sphere::operator = (Sphere && s)
{
pos = s.pos;
rad = s.rad;
@ -79,48 +79,48 @@ Sphere & Sphere::operator = (Sphere && s) noexcept
}
// ------------------------------------------------------------------------------------------------
Sphere & Sphere::operator = (Value r) noexcept
Sphere & Sphere::operator = (Value r)
{
rad = r;
return *this;
}
Sphere & Sphere::operator = (const Vector3 & p) noexcept
Sphere & Sphere::operator = (const Vector3 & p)
{
pos = p;
return *this;
}
// ------------------------------------------------------------------------------------------------
Sphere & Sphere::operator += (const Sphere & s) noexcept
Sphere & Sphere::operator += (const Sphere & s)
{
pos += s.pos;
rad += s.rad;
return *this;
}
Sphere & Sphere::operator -= (const Sphere & s) noexcept
Sphere & Sphere::operator -= (const Sphere & s)
{
pos -= s.pos;
rad -= s.rad;
return *this;
}
Sphere & Sphere::operator *= (const Sphere & s) noexcept
Sphere & Sphere::operator *= (const Sphere & s)
{
pos *= s.pos;
rad *= s.rad;
return *this;
}
Sphere & Sphere::operator /= (const Sphere & s) noexcept
Sphere & Sphere::operator /= (const Sphere & s)
{
pos /= s.pos;
rad /= s.rad;
return *this;
}
Sphere & Sphere::operator %= (const Sphere & s) noexcept
Sphere & Sphere::operator %= (const Sphere & s)
{
pos %= s.pos;
rad = std::fmod(rad, s.rad);
@ -129,76 +129,76 @@ Sphere & Sphere::operator %= (const Sphere & s) noexcept
}
// ------------------------------------------------------------------------------------------------
Sphere & Sphere::operator += (Value r) noexcept
Sphere & Sphere::operator += (Value r)
{
rad += r;
return *this;
}
Sphere & Sphere::operator -= (Value r) noexcept
Sphere & Sphere::operator -= (Value r)
{
rad -= r;
return *this;
}
Sphere & Sphere::operator *= (Value r) noexcept
Sphere & Sphere::operator *= (Value r)
{
rad *= r;
return *this;
}
Sphere & Sphere::operator /= (Value r) noexcept
Sphere & Sphere::operator /= (Value r)
{
rad /= r;
return *this;
}
Sphere & Sphere::operator %= (Value r) noexcept
Sphere & Sphere::operator %= (Value r)
{
rad = std::fmod(rad, r);
return *this;
}
// ------------------------------------------------------------------------------------------------
Sphere & Sphere::operator += (const Vector3 & p) noexcept
Sphere & Sphere::operator += (const Vector3 & p)
{
pos += p;
return *this;
}
Sphere & Sphere::operator -= (const Vector3 & p) noexcept
Sphere & Sphere::operator -= (const Vector3 & p)
{
pos -= p;
return *this;
}
Sphere & Sphere::operator *= (const Vector3 & p) noexcept
Sphere & Sphere::operator *= (const Vector3 & p)
{
pos *= p;
return *this;
}
Sphere & Sphere::operator /= (const Vector3 & p) noexcept
Sphere & Sphere::operator /= (const Vector3 & p)
{
pos /= p;
return *this;
}
Sphere & Sphere::operator %= (const Vector3 & p) noexcept
Sphere & Sphere::operator %= (const Vector3 & p)
{
pos %= p;
return *this;
}
// ------------------------------------------------------------------------------------------------
Sphere & Sphere::operator ++ () noexcept
Sphere & Sphere::operator ++ ()
{
++pos;
++rad;
return *this;
}
Sphere & Sphere::operator -- () noexcept
Sphere & Sphere::operator -- ()
{
--pos;
--rad;
@ -206,7 +206,7 @@ Sphere & Sphere::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Sphere Sphere::operator ++ (int) noexcept
Sphere Sphere::operator ++ (int)
{
Sphere state(*this);
++pos;
@ -214,7 +214,7 @@ Sphere Sphere::operator ++ (int) noexcept
return state;
}
Sphere Sphere::operator -- (int) noexcept
Sphere Sphere::operator -- (int)
{
Sphere state(*this);
--pos;
@ -223,186 +223,186 @@ Sphere Sphere::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Sphere Sphere::operator + (const Sphere & s) const noexcept
Sphere Sphere::operator + (const Sphere & s) const
{
return Sphere(pos + s.pos, rad + s.rad);
}
Sphere Sphere::operator - (const Sphere & s) const noexcept
Sphere Sphere::operator - (const Sphere & s) const
{
return Sphere(pos - s.pos, rad - s.rad);
}
Sphere Sphere::operator * (const Sphere & s) const noexcept
Sphere Sphere::operator * (const Sphere & s) const
{
return Sphere(pos * s.pos, rad * s.rad);
}
Sphere Sphere::operator / (const Sphere & s) const noexcept
Sphere Sphere::operator / (const Sphere & s) const
{
return Sphere(pos / s.pos, rad / s.rad);
}
Sphere Sphere::operator % (const Sphere & s) const noexcept
Sphere Sphere::operator % (const Sphere & s) const
{
return Sphere(pos % s.pos, std::fmod(rad, s.rad));
}
// ------------------------------------------------------------------------------------------------
Sphere Sphere::operator + (Value r) const noexcept
Sphere Sphere::operator + (Value r) const
{
return Sphere(rad + r);
}
Sphere Sphere::operator - (Value r) const noexcept
Sphere Sphere::operator - (Value r) const
{
return Sphere(rad - r);
}
Sphere Sphere::operator * (Value r) const noexcept
Sphere Sphere::operator * (Value r) const
{
return Sphere(rad * r);
}
Sphere Sphere::operator / (Value r) const noexcept
Sphere Sphere::operator / (Value r) const
{
return Sphere(rad / r);
}
Sphere Sphere::operator % (Value r) const noexcept
Sphere Sphere::operator % (Value r) const
{
return Sphere(std::fmod(rad, r));
}
// ------------------------------------------------------------------------------------------------
Sphere Sphere::operator + (const Vector3 & p) const noexcept
Sphere Sphere::operator + (const Vector3 & p) const
{
return Sphere(pos + p);
}
Sphere Sphere::operator - (const Vector3 & p) const noexcept
Sphere Sphere::operator - (const Vector3 & p) const
{
return Sphere(pos - p);
}
Sphere Sphere::operator * (const Vector3 & p) const noexcept
Sphere Sphere::operator * (const Vector3 & p) const
{
return Sphere(pos * p);
}
Sphere Sphere::operator / (const Vector3 & p) const noexcept
Sphere Sphere::operator / (const Vector3 & p) const
{
return Sphere(pos / p);
}
Sphere Sphere::operator % (const Vector3 & p) const noexcept
Sphere Sphere::operator % (const Vector3 & p) const
{
return Sphere(pos % p);
}
// ------------------------------------------------------------------------------------------------
Sphere Sphere::operator + () const noexcept
Sphere Sphere::operator + () const
{
return Sphere(pos.Abs(), std::fabs(rad));
}
Sphere Sphere::operator - () const noexcept
Sphere Sphere::operator - () const
{
return Sphere(-pos, -rad);
}
// ------------------------------------------------------------------------------------------------
bool Sphere::operator == (const Sphere & s) const noexcept
bool Sphere::operator == (const Sphere & s) const
{
return (rad == s.rad) && (pos == s.pos);
}
bool Sphere::operator != (const Sphere & s) const noexcept
bool Sphere::operator != (const Sphere & s) const
{
return (rad != s.rad) && (pos != s.pos);
}
bool Sphere::operator < (const Sphere & s) const noexcept
bool Sphere::operator < (const Sphere & s) const
{
return (rad < s.rad) && (pos < s.pos);
}
bool Sphere::operator > (const Sphere & s) const noexcept
bool Sphere::operator > (const Sphere & s) const
{
return (rad > s.rad) && (pos > s.pos);
}
bool Sphere::operator <= (const Sphere & s) const noexcept
bool Sphere::operator <= (const Sphere & s) const
{
return (rad <= s.rad) && (pos <= s.pos);
}
bool Sphere::operator >= (const Sphere & s) const noexcept
bool Sphere::operator >= (const Sphere & s) const
{
return (rad >= s.rad) && (pos >= s.pos);
}
// ------------------------------------------------------------------------------------------------
SQInteger Sphere::Cmp(const Sphere & s) const noexcept
SQInteger Sphere::Cmp(const Sphere & s) const
{
return *this == s ? 0 : (*this > s ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Sphere::ToString() const noexcept
const SQChar * Sphere::ToString() const
{
return ToStringF("%f,%f,%f,%f", pos.x, pos.y, pos.z, rad);
}
// ------------------------------------------------------------------------------------------------
void Sphere::Set(Value nr) noexcept
void Sphere::Set(Value nr)
{
rad = nr;
}
void Sphere::Set(const Sphere & ns) noexcept
void Sphere::Set(const Sphere & ns)
{
pos = ns.pos;
rad = ns.rad;
}
void Sphere::Set(const Vector3 & np) noexcept
void Sphere::Set(const Vector3 & np)
{
pos = np;
}
void Sphere::Set(const Vector3 & np, Value nr) noexcept
void Sphere::Set(const Vector3 & np, Value nr)
{
pos = np;
rad = nr;
}
// ------------------------------------------------------------------------------------------------
void Sphere::Set(Value nx, Value ny, Value nz) noexcept
void Sphere::Set(Value nx, Value ny, Value nz)
{
pos.Set(nx, ny, nz);
}
void Sphere::Set(Value nx, Value ny, Value nz, Value nr) noexcept
void Sphere::Set(Value nx, Value ny, Value nz, Value nr)
{
pos.Set(nx, ny, nz);
rad = nr;
}
// ------------------------------------------------------------------------------------------------
void Sphere::Set(const SQChar * values, SQChar delim) noexcept
void Sphere::Set(const SQChar * values, SQChar delim)
{
Set(GetSphere(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Sphere::Generate() noexcept
void Sphere::Generate()
{
pos.Generate();
rad = RandomVal<Value>::Get();
}
void Sphere::Generate(Value min, Value max, bool r) noexcept
void Sphere::Generate(Value min, Value max, bool r)
{
if (max < min)
{
@ -418,12 +418,12 @@ void Sphere::Generate(Value min, Value max, bool r) noexcept
}
}
void Sphere::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax) noexcept
void Sphere::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax)
{
pos.Generate(xmin, xmax, ymin, ymax, zmin, zmax);
}
void Sphere::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value rmin, Value rmax) noexcept
void Sphere::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value rmin, Value rmax)
{
if (std::isless(rmax, rmin))
{
@ -437,7 +437,7 @@ void Sphere::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin
}
// ------------------------------------------------------------------------------------------------
Sphere Sphere::Abs() const noexcept
Sphere Sphere::Abs() const
{
return Sphere(pos.Abs(), std::fabs(rad));
}

View File

@ -25,97 +25,97 @@ struct Sphere
Vector3 pos;
Value rad;
// --------------------------------------------------------------------------------------------
Sphere() noexcept;
Sphere(Value r) noexcept;
Sphere(const Vector3 & p) noexcept;
Sphere(const Vector3 & p, Value r) noexcept;
Sphere(Value x, Value y, Value z, Value r) noexcept;
Sphere();
Sphere(Value r);
Sphere(const Vector3 & p);
Sphere(const Vector3 & p, Value r);
Sphere(Value x, Value y, Value z, Value r);
// --------------------------------------------------------------------------------------------
Sphere(const Sphere & s) noexcept;
Sphere(Sphere && s) noexcept;
Sphere(const Sphere & s);
Sphere(Sphere && s);
// --------------------------------------------------------------------------------------------
~Sphere();
// --------------------------------------------------------------------------------------------
Sphere & operator = (const Sphere & s) noexcept;
Sphere & operator = (Sphere && s) noexcept;
Sphere & operator = (const Sphere & s);
Sphere & operator = (Sphere && s);
// --------------------------------------------------------------------------------------------
Sphere & operator = (Value r) noexcept;
Sphere & operator = (const Vector3 & p) noexcept;
Sphere & operator = (Value r);
Sphere & operator = (const Vector3 & p);
// --------------------------------------------------------------------------------------------
Sphere & operator += (const Sphere & s) noexcept;
Sphere & operator -= (const Sphere & s) noexcept;
Sphere & operator *= (const Sphere & s) noexcept;
Sphere & operator /= (const Sphere & s) noexcept;
Sphere & operator %= (const Sphere & s) noexcept;
Sphere & operator += (const Sphere & s);
Sphere & operator -= (const Sphere & s);
Sphere & operator *= (const Sphere & s);
Sphere & operator /= (const Sphere & s);
Sphere & operator %= (const Sphere & s);
// --------------------------------------------------------------------------------------------
Sphere & operator += (Value r) noexcept;
Sphere & operator -= (Value r) noexcept;
Sphere & operator *= (Value r) noexcept;
Sphere & operator /= (Value r) noexcept;
Sphere & operator %= (Value r) noexcept;
Sphere & operator += (Value r);
Sphere & operator -= (Value r);
Sphere & operator *= (Value r);
Sphere & operator /= (Value r);
Sphere & operator %= (Value r);
// --------------------------------------------------------------------------------------------
Sphere & operator += (const Vector3 & p) noexcept;
Sphere & operator -= (const Vector3 & p) noexcept;
Sphere & operator *= (const Vector3 & p) noexcept;
Sphere & operator /= (const Vector3 & p) noexcept;
Sphere & operator %= (const Vector3 & p) noexcept;
Sphere & operator += (const Vector3 & p);
Sphere & operator -= (const Vector3 & p);
Sphere & operator *= (const Vector3 & p);
Sphere & operator /= (const Vector3 & p);
Sphere & operator %= (const Vector3 & p);
// --------------------------------------------------------------------------------------------
Sphere & operator ++ () noexcept;
Sphere & operator -- () noexcept;
Sphere & operator ++ ();
Sphere & operator -- ();
// --------------------------------------------------------------------------------------------
Sphere operator ++ (int) noexcept;
Sphere operator -- (int) noexcept;
Sphere operator ++ (int);
Sphere operator -- (int);
// --------------------------------------------------------------------------------------------
Sphere operator + (const Sphere & s) const noexcept;
Sphere operator - (const Sphere & s) const noexcept;
Sphere operator * (const Sphere & s) const noexcept;
Sphere operator / (const Sphere & s) const noexcept;
Sphere operator % (const Sphere & s) const noexcept;
Sphere operator + (const Sphere & s) const;
Sphere operator - (const Sphere & s) const;
Sphere operator * (const Sphere & s) const;
Sphere operator / (const Sphere & s) const;
Sphere operator % (const Sphere & s) const;
// --------------------------------------------------------------------------------------------
Sphere operator + (Value r) const noexcept;
Sphere operator - (Value r) const noexcept;
Sphere operator * (Value r) const noexcept;
Sphere operator / (Value r) const noexcept;
Sphere operator % (Value r) const noexcept;
Sphere operator + (Value r) const;
Sphere operator - (Value r) const;
Sphere operator * (Value r) const;
Sphere operator / (Value r) const;
Sphere operator % (Value r) const;
// --------------------------------------------------------------------------------------------
Sphere operator + (const Vector3 & p) const noexcept;
Sphere operator - (const Vector3 & p) const noexcept;
Sphere operator * (const Vector3 & p) const noexcept;
Sphere operator / (const Vector3 & p) const noexcept;
Sphere operator % (const Vector3 & p) const noexcept;
Sphere operator + (const Vector3 & p) const;
Sphere operator - (const Vector3 & p) const;
Sphere operator * (const Vector3 & p) const;
Sphere operator / (const Vector3 & p) const;
Sphere operator % (const Vector3 & p) const;
// --------------------------------------------------------------------------------------------
Sphere operator + () const noexcept;
Sphere operator - () const noexcept;
Sphere operator + () const;
Sphere operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Sphere & s) const noexcept;
bool operator != (const Sphere & s) const noexcept;
bool operator < (const Sphere & s) const noexcept;
bool operator > (const Sphere & s) const noexcept;
bool operator <= (const Sphere & s) const noexcept;
bool operator >= (const Sphere & s) const noexcept;
bool operator == (const Sphere & s) const;
bool operator != (const Sphere & s) const;
bool operator < (const Sphere & s) const;
bool operator > (const Sphere & s) const;
bool operator <= (const Sphere & s) const;
bool operator >= (const Sphere & s) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Sphere & s) const noexcept;
SQInteger Cmp(const Sphere & s) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value nr) noexcept;
void Set(const Sphere & ns) noexcept;
void Set(const Vector3 & np) noexcept;
void Set(const Vector3 & np, Value nr) noexcept;
void Set(Value nr);
void Set(const Sphere & ns);
void Set(const Vector3 & np);
void Set(const Vector3 & np, Value nr);
// --------------------------------------------------------------------------------------------
void Set(Value nx, Value ny, Value nz) noexcept;
void Set(Value nx, Value ny, Value nz, Value nr) noexcept;
void Set(Value nx, Value ny, Value nz);
void Set(Value nx, Value ny, Value nz, Value nr);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max, bool r) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value rmin, Value rmax) noexcept;
void Generate();
void Generate(Value min, Value max, bool r);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value rmin, Value rmax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { pos.Clear(); rad = 0.0; }
void Clear() { pos.Clear(); rad = 0.0; }
// --------------------------------------------------------------------------------------------
Sphere Abs() const noexcept;
Sphere Abs() const;
};
} // Namespace:: SqMod

View File

@ -16,52 +16,52 @@ const Vector2f Vector2f::MAX = Vector2f(std::numeric_limits<Vector2f::Value>::ma
SQChar Vector2f::Delim = ',';
// ------------------------------------------------------------------------------------------------
Vector2f::Vector2f() noexcept
Vector2f::Vector2f()
: x(0.0), y(0.0)
{
}
Vector2f::Vector2f(Value s) noexcept
Vector2f::Vector2f(Value s)
: x(s), y(s)
{
}
Vector2f::Vector2f(Value xv, Value yv) noexcept
Vector2f::Vector2f(Value xv, Value yv)
: x(xv), y(yv)
{
}
// ------------------------------------------------------------------------------------------------
Vector2f::Vector2f(const Vector2i & v) noexcept
Vector2f::Vector2f(const Vector2i & v)
: x(static_cast<Value>(v.x)), y(static_cast<Value>(v.y))
{
}
Vector2f::Vector2f(const Vector2u & v) noexcept
Vector2f::Vector2f(const Vector2u & v)
: x(static_cast<Value>(v.x)), y(static_cast<Value>(v.y))
{
}
// ------------------------------------------------------------------------------------------------
Vector2f::Vector2f(const SQChar * values, SQChar delim) noexcept
Vector2f::Vector2f(const SQChar * values, SQChar delim)
: Vector2f(GetVector2f(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
Vector2f::Vector2f(const Vector2f & v) noexcept
Vector2f::Vector2f(const Vector2f & v)
: x(v.x), y(v.y)
{
}
Vector2f::Vector2f(Vector2f && v) noexcept
Vector2f::Vector2f(Vector2f && v)
: x(v.x), y(v.y)
{
@ -74,14 +74,14 @@ Vector2f::~Vector2f()
}
// ------------------------------------------------------------------------------------------------
Vector2f & Vector2f::operator = (const Vector2f & v) noexcept
Vector2f & Vector2f::operator = (const Vector2f & v)
{
x = v.x;
y = v.y;
return *this;
}
Vector2f & Vector2f::operator = (Vector2f && v) noexcept
Vector2f & Vector2f::operator = (Vector2f && v)
{
x = v.x;
y = v.y;
@ -89,27 +89,27 @@ Vector2f & Vector2f::operator = (Vector2f && v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f & Vector2f::operator = (Value s) noexcept
Vector2f & Vector2f::operator = (Value s)
{
x = s;
y = s;
return *this;
}
Vector2f & Vector2f::operator = (const SQChar * values) noexcept
Vector2f & Vector2f::operator = (const SQChar * values)
{
Set(GetVector2f(values, Delim));
return *this;
}
Vector2f & Vector2f::operator = (const Vector2i & v) noexcept
Vector2f & Vector2f::operator = (const Vector2i & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
return *this;
}
Vector2f & Vector2f::operator = (const Vector2u & v) noexcept
Vector2f & Vector2f::operator = (const Vector2u & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
@ -117,35 +117,35 @@ Vector2f & Vector2f::operator = (const Vector2u & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f & Vector2f::operator += (const Vector2f & v) noexcept
Vector2f & Vector2f::operator += (const Vector2f & v)
{
x += v.x;
y += v.y;
return *this;
}
Vector2f & Vector2f::operator -= (const Vector2f & v) noexcept
Vector2f & Vector2f::operator -= (const Vector2f & v)
{
x -= v.x;
y -= v.y;
return *this;
}
Vector2f & Vector2f::operator *= (const Vector2f & v) noexcept
Vector2f & Vector2f::operator *= (const Vector2f & v)
{
x *= v.x;
y *= v.y;
return *this;
}
Vector2f & Vector2f::operator /= (const Vector2f & v) noexcept
Vector2f & Vector2f::operator /= (const Vector2f & v)
{
x /= v.x;
y /= v.y;
return *this;
}
Vector2f & Vector2f::operator %= (const Vector2f & v) noexcept
Vector2f & Vector2f::operator %= (const Vector2f & v)
{
x = std::fmod(x, v.x);
y = std::fmod(y, v.y);
@ -153,35 +153,35 @@ Vector2f & Vector2f::operator %= (const Vector2f & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f & Vector2f::operator += (Value s) noexcept
Vector2f & Vector2f::operator += (Value s)
{
x += s;
y += s;
return *this;
}
Vector2f & Vector2f::operator -= (Value s) noexcept
Vector2f & Vector2f::operator -= (Value s)
{
x -= s;
y -= s;
return *this;
}
Vector2f & Vector2f::operator *= (Value s) noexcept
Vector2f & Vector2f::operator *= (Value s)
{
x *= s;
y *= s;
return *this;
}
Vector2f & Vector2f::operator /= (Value s) noexcept
Vector2f & Vector2f::operator /= (Value s)
{
x /= s;
y /= s;
return *this;
}
Vector2f & Vector2f::operator %= (Value s) noexcept
Vector2f & Vector2f::operator %= (Value s)
{
x = std::fmod(x, s);
y = std::fmod(y, s);
@ -189,14 +189,14 @@ Vector2f & Vector2f::operator %= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f & Vector2f::operator ++ () noexcept
Vector2f & Vector2f::operator ++ ()
{
++x;
++y;
return *this;
}
Vector2f & Vector2f::operator -- () noexcept
Vector2f & Vector2f::operator -- ()
{
--x;
--y;
@ -204,7 +204,7 @@ Vector2f & Vector2f::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f Vector2f::operator ++ (int) noexcept
Vector2f Vector2f::operator ++ (int)
{
Vector2f state(*this);
++x;
@ -212,7 +212,7 @@ Vector2f Vector2f::operator ++ (int) noexcept
return state;
}
Vector2f Vector2f::operator -- (int) noexcept
Vector2f Vector2f::operator -- (int)
{
Vector2f state(*this);
--x;
@ -221,157 +221,157 @@ Vector2f Vector2f::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f Vector2f::operator + (const Vector2f & v) const noexcept
Vector2f Vector2f::operator + (const Vector2f & v) const
{
return Vector2f(x + v.x, y + v.y);
}
Vector2f Vector2f::operator - (const Vector2f & v) const noexcept
Vector2f Vector2f::operator - (const Vector2f & v) const
{
return Vector2f(x - v.x, y - v.y);
}
Vector2f Vector2f::operator * (const Vector2f & v) const noexcept
Vector2f Vector2f::operator * (const Vector2f & v) const
{
return Vector2f(x * v.x, y * v.y);
}
Vector2f Vector2f::operator / (const Vector2f & v) const noexcept
Vector2f Vector2f::operator / (const Vector2f & v) const
{
return Vector2f(x / v.x, y / v.y);
}
Vector2f Vector2f::operator % (const Vector2f & v) const noexcept
Vector2f Vector2f::operator % (const Vector2f & v) const
{
return Vector2f(std::fmod(x, v.x), std::fmod(y, v.y));
}
// ------------------------------------------------------------------------------------------------
Vector2f Vector2f::operator + (Value s) const noexcept
Vector2f Vector2f::operator + (Value s) const
{
return Vector2f(x + s, y + s);
}
Vector2f Vector2f::operator - (Value s) const noexcept
Vector2f Vector2f::operator - (Value s) const
{
return Vector2f(x - s, y - s);
}
Vector2f Vector2f::operator * (Value s) const noexcept
Vector2f Vector2f::operator * (Value s) const
{
return Vector2f(x * s, y * s);
}
Vector2f Vector2f::operator / (Value s) const noexcept
Vector2f Vector2f::operator / (Value s) const
{
return Vector2f(x / s, y / s);
}
Vector2f Vector2f::operator % (Value s) const noexcept
Vector2f Vector2f::operator % (Value s) const
{
return Vector2f(std::fmod(x, s), std::fmod(y, s));
}
// ------------------------------------------------------------------------------------------------
Vector2f Vector2f::operator + () const noexcept
Vector2f Vector2f::operator + () const
{
return Vector2f(std::fabs(x), std::fabs(y));
}
Vector2f Vector2f::operator - () const noexcept
Vector2f Vector2f::operator - () const
{
return Vector2f(-x, -y);
}
// ------------------------------------------------------------------------------------------------
bool Vector2f::operator == (const Vector2f & v) const noexcept
bool Vector2f::operator == (const Vector2f & v) const
{
return EpsEq(x, v.x) && EpsEq(y, v.y);
}
bool Vector2f::operator != (const Vector2f & v) const noexcept
bool Vector2f::operator != (const Vector2f & v) const
{
return !EpsEq(x, v.x) && !EpsEq(y, v.y);
}
bool Vector2f::operator < (const Vector2f & v) const noexcept
bool Vector2f::operator < (const Vector2f & v) const
{
return std::isless(x, v.x) && std::isless(y, v.y);
}
bool Vector2f::operator > (const Vector2f & v) const noexcept
bool Vector2f::operator > (const Vector2f & v) const
{
return std::isgreater(x, v.x) && std::isgreater(y, v.y);
}
bool Vector2f::operator <= (const Vector2f & v) const noexcept
bool Vector2f::operator <= (const Vector2f & v) const
{
return std::islessequal(x, v.x) && std::islessequal(y, v.y);
}
bool Vector2f::operator >= (const Vector2f & v) const noexcept
bool Vector2f::operator >= (const Vector2f & v) const
{
return std::isgreaterequal(x, v.x) && std::isgreaterequal(y, v.y);
}
// ------------------------------------------------------------------------------------------------
SQInteger Vector2f::Cmp(const Vector2f & v) const noexcept
SQInteger Vector2f::Cmp(const Vector2f & v) const
{
return *this == v ? 0 : (*this > v ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Vector2f::ToString() const noexcept
const SQChar * Vector2f::ToString() const
{
return ToStringF("%f,%f", x, y);
}
// ------------------------------------------------------------------------------------------------
void Vector2f::Set(Value ns) noexcept
void Vector2f::Set(Value ns)
{
x = ns;
y = ns;
}
void Vector2f::Set(Value nx, Value ny) noexcept
void Vector2f::Set(Value nx, Value ny)
{
x = nx;
y = ny;
}
// ------------------------------------------------------------------------------------------------
void Vector2f::Set(const Vector2f & v) noexcept
void Vector2f::Set(const Vector2f & v)
{
x = v.x;
y = v.y;
}
void Vector2f::Set(const Vector2i & v) noexcept
void Vector2f::Set(const Vector2i & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
}
void Vector2f::Set(const Vector2u & v) noexcept
void Vector2f::Set(const Vector2u & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
}
// ------------------------------------------------------------------------------------------------
void Vector2f::Set(const SQChar * values, SQChar delim) noexcept
void Vector2f::Set(const SQChar * values, SQChar delim)
{
Set(GetVector2f(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Vector2f::Generate() noexcept
void Vector2f::Generate()
{
x = RandomVal<Value>::Get();
y = RandomVal<Value>::Get();
}
void Vector2f::Generate(Value min, Value max) noexcept
void Vector2f::Generate(Value min, Value max)
{
if (max < min)
{
@ -384,7 +384,7 @@ void Vector2f::Generate(Value min, Value max) noexcept
}
}
void Vector2f::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
void Vector2f::Generate(Value xmin, Value xmax, Value ymin, Value ymax)
{
if (xmax < xmin || ymax < ymin)
{
@ -398,7 +398,7 @@ void Vector2f::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2f Vector2f::Abs() const noexcept
Vector2f Vector2f::Abs() const
{
return Vector2f(std::fabs(x), std::fabs(y));
}

View File

@ -23,88 +23,88 @@ struct Vector2f
// --------------------------------------------------------------------------------------------
Value x, y;
// --------------------------------------------------------------------------------------------
Vector2f() noexcept;
Vector2f(Value s) noexcept;
Vector2f(Value xv, Value yv) noexcept;
Vector2f();
Vector2f(Value s);
Vector2f(Value xv, Value yv);
// --------------------------------------------------------------------------------------------
Vector2f(const Vector2i & v) noexcept;
Vector2f(const Vector2u & v) noexcept;
Vector2f(const Vector2i & v);
Vector2f(const Vector2u & v);
// --------------------------------------------------------------------------------------------
Vector2f(const SQChar * values, SQChar delim) noexcept;
Vector2f(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
Vector2f(const Vector2f & v) noexcept;
Vector2f(Vector2f && v) noexcept;
Vector2f(const Vector2f & v);
Vector2f(Vector2f && v);
// --------------------------------------------------------------------------------------------
~Vector2f();
// --------------------------------------------------------------------------------------------
Vector2f & operator = (const Vector2f & v) noexcept;
Vector2f & operator = (Vector2f && v) noexcept;
Vector2f & operator = (const Vector2f & v);
Vector2f & operator = (Vector2f && v);
// --------------------------------------------------------------------------------------------
Vector2f & operator = (Value s) noexcept;
Vector2f & operator = (const SQChar * values) noexcept;
Vector2f & operator = (const Vector2i & v) noexcept;
Vector2f & operator = (const Vector2u & v) noexcept;
Vector2f & operator = (Value s);
Vector2f & operator = (const SQChar * values);
Vector2f & operator = (const Vector2i & v);
Vector2f & operator = (const Vector2u & v);
// --------------------------------------------------------------------------------------------
Vector2f & operator += (const Vector2f & v) noexcept;
Vector2f & operator -= (const Vector2f & v) noexcept;
Vector2f & operator *= (const Vector2f & v) noexcept;
Vector2f & operator /= (const Vector2f & v) noexcept;
Vector2f & operator %= (const Vector2f & v) noexcept;
Vector2f & operator += (const Vector2f & v);
Vector2f & operator -= (const Vector2f & v);
Vector2f & operator *= (const Vector2f & v);
Vector2f & operator /= (const Vector2f & v);
Vector2f & operator %= (const Vector2f & v);
// --------------------------------------------------------------------------------------------
Vector2f & operator += (Value s) noexcept;
Vector2f & operator -= (Value s) noexcept;
Vector2f & operator *= (Value s) noexcept;
Vector2f & operator /= (Value s) noexcept;
Vector2f & operator %= (Value s) noexcept;
Vector2f & operator += (Value s);
Vector2f & operator -= (Value s);
Vector2f & operator *= (Value s);
Vector2f & operator /= (Value s);
Vector2f & operator %= (Value s);
// --------------------------------------------------------------------------------------------
Vector2f & operator ++ () noexcept;
Vector2f & operator -- () noexcept;
Vector2f & operator ++ ();
Vector2f & operator -- ();
// --------------------------------------------------------------------------------------------
Vector2f operator ++ (int) noexcept;
Vector2f operator -- (int) noexcept;
Vector2f operator ++ (int);
Vector2f operator -- (int);
// --------------------------------------------------------------------------------------------
Vector2f operator + (const Vector2f & v) const noexcept;
Vector2f operator - (const Vector2f & v) const noexcept;
Vector2f operator * (const Vector2f & v) const noexcept;
Vector2f operator / (const Vector2f & v) const noexcept;
Vector2f operator % (const Vector2f & v) const noexcept;
Vector2f operator + (const Vector2f & v) const;
Vector2f operator - (const Vector2f & v) const;
Vector2f operator * (const Vector2f & v) const;
Vector2f operator / (const Vector2f & v) const;
Vector2f operator % (const Vector2f & v) const;
// --------------------------------------------------------------------------------------------
Vector2f operator + (Value s) const noexcept;
Vector2f operator - (Value s) const noexcept;
Vector2f operator * (Value s) const noexcept;
Vector2f operator / (Value s) const noexcept;
Vector2f operator % (Value s) const noexcept;
Vector2f operator + (Value s) const;
Vector2f operator - (Value s) const;
Vector2f operator * (Value s) const;
Vector2f operator / (Value s) const;
Vector2f operator % (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2f operator + () const noexcept;
Vector2f operator - () const noexcept;
Vector2f operator + () const;
Vector2f operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Vector2f & v) const noexcept;
bool operator != (const Vector2f & v) const noexcept;
bool operator < (const Vector2f & v) const noexcept;
bool operator > (const Vector2f & v) const noexcept;
bool operator <= (const Vector2f & v) const noexcept;
bool operator >= (const Vector2f & v) const noexcept;
bool operator == (const Vector2f & v) const;
bool operator != (const Vector2f & v) const;
bool operator < (const Vector2f & v) const;
bool operator > (const Vector2f & v) const;
bool operator <= (const Vector2f & v) const;
bool operator >= (const Vector2f & v) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Vector2f & v) const noexcept;
SQInteger Cmp(const Vector2f & v) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny);
// --------------------------------------------------------------------------------------------
void Set(const Vector2f & v) noexcept;
void Set(const Vector2i & v) noexcept;
void Set(const Vector2u & v) noexcept;
void Set(const Vector2f & v);
void Set(const Vector2i & v);
void Set(const Vector2u & v);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { x = 0.0, y = 0.0; }
void Clear() { x = 0.0, y = 0.0; }
// --------------------------------------------------------------------------------------------
Vector2f Abs() const noexcept;
Vector2f Abs() const;
};
} // Namespace:: SqMod

View File

@ -16,52 +16,52 @@ const Vector2i Vector2i::MAX = Vector2i(std::numeric_limits<Vector2i::Value>::ma
SQChar Vector2i::Delim = ',';
// ------------------------------------------------------------------------------------------------
Vector2i::Vector2i() noexcept
Vector2i::Vector2i()
: x(0), y(0)
{
}
Vector2i::Vector2i(Value s) noexcept
Vector2i::Vector2i(Value s)
: x(s), y(s)
{
}
Vector2i::Vector2i(Value xv, Value yv) noexcept
Vector2i::Vector2i(Value xv, Value yv)
: x(xv), y(yv)
{
}
// ------------------------------------------------------------------------------------------------
Vector2i::Vector2i(const Vector2u & v) noexcept
Vector2i::Vector2i(const Vector2u & v)
: x(static_cast<Value>(v.x)), y(static_cast<Value>(v.y))
{
}
Vector2i::Vector2i(const Vector2f & v) noexcept
Vector2i::Vector2i(const Vector2f & v)
: x(static_cast<Value>(v.x)), y(static_cast<Value>(v.y))
{
}
// ------------------------------------------------------------------------------------------------
Vector2i::Vector2i(const SQChar * values, SQChar delim) noexcept
Vector2i::Vector2i(const SQChar * values, SQChar delim)
: Vector2i(GetVector2i(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
Vector2i::Vector2i(const Vector2i & v) noexcept
Vector2i::Vector2i(const Vector2i & v)
: x(v.x), y(v.y)
{
}
Vector2i::Vector2i(Vector2i && v) noexcept
Vector2i::Vector2i(Vector2i && v)
: x(v.x), y(v.y)
{
@ -74,14 +74,14 @@ Vector2i::~Vector2i()
}
// ------------------------------------------------------------------------------------------------
Vector2i & Vector2i::operator = (const Vector2i & v) noexcept
Vector2i & Vector2i::operator = (const Vector2i & v)
{
x = v.x;
y = v.y;
return *this;
}
Vector2i & Vector2i::operator = (Vector2i && v) noexcept
Vector2i & Vector2i::operator = (Vector2i && v)
{
x = v.x;
y = v.y;
@ -89,27 +89,27 @@ Vector2i & Vector2i::operator = (Vector2i && v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i & Vector2i::operator = (Value s) noexcept
Vector2i & Vector2i::operator = (Value s)
{
x = s;
y = s;
return *this;
}
Vector2i & Vector2i::operator = (const SQChar * values) noexcept
Vector2i & Vector2i::operator = (const SQChar * values)
{
Set(GetVector2i(values, Delim));
return *this;
}
Vector2i & Vector2i::operator = (const Vector2u & v) noexcept
Vector2i & Vector2i::operator = (const Vector2u & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
return *this;
}
Vector2i & Vector2i::operator = (const Vector2f & v) noexcept
Vector2i & Vector2i::operator = (const Vector2f & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
@ -117,70 +117,70 @@ Vector2i & Vector2i::operator = (const Vector2f & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i & Vector2i::operator += (const Vector2i & v) noexcept
Vector2i & Vector2i::operator += (const Vector2i & v)
{
x += v.x;
y += v.y;
return *this;
}
Vector2i & Vector2i::operator -= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator -= (const Vector2i & v)
{
x -= v.x;
y -= v.y;
return *this;
}
Vector2i & Vector2i::operator *= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator *= (const Vector2i & v)
{
x *= v.x;
y *= v.y;
return *this;
}
Vector2i & Vector2i::operator /= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator /= (const Vector2i & v)
{
x /= v.x;
y /= v.y;
return *this;
}
Vector2i & Vector2i::operator %= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator %= (const Vector2i & v)
{
x %= v.x;
y %= v.y;
return *this;
}
Vector2i & Vector2i::operator &= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator &= (const Vector2i & v)
{
x &= v.x;
y &= v.y;
return *this;
}
Vector2i & Vector2i::operator |= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator |= (const Vector2i & v)
{
x |= v.x;
y |= v.y;
return *this;
}
Vector2i & Vector2i::operator ^= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator ^= (const Vector2i & v)
{
x ^= v.x;
y ^= v.y;
return *this;
}
Vector2i & Vector2i::operator <<= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator <<= (const Vector2i & v)
{
x <<= v.x;
y <<= v.y;
return *this;
}
Vector2i & Vector2i::operator >>= (const Vector2i & v) noexcept
Vector2i & Vector2i::operator >>= (const Vector2i & v)
{
x >>= v.x;
y >>= v.y;
@ -188,70 +188,70 @@ Vector2i & Vector2i::operator >>= (const Vector2i & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i & Vector2i::operator += (Value s) noexcept
Vector2i & Vector2i::operator += (Value s)
{
x += s;
y += s;
return *this;
}
Vector2i & Vector2i::operator -= (Value s) noexcept
Vector2i & Vector2i::operator -= (Value s)
{
x -= s;
y -= s;
return *this;
}
Vector2i & Vector2i::operator *= (Value s) noexcept
Vector2i & Vector2i::operator *= (Value s)
{
x *= s;
y *= s;
return *this;
}
Vector2i & Vector2i::operator /= (Value s) noexcept
Vector2i & Vector2i::operator /= (Value s)
{
x /= s;
y /= s;
return *this;
}
Vector2i & Vector2i::operator %= (Value s) noexcept
Vector2i & Vector2i::operator %= (Value s)
{
x %= s;
y %= s;
return *this;
}
Vector2i & Vector2i::operator &= (Value s) noexcept
Vector2i & Vector2i::operator &= (Value s)
{
x &= s;
y &= s;
return *this;
}
Vector2i & Vector2i::operator |= (Value s) noexcept
Vector2i & Vector2i::operator |= (Value s)
{
x |= s;
y |= s;
return *this;
}
Vector2i & Vector2i::operator ^= (Value s) noexcept
Vector2i & Vector2i::operator ^= (Value s)
{
x += s;
y += s;
return *this;
}
Vector2i & Vector2i::operator <<= (Value s) noexcept
Vector2i & Vector2i::operator <<= (Value s)
{
x <<= s;
y <<= s;
return *this;
}
Vector2i & Vector2i::operator >>= (Value s) noexcept
Vector2i & Vector2i::operator >>= (Value s)
{
x >>= s;
y >>= s;
@ -259,14 +259,14 @@ Vector2i & Vector2i::operator >>= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i & Vector2i::operator ++ () noexcept
Vector2i & Vector2i::operator ++ ()
{
++x;
++y;
return *this;
}
Vector2i & Vector2i::operator -- () noexcept
Vector2i & Vector2i::operator -- ()
{
--x;
--y;
@ -274,7 +274,7 @@ Vector2i & Vector2i::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i Vector2i::operator ++ (int) noexcept
Vector2i Vector2i::operator ++ (int)
{
Vector2i state(*this);
++x;
@ -282,7 +282,7 @@ Vector2i Vector2i::operator ++ (int) noexcept
return state;
}
Vector2i Vector2i::operator -- (int) noexcept
Vector2i Vector2i::operator -- (int)
{
Vector2i state(*this);
--x;
@ -291,213 +291,213 @@ Vector2i Vector2i::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i Vector2i::operator + (const Vector2i & v) const noexcept
Vector2i Vector2i::operator + (const Vector2i & v) const
{
return Vector2i(x + v.x, y + v.y);
}
Vector2i Vector2i::operator - (const Vector2i & v) const noexcept
Vector2i Vector2i::operator - (const Vector2i & v) const
{
return Vector2i(x - v.x, y - v.y);
}
Vector2i Vector2i::operator * (const Vector2i & v) const noexcept
Vector2i Vector2i::operator * (const Vector2i & v) const
{
return Vector2i(x * v.x, y * v.y);
}
Vector2i Vector2i::operator / (const Vector2i & v) const noexcept
Vector2i Vector2i::operator / (const Vector2i & v) const
{
return Vector2i(x / v.x, y / v.y);
}
Vector2i Vector2i::operator % (const Vector2i & v) const noexcept
Vector2i Vector2i::operator % (const Vector2i & v) const
{
return Vector2i(x % v.x, y % v.y);
}
Vector2i Vector2i::operator & (const Vector2i & v) const noexcept
Vector2i Vector2i::operator & (const Vector2i & v) const
{
return Vector2i(x & v.x, y & v.y);
}
Vector2i Vector2i::operator | (const Vector2i & v) const noexcept
Vector2i Vector2i::operator | (const Vector2i & v) const
{
return Vector2i(x | v.x, y | v.y);
}
Vector2i Vector2i::operator ^ (const Vector2i & v) const noexcept
Vector2i Vector2i::operator ^ (const Vector2i & v) const
{
return Vector2i(x ^ v.x, y ^ v.y);
}
Vector2i Vector2i::operator << (const Vector2i & v) const noexcept
Vector2i Vector2i::operator << (const Vector2i & v) const
{
return Vector2i(x << v.x, y << v.y);
}
Vector2i Vector2i::operator >> (const Vector2i & v) const noexcept
Vector2i Vector2i::operator >> (const Vector2i & v) const
{
return Vector2i(x >> v.x, y >> v.y);
}
// ------------------------------------------------------------------------------------------------
Vector2i Vector2i::operator + (Value s) const noexcept
Vector2i Vector2i::operator + (Value s) const
{
return Vector2i(x + s, y + s);
}
Vector2i Vector2i::operator - (Value s) const noexcept
Vector2i Vector2i::operator - (Value s) const
{
return Vector2i(x - s, y - s);
}
Vector2i Vector2i::operator * (Value s) const noexcept
Vector2i Vector2i::operator * (Value s) const
{
return Vector2i(x * s, y * s);
}
Vector2i Vector2i::operator / (Value s) const noexcept
Vector2i Vector2i::operator / (Value s) const
{
return Vector2i(x / s, y / s);
}
Vector2i Vector2i::operator % (Value s) const noexcept
Vector2i Vector2i::operator % (Value s) const
{
return Vector2i(x % s, y % s);
}
Vector2i Vector2i::operator & (Value s) const noexcept
Vector2i Vector2i::operator & (Value s) const
{
return Vector2i(x & s, y & s);
}
Vector2i Vector2i::operator | (Value s) const noexcept
Vector2i Vector2i::operator | (Value s) const
{
return Vector2i(x | s, y | s);
}
Vector2i Vector2i::operator ^ (Value s) const noexcept
Vector2i Vector2i::operator ^ (Value s) const
{
return Vector2i(x ^ s, y ^ s);
}
Vector2i Vector2i::operator << (Value s) const noexcept
Vector2i Vector2i::operator << (Value s) const
{
return Vector2i(x < s, y < s);
}
Vector2i Vector2i::operator >> (Value s) const noexcept
Vector2i Vector2i::operator >> (Value s) const
{
return Vector2i(x >> s, y >> s);
}
// ------------------------------------------------------------------------------------------------
Vector2i Vector2i::operator + () const noexcept
Vector2i Vector2i::operator + () const
{
return Vector2i(std::abs(x), std::abs(y));
}
Vector2i Vector2i::operator - () const noexcept
Vector2i Vector2i::operator - () const
{
return Vector2i(-x, -y);
}
// ------------------------------------------------------------------------------------------------
Vector2i Vector2i::operator ~ () const noexcept
Vector2i Vector2i::operator ~ () const
{
return Vector2i(~x, ~y);
}
// ------------------------------------------------------------------------------------------------
bool Vector2i::operator == (const Vector2i & v) const noexcept
bool Vector2i::operator == (const Vector2i & v) const
{
return (x == v.x) && (y == v.y);
}
bool Vector2i::operator != (const Vector2i & v) const noexcept
bool Vector2i::operator != (const Vector2i & v) const
{
return (x != v.x) && (y != v.y);
}
bool Vector2i::operator < (const Vector2i & v) const noexcept
bool Vector2i::operator < (const Vector2i & v) const
{
return (x < v.x) && (y < v.y);
}
bool Vector2i::operator > (const Vector2i & v) const noexcept
bool Vector2i::operator > (const Vector2i & v) const
{
return (x > v.x) && (y > v.y);
}
bool Vector2i::operator <= (const Vector2i & v) const noexcept
bool Vector2i::operator <= (const Vector2i & v) const
{
return (x <= v.x) && (y <= v.y);
}
bool Vector2i::operator >= (const Vector2i & v) const noexcept
bool Vector2i::operator >= (const Vector2i & v) const
{
return (x >= v.x) && (y >= v.y);
}
// ------------------------------------------------------------------------------------------------
SQInteger Vector2i::Cmp(const Vector2i & v) const noexcept
SQInteger Vector2i::Cmp(const Vector2i & v) const
{
return *this == v ? 0 : (*this > v ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Vector2i::ToString() const noexcept
const SQChar * Vector2i::ToString() const
{
return ToStringF("%d,%d", x, y);
}
// ------------------------------------------------------------------------------------------------
void Vector2i::Set(Value ns) noexcept
void Vector2i::Set(Value ns)
{
x = ns;
y = ns;
}
void Vector2i::Set(Value nx, Value ny) noexcept
void Vector2i::Set(Value nx, Value ny)
{
x = nx;
y = ny;
}
// ------------------------------------------------------------------------------------------------
void Vector2i::Set(const Vector2i & v) noexcept
void Vector2i::Set(const Vector2i & v)
{
x = v.x;
y = v.y;
}
void Vector2i::Set(const Vector2u & v) noexcept
void Vector2i::Set(const Vector2u & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
}
void Vector2i::Set(const Vector2f & v) noexcept
void Vector2i::Set(const Vector2f & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
}
// ------------------------------------------------------------------------------------------------
void Vector2i::Set(const SQChar * values, SQChar delim) noexcept
void Vector2i::Set(const SQChar * values, SQChar delim)
{
Set(GetVector2i(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Vector2i::Generate() noexcept
void Vector2i::Generate()
{
x = RandomVal<Value>::Get();
y = RandomVal<Value>::Get();
}
void Vector2i::Generate(Value min, Value max) noexcept
void Vector2i::Generate(Value min, Value max)
{
if (max < min)
{
@ -510,7 +510,7 @@ void Vector2i::Generate(Value min, Value max) noexcept
}
}
void Vector2i::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
void Vector2i::Generate(Value xmin, Value xmax, Value ymin, Value ymax)
{
if (xmax < xmin || ymax < ymin)
{
@ -524,7 +524,7 @@ void Vector2i::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2i Vector2i::Abs() const noexcept
Vector2i Vector2i::Abs() const
{
return Vector2i(std::abs(x), std::abs(y));
}

View File

@ -23,110 +23,110 @@ struct Vector2i
// --------------------------------------------------------------------------------------------
Value x, y;
// --------------------------------------------------------------------------------------------
Vector2i() noexcept;
Vector2i(Value s) noexcept;
Vector2i(Value xv, Value yv) noexcept;
Vector2i();
Vector2i(Value s);
Vector2i(Value xv, Value yv);
// --------------------------------------------------------------------------------------------
Vector2i(const Vector2u & v) noexcept;
Vector2i(const Vector2f & v) noexcept;
Vector2i(const Vector2u & v);
Vector2i(const Vector2f & v);
// --------------------------------------------------------------------------------------------
Vector2i(const SQChar * values, SQChar delim) noexcept;
Vector2i(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
Vector2i(const Vector2i & v) noexcept;
Vector2i(Vector2i && v) noexcept;
Vector2i(const Vector2i & v);
Vector2i(Vector2i && v);
// --------------------------------------------------------------------------------------------
~Vector2i();
// --------------------------------------------------------------------------------------------
Vector2i & operator = (const Vector2i & v) noexcept;
Vector2i & operator = (Vector2i && v) noexcept;
Vector2i & operator = (const Vector2i & v);
Vector2i & operator = (Vector2i && v);
// --------------------------------------------------------------------------------------------
Vector2i & operator = (Value s) noexcept;
Vector2i & operator = (const SQChar * values) noexcept;
Vector2i & operator = (const Vector2u & v) noexcept;
Vector2i & operator = (const Vector2f & v) noexcept;
Vector2i & operator = (Value s);
Vector2i & operator = (const SQChar * values);
Vector2i & operator = (const Vector2u & v);
Vector2i & operator = (const Vector2f & v);
// --------------------------------------------------------------------------------------------
Vector2i & operator += (const Vector2i & v) noexcept;
Vector2i & operator -= (const Vector2i & v) noexcept;
Vector2i & operator *= (const Vector2i & v) noexcept;
Vector2i & operator /= (const Vector2i & v) noexcept;
Vector2i & operator %= (const Vector2i & v) noexcept;
Vector2i & operator &= (const Vector2i & v) noexcept;
Vector2i & operator |= (const Vector2i & v) noexcept;
Vector2i & operator ^= (const Vector2i & v) noexcept;
Vector2i & operator <<= (const Vector2i & v) noexcept;
Vector2i & operator >>= (const Vector2i & v) noexcept;
Vector2i & operator += (const Vector2i & v);
Vector2i & operator -= (const Vector2i & v);
Vector2i & operator *= (const Vector2i & v);
Vector2i & operator /= (const Vector2i & v);
Vector2i & operator %= (const Vector2i & v);
Vector2i & operator &= (const Vector2i & v);
Vector2i & operator |= (const Vector2i & v);
Vector2i & operator ^= (const Vector2i & v);
Vector2i & operator <<= (const Vector2i & v);
Vector2i & operator >>= (const Vector2i & v);
// --------------------------------------------------------------------------------------------
Vector2i & operator += (Value s) noexcept;
Vector2i & operator -= (Value s) noexcept;
Vector2i & operator *= (Value s) noexcept;
Vector2i & operator /= (Value s) noexcept;
Vector2i & operator %= (Value s) noexcept;
Vector2i & operator &= (Value s) noexcept;
Vector2i & operator |= (Value s) noexcept;
Vector2i & operator ^= (Value s) noexcept;
Vector2i & operator <<= (Value s) noexcept;
Vector2i & operator >>= (Value s) noexcept;
Vector2i & operator += (Value s);
Vector2i & operator -= (Value s);
Vector2i & operator *= (Value s);
Vector2i & operator /= (Value s);
Vector2i & operator %= (Value s);
Vector2i & operator &= (Value s);
Vector2i & operator |= (Value s);
Vector2i & operator ^= (Value s);
Vector2i & operator <<= (Value s);
Vector2i & operator >>= (Value s);
// --------------------------------------------------------------------------------------------
Vector2i & operator ++ () noexcept;
Vector2i & operator -- () noexcept;
Vector2i & operator ++ ();
Vector2i & operator -- ();
// --------------------------------------------------------------------------------------------
Vector2i operator ++ (int) noexcept;
Vector2i operator -- (int) noexcept;
Vector2i operator ++ (int);
Vector2i operator -- (int);
// --------------------------------------------------------------------------------------------
Vector2i operator + (const Vector2i & v) const noexcept;
Vector2i operator - (const Vector2i & v) const noexcept;
Vector2i operator * (const Vector2i & v) const noexcept;
Vector2i operator / (const Vector2i & v) const noexcept;
Vector2i operator % (const Vector2i & v) const noexcept;
Vector2i operator & (const Vector2i & v) const noexcept;
Vector2i operator | (const Vector2i & v) const noexcept;
Vector2i operator ^ (const Vector2i & v) const noexcept;
Vector2i operator << (const Vector2i & v) const noexcept;
Vector2i operator >> (const Vector2i & v) const noexcept;
Vector2i operator + (const Vector2i & v) const;
Vector2i operator - (const Vector2i & v) const;
Vector2i operator * (const Vector2i & v) const;
Vector2i operator / (const Vector2i & v) const;
Vector2i operator % (const Vector2i & v) const;
Vector2i operator & (const Vector2i & v) const;
Vector2i operator | (const Vector2i & v) const;
Vector2i operator ^ (const Vector2i & v) const;
Vector2i operator << (const Vector2i & v) const;
Vector2i operator >> (const Vector2i & v) const;
// --------------------------------------------------------------------------------------------
Vector2i operator + (Value s) const noexcept;
Vector2i operator - (Value s) const noexcept;
Vector2i operator * (Value s) const noexcept;
Vector2i operator / (Value s) const noexcept;
Vector2i operator % (Value s) const noexcept;
Vector2i operator & (Value s) const noexcept;
Vector2i operator | (Value s) const noexcept;
Vector2i operator ^ (Value s) const noexcept;
Vector2i operator << (Value s) const noexcept;
Vector2i operator >> (Value s) const noexcept;
Vector2i operator + (Value s) const;
Vector2i operator - (Value s) const;
Vector2i operator * (Value s) const;
Vector2i operator / (Value s) const;
Vector2i operator % (Value s) const;
Vector2i operator & (Value s) const;
Vector2i operator | (Value s) const;
Vector2i operator ^ (Value s) const;
Vector2i operator << (Value s) const;
Vector2i operator >> (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2i operator + () const noexcept;
Vector2i operator - () const noexcept;
Vector2i operator + () const;
Vector2i operator - () const;
// --------------------------------------------------------------------------------------------
Vector2i operator ~ () const noexcept;
Vector2i operator ~ () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Vector2i & v) const noexcept;
bool operator != (const Vector2i & v) const noexcept;
bool operator < (const Vector2i & v) const noexcept;
bool operator > (const Vector2i & v) const noexcept;
bool operator <= (const Vector2i & v) const noexcept;
bool operator >= (const Vector2i & v) const noexcept;
bool operator == (const Vector2i & v) const;
bool operator != (const Vector2i & v) const;
bool operator < (const Vector2i & v) const;
bool operator > (const Vector2i & v) const;
bool operator <= (const Vector2i & v) const;
bool operator >= (const Vector2i & v) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Vector2i & v) const noexcept;
SQInteger Cmp(const Vector2i & v) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny);
// --------------------------------------------------------------------------------------------
void Set(const Vector2i & v) noexcept;
void Set(const Vector2u & v) noexcept;
void Set(const Vector2f & v) noexcept;
void Set(const Vector2i & v);
void Set(const Vector2u & v);
void Set(const Vector2f & v);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { x = 0, y = 0; }
void Clear() { x = 0, y = 0; }
// --------------------------------------------------------------------------------------------
Vector2i Abs() const noexcept;
Vector2i Abs() const;
};
} // Namespace:: SqMod

View File

@ -16,52 +16,52 @@ const Vector2u Vector2u::MAX = Vector2u(std::numeric_limits<Vector2u::Value>::ma
SQChar Vector2u::Delim = ',';
// ------------------------------------------------------------------------------------------------
Vector2u::Vector2u() noexcept
Vector2u::Vector2u()
: x(0), y(0)
{
}
Vector2u::Vector2u(Value s) noexcept
Vector2u::Vector2u(Value s)
: x(s), y(s)
{
}
Vector2u::Vector2u(Value xv, Value yv) noexcept
Vector2u::Vector2u(Value xv, Value yv)
: x(xv), y(yv)
{
}
// ------------------------------------------------------------------------------------------------
Vector2u::Vector2u(const Vector2i & v) noexcept
Vector2u::Vector2u(const Vector2i & v)
: x(static_cast<Value>(v.x)), y(static_cast<Value>(v.y))
{
}
Vector2u::Vector2u(const Vector2f & v) noexcept
Vector2u::Vector2u(const Vector2f & v)
: x(static_cast<Value>(v.x)), y(static_cast<Value>(v.y))
{
}
// ------------------------------------------------------------------------------------------------
Vector2u::Vector2u(const SQChar * values, SQChar delim) noexcept
Vector2u::Vector2u(const SQChar * values, SQChar delim)
: Vector2u(GetVector2u(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
Vector2u::Vector2u(const Vector2u & v) noexcept
Vector2u::Vector2u(const Vector2u & v)
: x(v.x), y(v.y)
{
}
Vector2u::Vector2u(Vector2u && v) noexcept
Vector2u::Vector2u(Vector2u && v)
: x(v.x), y(v.y)
{
@ -74,14 +74,14 @@ Vector2u::~Vector2u()
}
// ------------------------------------------------------------------------------------------------
Vector2u & Vector2u::operator = (const Vector2u & v) noexcept
Vector2u & Vector2u::operator = (const Vector2u & v)
{
x = v.x;
y = v.y;
return *this;
}
Vector2u & Vector2u::operator = (Vector2u && v) noexcept
Vector2u & Vector2u::operator = (Vector2u && v)
{
x = v.x;
y = v.y;
@ -89,27 +89,27 @@ Vector2u & Vector2u::operator = (Vector2u && v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u & Vector2u::operator = (Value s) noexcept
Vector2u & Vector2u::operator = (Value s)
{
x = s;
y = s;
return *this;
}
Vector2u & Vector2u::operator = (const SQChar * values) noexcept
Vector2u & Vector2u::operator = (const SQChar * values)
{
Set(GetVector2i(values, Delim));
return *this;
}
Vector2u & Vector2u::operator = (const Vector2i & v) noexcept
Vector2u & Vector2u::operator = (const Vector2i & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
return *this;
}
Vector2u & Vector2u::operator = (const Vector2f & v) noexcept
Vector2u & Vector2u::operator = (const Vector2f & v)
{
x = static_cast<Value>(v.x);
y = static_cast<Value>(v.y);
@ -117,70 +117,70 @@ Vector2u & Vector2u::operator = (const Vector2f & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u & Vector2u::operator += (const Vector2u & v) noexcept
Vector2u & Vector2u::operator += (const Vector2u & v)
{
x += v.x;
y += v.y;
return *this;
}
Vector2u & Vector2u::operator -= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator -= (const Vector2u & v)
{
x -= v.x;
y -= v.y;
return *this;
}
Vector2u & Vector2u::operator *= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator *= (const Vector2u & v)
{
x *= v.x;
y *= v.y;
return *this;
}
Vector2u & Vector2u::operator /= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator /= (const Vector2u & v)
{
x /= v.x;
y /= v.y;
return *this;
}
Vector2u & Vector2u::operator %= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator %= (const Vector2u & v)
{
x %= v.x;
y %= v.y;
return *this;
}
Vector2u & Vector2u::operator &= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator &= (const Vector2u & v)
{
x &= v.x;
y &= v.y;
return *this;
}
Vector2u & Vector2u::operator |= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator |= (const Vector2u & v)
{
x |= v.x;
y |= v.y;
return *this;
}
Vector2u & Vector2u::operator ^= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator ^= (const Vector2u & v)
{
x ^= v.x;
y ^= v.y;
return *this;
}
Vector2u & Vector2u::operator <<= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator <<= (const Vector2u & v)
{
x <<= v.x;
y <<= v.y;
return *this;
}
Vector2u & Vector2u::operator >>= (const Vector2u & v) noexcept
Vector2u & Vector2u::operator >>= (const Vector2u & v)
{
x >>= v.x;
y >>= v.y;
@ -188,70 +188,70 @@ Vector2u & Vector2u::operator >>= (const Vector2u & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u & Vector2u::operator += (Value s) noexcept
Vector2u & Vector2u::operator += (Value s)
{
x += s;
y += s;
return *this;
}
Vector2u & Vector2u::operator -= (Value s) noexcept
Vector2u & Vector2u::operator -= (Value s)
{
x -= s;
y -= s;
return *this;
}
Vector2u & Vector2u::operator *= (Value s) noexcept
Vector2u & Vector2u::operator *= (Value s)
{
x *= s;
y *= s;
return *this;
}
Vector2u & Vector2u::operator /= (Value s) noexcept
Vector2u & Vector2u::operator /= (Value s)
{
x /= s;
y /= s;
return *this;
}
Vector2u & Vector2u::operator %= (Value s) noexcept
Vector2u & Vector2u::operator %= (Value s)
{
x %= s;
y %= s;
return *this;
}
Vector2u & Vector2u::operator &= (Value s) noexcept
Vector2u & Vector2u::operator &= (Value s)
{
x &= s;
y &= s;
return *this;
}
Vector2u & Vector2u::operator |= (Value s) noexcept
Vector2u & Vector2u::operator |= (Value s)
{
x |= s;
y |= s;
return *this;
}
Vector2u & Vector2u::operator ^= (Value s) noexcept
Vector2u & Vector2u::operator ^= (Value s)
{
x ^= s;
y ^= s;
return *this;
}
Vector2u & Vector2u::operator <<= (Value s) noexcept
Vector2u & Vector2u::operator <<= (Value s)
{
x <<= s;
y <<= s;
return *this;
}
Vector2u & Vector2u::operator >>= (Value s) noexcept
Vector2u & Vector2u::operator >>= (Value s)
{
x >>= s;
y >>= s;
@ -259,14 +259,14 @@ Vector2u & Vector2u::operator >>= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u & Vector2u::operator ++ () noexcept
Vector2u & Vector2u::operator ++ ()
{
++x;
++y;
return *this;
}
Vector2u & Vector2u::operator -- () noexcept
Vector2u & Vector2u::operator -- ()
{
--x;
--y;
@ -274,7 +274,7 @@ Vector2u & Vector2u::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u Vector2u::operator ++ (int) noexcept
Vector2u Vector2u::operator ++ (int)
{
Vector2i state(*this);
++x;
@ -282,7 +282,7 @@ Vector2u Vector2u::operator ++ (int) noexcept
return state;
}
Vector2u Vector2u::operator -- (int) noexcept
Vector2u Vector2u::operator -- (int)
{
Vector2i state(*this);
--x;
@ -291,213 +291,213 @@ Vector2u Vector2u::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u Vector2u::operator + (const Vector2u & v) const noexcept
Vector2u Vector2u::operator + (const Vector2u & v) const
{
return Vector2i(x + v.x, y + v.y);
}
Vector2u Vector2u::operator - (const Vector2u & v) const noexcept
Vector2u Vector2u::operator - (const Vector2u & v) const
{
return Vector2i(x - v.x, y - v.y);
}
Vector2u Vector2u::operator * (const Vector2u & v) const noexcept
Vector2u Vector2u::operator * (const Vector2u & v) const
{
return Vector2i(x * v.x, y * v.y);
}
Vector2u Vector2u::operator / (const Vector2u & v) const noexcept
Vector2u Vector2u::operator / (const Vector2u & v) const
{
return Vector2i(x / v.x, y / v.y);
}
Vector2u Vector2u::operator % (const Vector2u & v) const noexcept
Vector2u Vector2u::operator % (const Vector2u & v) const
{
return Vector2i(x % v.x, y % v.y);
}
Vector2u Vector2u::operator & (const Vector2u & v) const noexcept
Vector2u Vector2u::operator & (const Vector2u & v) const
{
return Vector2i(x & v.x, y & v.y);
}
Vector2u Vector2u::operator | (const Vector2u & v) const noexcept
Vector2u Vector2u::operator | (const Vector2u & v) const
{
return Vector2i(x | v.x, y | v.y);
}
Vector2u Vector2u::operator ^ (const Vector2u & v) const noexcept
Vector2u Vector2u::operator ^ (const Vector2u & v) const
{
return Vector2i(x ^ v.x, y ^ v.y);
}
Vector2u Vector2u::operator << (const Vector2u & v) const noexcept
Vector2u Vector2u::operator << (const Vector2u & v) const
{
return Vector2i(x << v.x, y << v.y);
}
Vector2u Vector2u::operator >> (const Vector2u & v) const noexcept
Vector2u Vector2u::operator >> (const Vector2u & v) const
{
return Vector2i(x >> v.x, y >> v.y);
}
// ------------------------------------------------------------------------------------------------
Vector2u Vector2u::operator + (Value s) const noexcept
Vector2u Vector2u::operator + (Value s) const
{
return Vector2i(x + s, y + s);
}
Vector2u Vector2u::operator - (Value s) const noexcept
Vector2u Vector2u::operator - (Value s) const
{
return Vector2i(x - s, y - s);
}
Vector2u Vector2u::operator * (Value s) const noexcept
Vector2u Vector2u::operator * (Value s) const
{
return Vector2i(x - s, y - s);
}
Vector2u Vector2u::operator / (Value s) const noexcept
Vector2u Vector2u::operator / (Value s) const
{
return Vector2i(x / s, y / s);
}
Vector2u Vector2u::operator % (Value s) const noexcept
Vector2u Vector2u::operator % (Value s) const
{
return Vector2i(x % s, y % s);
}
Vector2u Vector2u::operator & (Value s) const noexcept
Vector2u Vector2u::operator & (Value s) const
{
return Vector2i(x & s, y & s);
}
Vector2u Vector2u::operator | (Value s) const noexcept
Vector2u Vector2u::operator | (Value s) const
{
return Vector2i(x | s, y | s);
}
Vector2u Vector2u::operator ^ (Value s) const noexcept
Vector2u Vector2u::operator ^ (Value s) const
{
return Vector2i(x ^ s, y ^ s);
}
Vector2u Vector2u::operator << (Value s) const noexcept
Vector2u Vector2u::operator << (Value s) const
{
return Vector2i(x << s, y << s);
}
Vector2u Vector2u::operator >> (Value s) const noexcept
Vector2u Vector2u::operator >> (Value s) const
{
return Vector2i(x >> s, y >> s);
}
// ------------------------------------------------------------------------------------------------
Vector2u Vector2u::operator + () const noexcept
Vector2u Vector2u::operator + () const
{
return Vector2i(x, y);
}
Vector2u Vector2u::operator - () const noexcept
Vector2u Vector2u::operator - () const
{
return Vector2i(0, 0);
}
// ------------------------------------------------------------------------------------------------
Vector2u Vector2u::operator ~ () const noexcept
Vector2u Vector2u::operator ~ () const
{
return Vector2i(~x, ~y);
}
// ------------------------------------------------------------------------------------------------
bool Vector2u::operator == (const Vector2u & v) const noexcept
bool Vector2u::operator == (const Vector2u & v) const
{
return (x == v.x) && (y == v.y);
}
bool Vector2u::operator != (const Vector2u & v) const noexcept
bool Vector2u::operator != (const Vector2u & v) const
{
return (x != v.x) && (y != v.y);
}
bool Vector2u::operator < (const Vector2u & v) const noexcept
bool Vector2u::operator < (const Vector2u & v) const
{
return (x < v.x) && (y < v.y);
}
bool Vector2u::operator > (const Vector2u & v) const noexcept
bool Vector2u::operator > (const Vector2u & v) const
{
return (x > v.x) && (y > v.y);
}
bool Vector2u::operator <= (const Vector2u & v) const noexcept
bool Vector2u::operator <= (const Vector2u & v) const
{
return (x <= v.x) && (y <= v.y);
}
bool Vector2u::operator >= (const Vector2u & v) const noexcept
bool Vector2u::operator >= (const Vector2u & v) const
{
return (x >= v.x) && (y >= v.y);
}
// ------------------------------------------------------------------------------------------------
SQInteger Vector2u::Cmp(const Vector2u & v) const noexcept
SQInteger Vector2u::Cmp(const Vector2u & v) const
{
return *this == v ? 0 : (*this > v ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Vector2u::ToString() const noexcept
const SQChar * Vector2u::ToString() const
{
return ToStringF("%u,%u", x, y);
}
// ------------------------------------------------------------------------------------------------
void Vector2u::Set(Value ns) noexcept
void Vector2u::Set(Value ns)
{
x = ns;
y = ns;
}
void Vector2u::Set(Value nx, Value ny) noexcept
void Vector2u::Set(Value nx, Value ny)
{
x = nx;
y = ny;
}
// ------------------------------------------------------------------------------------------------
void Vector2u::Set(const Vector2u & v) noexcept
void Vector2u::Set(const Vector2u & v)
{
x = v.x;
y = v.y;
}
void Vector2u::Set(const Vector2i & v) noexcept
void Vector2u::Set(const Vector2i & v)
{
x = static_cast<SQInt32>(v.x);
y = static_cast<SQInt32>(v.y);
}
void Vector2u::Set(const Vector2f & v) noexcept
void Vector2u::Set(const Vector2f & v)
{
x = static_cast<SQInt32>(v.x);
y = static_cast<SQInt32>(v.y);
}
// ------------------------------------------------------------------------------------------------
void Vector2u::Set(const SQChar * values, SQChar delim) noexcept
void Vector2u::Set(const SQChar * values, SQChar delim)
{
Set(GetVector2i(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Vector2u::Generate() noexcept
void Vector2u::Generate()
{
x = RandomVal<Value>::Get();
y = RandomVal<Value>::Get();
}
void Vector2u::Generate(Value min, Value max) noexcept
void Vector2u::Generate(Value min, Value max)
{
if (max < min)
{
@ -510,7 +510,7 @@ void Vector2u::Generate(Value min, Value max) noexcept
}
}
void Vector2u::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
void Vector2u::Generate(Value xmin, Value xmax, Value ymin, Value ymax)
{
if (xmax < xmin || ymax < ymin)
{
@ -524,7 +524,7 @@ void Vector2u::Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector2u Vector2u::Abs() const noexcept
Vector2u Vector2u::Abs() const
{
return Vector2i(x, y);
}

View File

@ -23,118 +23,118 @@ struct Vector2u
// --------------------------------------------------------------------------------------------
Value x, y;
// --------------------------------------------------------------------------------------------
Vector2u() noexcept;
Vector2u(Value s) noexcept;
Vector2u(Value xv, Value yv) noexcept;
Vector2u();
Vector2u(Value s);
Vector2u(Value xv, Value yv);
// --------------------------------------------------------------------------------------------
Vector2u(const Vector2i & v) noexcept;
Vector2u(const Vector2f & v) noexcept;
Vector2u(const Vector2i & v);
Vector2u(const Vector2f & v);
// --------------------------------------------------------------------------------------------
Vector2u(const SQChar * values, SQChar delim) noexcept;
Vector2u(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
Vector2u(const Vector2u & v) noexcept;
Vector2u(Vector2u && v) noexcept;
Vector2u(const Vector2u & v);
Vector2u(Vector2u && v);
// --------------------------------------------------------------------------------------------
~Vector2u();
// --------------------------------------------------------------------------------------------
Vector2u & operator = (const Vector2u & v) noexcept;
Vector2u & operator = (Vector2u && v) noexcept;
Vector2u & operator = (const Vector2u & v);
Vector2u & operator = (Vector2u && v);
// --------------------------------------------------------------------------------------------
Vector2u & operator = (Value s) noexcept;
Vector2u & operator = (const SQChar * values) noexcept;
Vector2u & operator = (const Vector2i & v) noexcept;
Vector2u & operator = (const Vector2f & v) noexcept;
Vector2u & operator = (Value s);
Vector2u & operator = (const SQChar * values);
Vector2u & operator = (const Vector2i & v);
Vector2u & operator = (const Vector2f & v);
// --------------------------------------------------------------------------------------------
Vector2u & operator += (const Vector2u & v) noexcept;
Vector2u & operator -= (const Vector2u & v) noexcept;
Vector2u & operator *= (const Vector2u & v) noexcept;
Vector2u & operator /= (const Vector2u & v) noexcept;
Vector2u & operator %= (const Vector2u & v) noexcept;
Vector2u & operator &= (const Vector2u & v) noexcept;
Vector2u & operator |= (const Vector2u & v) noexcept;
Vector2u & operator ^= (const Vector2u & v) noexcept;
Vector2u & operator <<= (const Vector2u & v) noexcept;
Vector2u & operator >>= (const Vector2u & v) noexcept;
Vector2u & operator += (const Vector2u & v);
Vector2u & operator -= (const Vector2u & v);
Vector2u & operator *= (const Vector2u & v);
Vector2u & operator /= (const Vector2u & v);
Vector2u & operator %= (const Vector2u & v);
Vector2u & operator &= (const Vector2u & v);
Vector2u & operator |= (const Vector2u & v);
Vector2u & operator ^= (const Vector2u & v);
Vector2u & operator <<= (const Vector2u & v);
Vector2u & operator >>= (const Vector2u & v);
// --------------------------------------------------------------------------------------------
Vector2u & operator += (Value s) noexcept;
Vector2u & operator -= (Value s) noexcept;
Vector2u & operator *= (Value s) noexcept;
Vector2u & operator /= (Value s) noexcept;
Vector2u & operator %= (Value s) noexcept;
Vector2u & operator &= (Value s) noexcept;
Vector2u & operator |= (Value s) noexcept;
Vector2u & operator ^= (Value s) noexcept;
Vector2u & operator <<= (Value s) noexcept;
Vector2u & operator >>= (Value s) noexcept;
Vector2u & operator += (Value s);
Vector2u & operator -= (Value s);
Vector2u & operator *= (Value s);
Vector2u & operator /= (Value s);
Vector2u & operator %= (Value s);
Vector2u & operator &= (Value s);
Vector2u & operator |= (Value s);
Vector2u & operator ^= (Value s);
Vector2u & operator <<= (Value s);
Vector2u & operator >>= (Value s);
// --------------------------------------------------------------------------------------------
Vector2u & operator ++ () noexcept;
Vector2u & operator -- () noexcept;
Vector2u & operator ++ ();
Vector2u & operator -- ();
// --------------------------------------------------------------------------------------------
Vector2u operator ++ (int) noexcept;
Vector2u operator -- (int) noexcept;
Vector2u operator ++ (int);
Vector2u operator -- (int);
// --------------------------------------------------------------------------------------------
Vector2u operator + (const Vector2u & v) const noexcept;
Vector2u operator + (Value s) const noexcept;
Vector2u operator + (const Vector2u & v) const;
Vector2u operator + (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator - (const Vector2u & v) const noexcept;
Vector2u operator - (Value s) const noexcept;
Vector2u operator - (const Vector2u & v) const;
Vector2u operator - (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator * (const Vector2u & v) const noexcept;
Vector2u operator * (Value s) const noexcept;
Vector2u operator * (const Vector2u & v) const;
Vector2u operator * (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator / (const Vector2u & v) const noexcept;
Vector2u operator / (Value s) const noexcept;
Vector2u operator / (const Vector2u & v) const;
Vector2u operator / (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator % (const Vector2u & v) const noexcept;
Vector2u operator % (Value s) const noexcept;
Vector2u operator % (const Vector2u & v) const;
Vector2u operator % (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator & (const Vector2u & v) const noexcept;
Vector2u operator & (Value s) const noexcept;
Vector2u operator & (const Vector2u & v) const;
Vector2u operator & (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator | (const Vector2u & v) const noexcept;
Vector2u operator | (Value s) const noexcept;
Vector2u operator | (const Vector2u & v) const;
Vector2u operator | (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator ^ (const Vector2u & v) const noexcept;
Vector2u operator ^ (Value s) const noexcept;
Vector2u operator ^ (const Vector2u & v) const;
Vector2u operator ^ (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator << (const Vector2u & v) const noexcept;
Vector2u operator << (Value s) const noexcept;
Vector2u operator << (const Vector2u & v) const;
Vector2u operator << (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator >> (const Vector2u & v) const noexcept;
Vector2u operator >> (Value s) const noexcept;
Vector2u operator >> (const Vector2u & v) const;
Vector2u operator >> (Value s) const;
// --------------------------------------------------------------------------------------------
Vector2u operator + () const noexcept;
Vector2u operator - () const noexcept;
Vector2u operator + () const;
Vector2u operator - () const;
// --------------------------------------------------------------------------------------------
Vector2u operator ~ () const noexcept;
Vector2u operator ~ () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Vector2u & v) const noexcept;
bool operator != (const Vector2u & v) const noexcept;
bool operator < (const Vector2u & v) const noexcept;
bool operator > (const Vector2u & v) const noexcept;
bool operator <= (const Vector2u & v) const noexcept;
bool operator >= (const Vector2u & v) const noexcept;
bool operator == (const Vector2u & v) const;
bool operator != (const Vector2u & v) const;
bool operator < (const Vector2u & v) const;
bool operator > (const Vector2u & v) const;
bool operator <= (const Vector2u & v) const;
bool operator >= (const Vector2u & v) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Vector2u & v) const noexcept;
SQInteger Cmp(const Vector2u & v) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny);
// --------------------------------------------------------------------------------------------
void Set(const Vector2u & v) noexcept;
void Set(const Vector2i & v) noexcept;
void Set(const Vector2f & v) noexcept;
void Set(const Vector2u & v);
void Set(const Vector2i & v);
void Set(const Vector2f & v);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { x = 0, y = 0; }
void Clear() { x = 0, y = 0; }
// --------------------------------------------------------------------------------------------
Vector2u Abs() const noexcept;
Vector2u Abs() const;
};
} // Namespace:: SqMod

View File

@ -16,52 +16,52 @@ const Vector3 Vector3::MAX = Vector3(std::numeric_limits<Vector3::Value>::max())
SQChar Vector3::Delim = ',';
// ------------------------------------------------------------------------------------------------
Vector3::Vector3() noexcept
Vector3::Vector3()
: x(0.0), y(0.0), z(0.0)
{
}
Vector3::Vector3(Value s) noexcept
Vector3::Vector3(Value s)
: x(s), y(s), z(s)
{
}
Vector3::Vector3(Value xv, Value yv, Value zv) noexcept
Vector3::Vector3(Value xv, Value yv, Value zv)
: x(xv), y(yv), z(zv)
{
}
// ------------------------------------------------------------------------------------------------
Vector3::Vector3(const Vector4 & v) noexcept
Vector3::Vector3(const Vector4 & v)
: x(v.x), y(v.y), z(v.z)
{
}
Vector3::Vector3(const Quaternion & q) noexcept
Vector3::Vector3(const Quaternion & q)
: x(q.x), y(q.y), z(q.z)
{
}
// ------------------------------------------------------------------------------------------------
Vector3::Vector3(const SQChar * values, char delim) noexcept
Vector3::Vector3(const SQChar * values, char delim)
: Vector3(GetVector3(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
Vector3::Vector3(const Vector3 & v) noexcept
Vector3::Vector3(const Vector3 & v)
: x(v.x), y(v.y), z(v.z)
{
}
Vector3::Vector3(Vector3 && v) noexcept
Vector3::Vector3(Vector3 && v)
: x(v.x), y(v.y), z(v.z)
{
@ -74,7 +74,7 @@ Vector3::~Vector3()
}
// ------------------------------------------------------------------------------------------------
Vector3 & Vector3::operator = (const Vector3 & v) noexcept
Vector3 & Vector3::operator = (const Vector3 & v)
{
x = v.x;
y = v.y;
@ -82,7 +82,7 @@ Vector3 & Vector3::operator = (const Vector3 & v) noexcept
return *this;
}
Vector3 & Vector3::operator = (Vector3 && v) noexcept
Vector3 & Vector3::operator = (Vector3 && v)
{
x = v.x;
y = v.y;
@ -91,7 +91,7 @@ Vector3 & Vector3::operator = (Vector3 && v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 & Vector3::operator = (Value s) noexcept
Vector3 & Vector3::operator = (Value s)
{
x = s;
y = s;
@ -99,7 +99,7 @@ Vector3 & Vector3::operator = (Value s) noexcept
return *this;
}
Vector3 & Vector3::operator = (const Vector4 & v) noexcept
Vector3 & Vector3::operator = (const Vector4 & v)
{
x = v.x;
y = v.y;
@ -107,7 +107,7 @@ Vector3 & Vector3::operator = (const Vector4 & v) noexcept
return *this;
}
Vector3 & Vector3::operator = (const Quaternion & q) noexcept
Vector3 & Vector3::operator = (const Quaternion & q)
{
x = q.x;
y = q.y;
@ -116,7 +116,7 @@ Vector3 & Vector3::operator = (const Quaternion & q) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 & Vector3::operator += (const Vector3 & v) noexcept
Vector3 & Vector3::operator += (const Vector3 & v)
{
x += v.x;
y += v.y;
@ -124,7 +124,7 @@ Vector3 & Vector3::operator += (const Vector3 & v) noexcept
return *this;
}
Vector3 & Vector3::operator -= (const Vector3 & v) noexcept
Vector3 & Vector3::operator -= (const Vector3 & v)
{
x -= v.x;
y -= v.y;
@ -132,7 +132,7 @@ Vector3 & Vector3::operator -= (const Vector3 & v) noexcept
return *this;
}
Vector3 & Vector3::operator *= (const Vector3 & v) noexcept
Vector3 & Vector3::operator *= (const Vector3 & v)
{
x *= v.x;
y *= v.y;
@ -140,7 +140,7 @@ Vector3 & Vector3::operator *= (const Vector3 & v) noexcept
return *this;
}
Vector3 & Vector3::operator /= (const Vector3 & v) noexcept
Vector3 & Vector3::operator /= (const Vector3 & v)
{
x /= v.x;
y /= v.y;
@ -148,7 +148,7 @@ Vector3 & Vector3::operator /= (const Vector3 & v) noexcept
return *this;
}
Vector3 & Vector3::operator %= (const Vector3 & v) noexcept
Vector3 & Vector3::operator %= (const Vector3 & v)
{
x = std::fmod(x, v.x);
y = std::fmod(y, v.y);
@ -157,7 +157,7 @@ Vector3 & Vector3::operator %= (const Vector3 & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 & Vector3::operator += (Value s) noexcept
Vector3 & Vector3::operator += (Value s)
{
x += s;
y += s;
@ -165,7 +165,7 @@ Vector3 & Vector3::operator += (Value s) noexcept
return *this;
}
Vector3 & Vector3::operator -= (Value s) noexcept
Vector3 & Vector3::operator -= (Value s)
{
x -= s;
y -= s;
@ -173,7 +173,7 @@ Vector3 & Vector3::operator -= (Value s) noexcept
return *this;
}
Vector3 & Vector3::operator *= (Value s) noexcept
Vector3 & Vector3::operator *= (Value s)
{
x *= s;
y *= s;
@ -181,7 +181,7 @@ Vector3 & Vector3::operator *= (Value s) noexcept
return *this;
}
Vector3 & Vector3::operator /= (Value s) noexcept
Vector3 & Vector3::operator /= (Value s)
{
x /= s;
y /= s;
@ -189,7 +189,7 @@ Vector3 & Vector3::operator /= (Value s) noexcept
return *this;
}
Vector3 & Vector3::operator %= (Value s) noexcept
Vector3 & Vector3::operator %= (Value s)
{
x = std::fmod(x, s);
y = std::fmod(y, s);
@ -198,7 +198,7 @@ Vector3 & Vector3::operator %= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 & Vector3::operator ++ () noexcept
Vector3 & Vector3::operator ++ ()
{
++x;
++y;
@ -206,7 +206,7 @@ Vector3 & Vector3::operator ++ () noexcept
return *this;
}
Vector3 & Vector3::operator -- () noexcept
Vector3 & Vector3::operator -- ()
{
--x;
--y;
@ -215,7 +215,7 @@ Vector3 & Vector3::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 Vector3::operator ++ (int) noexcept
Vector3 Vector3::operator ++ (int)
{
Vector3 state(*this);
++x;
@ -224,7 +224,7 @@ Vector3 Vector3::operator ++ (int) noexcept
return state;
}
Vector3 Vector3::operator -- (int) noexcept
Vector3 Vector3::operator -- (int)
{
Vector3 state(*this);
--x;
@ -234,120 +234,120 @@ Vector3 Vector3::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector3 Vector3::operator + (const Vector3 & v) const noexcept
Vector3 Vector3::operator + (const Vector3 & v) const
{
return Vector3(x + v.x, y + v.y, z + v.z);
}
Vector3 Vector3::operator - (const Vector3 & v) const noexcept
Vector3 Vector3::operator - (const Vector3 & v) const
{
return Vector3(x - v.x, y - v.y, z - v.z);
}
Vector3 Vector3::operator * (const Vector3 & v) const noexcept
Vector3 Vector3::operator * (const Vector3 & v) const
{
return Vector3(x * v.x, y * v.y, z * v.z);
}
Vector3 Vector3::operator / (const Vector3 & v) const noexcept
Vector3 Vector3::operator / (const Vector3 & v) const
{
return Vector3(x / v.x, y / v.y, z / v.z);
}
Vector3 Vector3::operator % (const Vector3 & v) const noexcept
Vector3 Vector3::operator % (const Vector3 & v) const
{
return Vector3(std::fmod(x, v.x), std::fmod(y, v.y), std::fmod(z, v.z));
}
// ------------------------------------------------------------------------------------------------
Vector3 Vector3::operator + (Value s) const noexcept
Vector3 Vector3::operator + (Value s) const
{
return Vector3(x + s, y + s, z + s);
}
Vector3 Vector3::operator - (Value s) const noexcept
Vector3 Vector3::operator - (Value s) const
{
return Vector3(x - s, y - s, z - s);
}
Vector3 Vector3::operator * (Value s) const noexcept
Vector3 Vector3::operator * (Value s) const
{
return Vector3(x * s, y * s, z * s);
}
Vector3 Vector3::operator / (Value s) const noexcept
Vector3 Vector3::operator / (Value s) const
{
return Vector3(x / s, y / s, z / s);
}
Vector3 Vector3::operator % (Value s) const noexcept
Vector3 Vector3::operator % (Value s) const
{
return Vector3(std::fmod(x, s), std::fmod(y, s), std::fmod(z, s));
}
// ------------------------------------------------------------------------------------------------
Vector3 Vector3::operator + () const noexcept
Vector3 Vector3::operator + () const
{
return Vector3(std::fabs(x), std::fabs(y), std::fabs(z));
}
Vector3 Vector3::operator - () const noexcept
Vector3 Vector3::operator - () const
{
return Vector3(-x, -y, -z);
}
// ------------------------------------------------------------------------------------------------
bool Vector3::operator == (const Vector3 & v) const noexcept
bool Vector3::operator == (const Vector3 & v) const
{
return EpsEq(x, v.x) && EpsEq(y, v.y) && EpsEq(z, v.z);
}
bool Vector3::operator != (const Vector3 & v) const noexcept
bool Vector3::operator != (const Vector3 & v) const
{
return !EpsEq(x, v.x) && !EpsEq(y, v.y) && !EpsEq(z, v.z);
}
bool Vector3::operator < (const Vector3 & v) const noexcept
bool Vector3::operator < (const Vector3 & v) const
{
return std::isless(x, v.x) && std::isless(y, v.y) && std::isless(z, v.z);
}
bool Vector3::operator > (const Vector3 & v) const noexcept
bool Vector3::operator > (const Vector3 & v) const
{
return std::isgreater(x, v.x) && std::isgreater(y, v.y) && std::isgreater(z, v.z);
}
bool Vector3::operator <= (const Vector3 & v) const noexcept
bool Vector3::operator <= (const Vector3 & v) const
{
return std::islessequal(x, v.x) && std::islessequal(y, v.y) && std::islessequal(z, v.z);
}
bool Vector3::operator >= (const Vector3 & v) const noexcept
bool Vector3::operator >= (const Vector3 & v) const
{
return std::isgreaterequal(x, v.x) && std::isgreaterequal(y, v.y) && std::isgreaterequal(z, v.z);
}
// ------------------------------------------------------------------------------------------------
SQInteger Vector3::Cmp(const Vector3 & v) const noexcept
SQInteger Vector3::Cmp(const Vector3 & v) const
{
return *this == v ? 0 : (*this > v ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Vector3::ToString() const noexcept
const SQChar * Vector3::ToString() const
{
return ToStringF("%f,%f,%f", x, y, z);
}
// ------------------------------------------------------------------------------------------------
void Vector3::Set(Value ns) noexcept
void Vector3::Set(Value ns)
{
x = ns;
y = ns;
z = ns;
}
void Vector3::Set(Value nx, Value ny, Value nz) noexcept
void Vector3::Set(Value nx, Value ny, Value nz)
{
x = nx;
y = ny;
@ -355,21 +355,21 @@ void Vector3::Set(Value nx, Value ny, Value nz) noexcept
}
// ------------------------------------------------------------------------------------------------
void Vector3::Set(const Vector3 & v) noexcept
void Vector3::Set(const Vector3 & v)
{
x = v.x;
y = v.y;
z = v.z;
}
void Vector3::Set(const Vector4 & v) noexcept
void Vector3::Set(const Vector4 & v)
{
x = v.x;
y = v.y;
z = v.z;
}
void Vector3::Set(const Quaternion & q) noexcept
void Vector3::Set(const Quaternion & q)
{
x = q.x;
y = q.y;
@ -377,20 +377,20 @@ void Vector3::Set(const Quaternion & q) noexcept
}
// ------------------------------------------------------------------------------------------------
void Vector3::Set(const SQChar * values, char delim) noexcept
void Vector3::Set(const SQChar * values, char delim)
{
Set(GetVector3(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Vector3::Generate() noexcept
void Vector3::Generate()
{
x = RandomVal<Value>::Get();
y = RandomVal<Value>::Get();
z = RandomVal<Value>::Get();
}
void Vector3::Generate(Value min, Value max) noexcept
void Vector3::Generate(Value min, Value max)
{
if (max < min)
{
@ -404,7 +404,7 @@ void Vector3::Generate(Value min, Value max) noexcept
}
}
void Vector3::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax) noexcept
void Vector3::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax)
{
if (std::isless(xmax, xmin) || std::isless(ymax, ymin) || std::isless(zmax, zmin))
{
@ -419,7 +419,7 @@ void Vector3::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmi
}
// ------------------------------------------------------------------------------------------------
Vector3 Vector3::Abs() const noexcept
Vector3 Vector3::Abs() const
{
return Vector3(std::fabs(x), std::fabs(y), std::fabs(z));
}

View File

@ -23,87 +23,87 @@ struct Vector3
// --------------------------------------------------------------------------------------------
Value x, y, z;
// --------------------------------------------------------------------------------------------
Vector3() noexcept;
Vector3(Value s) noexcept;
Vector3(Value xv, Value yv, Value zv) noexcept;
Vector3();
Vector3(Value s);
Vector3(Value xv, Value yv, Value zv);
// --------------------------------------------------------------------------------------------
Vector3(const Vector4 & v) noexcept;
Vector3(const Quaternion & q) noexcept;
Vector3(const Vector4 & v);
Vector3(const Quaternion & q);
// --------------------------------------------------------------------------------------------
Vector3(const SQChar * values, char delim) noexcept;
Vector3(const SQChar * values, char delim);
// --------------------------------------------------------------------------------------------
Vector3(const Vector3 & v) noexcept;
Vector3(Vector3 && v) noexcept;
Vector3(const Vector3 & v);
Vector3(Vector3 && v);
// --------------------------------------------------------------------------------------------
~Vector3();
// --------------------------------------------------------------------------------------------
Vector3 & operator = (const Vector3 & v) noexcept;
Vector3 & operator = (Vector3 && v) noexcept;
Vector3 & operator = (const Vector3 & v);
Vector3 & operator = (Vector3 && v);
// --------------------------------------------------------------------------------------------
Vector3 & operator = (Value s) noexcept;
Vector3 & operator = (const Vector4 & v) noexcept;
Vector3 & operator = (const Quaternion & q) noexcept;
Vector3 & operator = (Value s);
Vector3 & operator = (const Vector4 & v);
Vector3 & operator = (const Quaternion & q);
// --------------------------------------------------------------------------------------------
Vector3 & operator += (const Vector3 & v) noexcept;
Vector3 & operator -= (const Vector3 & v) noexcept;
Vector3 & operator *= (const Vector3 & v) noexcept;
Vector3 & operator /= (const Vector3 & v) noexcept;
Vector3 & operator %= (const Vector3 & v) noexcept;
Vector3 & operator += (const Vector3 & v);
Vector3 & operator -= (const Vector3 & v);
Vector3 & operator *= (const Vector3 & v);
Vector3 & operator /= (const Vector3 & v);
Vector3 & operator %= (const Vector3 & v);
// --------------------------------------------------------------------------------------------
Vector3 & operator += (Value s) noexcept;
Vector3 & operator -= (Value s) noexcept;
Vector3 & operator *= (Value s) noexcept;
Vector3 & operator /= (Value s) noexcept;
Vector3 & operator %= (Value s) noexcept;
Vector3 & operator += (Value s);
Vector3 & operator -= (Value s);
Vector3 & operator *= (Value s);
Vector3 & operator /= (Value s);
Vector3 & operator %= (Value s);
// --------------------------------------------------------------------------------------------
Vector3 & operator ++ () noexcept;
Vector3 & operator -- () noexcept;
Vector3 & operator ++ ();
Vector3 & operator -- ();
// --------------------------------------------------------------------------------------------
Vector3 operator ++ (int) noexcept;
Vector3 operator -- (int) noexcept;
Vector3 operator ++ (int);
Vector3 operator -- (int);
// --------------------------------------------------------------------------------------------
Vector3 operator + (const Vector3 & v) const noexcept;
Vector3 operator - (const Vector3 & v) const noexcept;
Vector3 operator * (const Vector3 & v) const noexcept;
Vector3 operator / (const Vector3 & v) const noexcept;
Vector3 operator % (const Vector3 & v) const noexcept;
Vector3 operator + (const Vector3 & v) const;
Vector3 operator - (const Vector3 & v) const;
Vector3 operator * (const Vector3 & v) const;
Vector3 operator / (const Vector3 & v) const;
Vector3 operator % (const Vector3 & v) const;
// --------------------------------------------------------------------------------------------
Vector3 operator + (Value s) const noexcept;
Vector3 operator - (Value s) const noexcept;
Vector3 operator * (Value s) const noexcept;
Vector3 operator / (Value s) const noexcept;
Vector3 operator % (Value s) const noexcept;
Vector3 operator + (Value s) const;
Vector3 operator - (Value s) const;
Vector3 operator * (Value s) const;
Vector3 operator / (Value s) const;
Vector3 operator % (Value s) const;
// --------------------------------------------------------------------------------------------
Vector3 operator + () const noexcept;
Vector3 operator - () const noexcept;
Vector3 operator + () const;
Vector3 operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Vector3 & v) const noexcept;
bool operator != (const Vector3 & v) const noexcept;
bool operator < (const Vector3 & v) const noexcept;
bool operator > (const Vector3 & v) const noexcept;
bool operator <= (const Vector3 & v) const noexcept;
bool operator >= (const Vector3 & v) const noexcept;
bool operator == (const Vector3 & v) const;
bool operator != (const Vector3 & v) const;
bool operator < (const Vector3 & v) const;
bool operator > (const Vector3 & v) const;
bool operator <= (const Vector3 & v) const;
bool operator >= (const Vector3 & v) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Vector3 & v) const noexcept;
SQInteger Cmp(const Vector3 & v) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny, Value nz) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny, Value nz);
// --------------------------------------------------------------------------------------------
void Set(const Vector3 & v) noexcept;
void Set(const Vector4 & v) noexcept;
void Set(const Quaternion & q) noexcept;
void Set(const Vector3 & v);
void Set(const Vector4 & v);
void Set(const Quaternion & q);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, char delim) noexcept;
void Set(const SQChar * values, char delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { x = 0.0, y = 0.0, z = 0.0; }
void Clear() { x = 0.0, y = 0.0, z = 0.0; }
// --------------------------------------------------------------------------------------------
Vector3 Abs() const noexcept;
Vector3 Abs() const;
};
} // Namespace:: SqMod

View File

@ -16,58 +16,58 @@ const Vector4 Vector4::MAX = Vector4(std::numeric_limits<Vector4::Value>::max())
SQChar Vector4::Delim = ',';
// ------------------------------------------------------------------------------------------------
Vector4::Vector4() noexcept
Vector4::Vector4()
: x(0.0), y(0.0), z(0.0), w(0.0)
{
}
Vector4::Vector4(Value s) noexcept
Vector4::Vector4(Value s)
: x(s), y(s), z(s), w(s)
{
}
Vector4::Vector4(Value xv, Value yv, Value zv) noexcept
Vector4::Vector4(Value xv, Value yv, Value zv)
: x(xv), y(yv), z(zv), w(0.0)
{
}
Vector4::Vector4(Value xv, Value yv, Value zv, Value wv) noexcept
Vector4::Vector4(Value xv, Value yv, Value zv, Value wv)
: x(xv), y(yv), z(zv), w(wv)
{
}
// ------------------------------------------------------------------------------------------------
Vector4::Vector4(const Vector3 & v) noexcept
Vector4::Vector4(const Vector3 & v)
: x(v.x), y(v.y), z(v.z), w(0.0)
{
}
Vector4::Vector4(const Quaternion & q) noexcept
Vector4::Vector4(const Quaternion & q)
: x(q.x), y(q.y), z(q.z), w(q.w)
{
}
// ------------------------------------------------------------------------------------------------
Vector4::Vector4(const SQChar * values, SQChar delim) noexcept
Vector4::Vector4(const SQChar * values, SQChar delim)
: Vector4(GetVector4(values, delim))
{
}
// ------------------------------------------------------------------------------------------------
Vector4::Vector4(const Vector4 & v) noexcept
Vector4::Vector4(const Vector4 & v)
: x(v.x), y(v.y), z(v.z), w(v.w)
{
}
Vector4::Vector4(Vector4 && v) noexcept
Vector4::Vector4(Vector4 && v)
: x(v.x), y(v.y), z(v.z), w(v.w)
{
@ -80,7 +80,7 @@ Vector4::~Vector4()
}
// ------------------------------------------------------------------------------------------------
Vector4 & Vector4::operator = (const Vector4 & v) noexcept
Vector4 & Vector4::operator = (const Vector4 & v)
{
x = v.x;
y = v.y;
@ -89,7 +89,7 @@ Vector4 & Vector4::operator = (const Vector4 & v) noexcept
return *this;
}
Vector4 & Vector4::operator = (Vector4 && v) noexcept
Vector4 & Vector4::operator = (Vector4 && v)
{
x = v.x;
y = v.y;
@ -99,7 +99,7 @@ Vector4 & Vector4::operator = (Vector4 && v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector4 & Vector4::operator = (Value s) noexcept
Vector4 & Vector4::operator = (Value s)
{
x = s;
y = s;
@ -108,7 +108,7 @@ Vector4 & Vector4::operator = (Value s) noexcept
return *this;
}
Vector4 & Vector4::operator = (const Vector3 & v) noexcept
Vector4 & Vector4::operator = (const Vector3 & v)
{
x = v.x;
y = v.y;
@ -117,7 +117,7 @@ Vector4 & Vector4::operator = (const Vector3 & v) noexcept
return *this;
}
Vector4 & Vector4::operator = (const Quaternion & q) noexcept
Vector4 & Vector4::operator = (const Quaternion & q)
{
x = q.x;
y = q.y;
@ -127,7 +127,7 @@ Vector4 & Vector4::operator = (const Quaternion & q) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector4 & Vector4::operator += (const Vector4 & v) noexcept
Vector4 & Vector4::operator += (const Vector4 & v)
{
x += v.x;
y += v.y;
@ -136,7 +136,7 @@ Vector4 & Vector4::operator += (const Vector4 & v) noexcept
return *this;
}
Vector4 & Vector4::operator -= (const Vector4 & v) noexcept
Vector4 & Vector4::operator -= (const Vector4 & v)
{
x -= v.x;
y -= v.y;
@ -145,7 +145,7 @@ Vector4 & Vector4::operator -= (const Vector4 & v) noexcept
return *this;
}
Vector4 & Vector4::operator *= (const Vector4 & v) noexcept
Vector4 & Vector4::operator *= (const Vector4 & v)
{
x *= v.x;
y *= v.y;
@ -154,7 +154,7 @@ Vector4 & Vector4::operator *= (const Vector4 & v) noexcept
return *this;
}
Vector4 & Vector4::operator /= (const Vector4 & v) noexcept
Vector4 & Vector4::operator /= (const Vector4 & v)
{
x /= v.x;
y /= v.y;
@ -163,7 +163,7 @@ Vector4 & Vector4::operator /= (const Vector4 & v) noexcept
return *this;
}
Vector4 & Vector4::operator %= (const Vector4 & v) noexcept
Vector4 & Vector4::operator %= (const Vector4 & v)
{
x = std::fmod(x, v.x);
y = std::fmod(y, v.y);
@ -173,7 +173,7 @@ Vector4 & Vector4::operator %= (const Vector4 & v) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector4 & Vector4::operator += (Value s) noexcept
Vector4 & Vector4::operator += (Value s)
{
x += s;
y += s;
@ -182,7 +182,7 @@ Vector4 & Vector4::operator += (Value s) noexcept
return *this;
}
Vector4 & Vector4::operator -= (Value s) noexcept
Vector4 & Vector4::operator -= (Value s)
{
x -= s;
y -= s;
@ -191,7 +191,7 @@ Vector4 & Vector4::operator -= (Value s) noexcept
return *this;
}
Vector4 & Vector4::operator *= (Value s) noexcept
Vector4 & Vector4::operator *= (Value s)
{
x *= s;
y *= s;
@ -200,7 +200,7 @@ Vector4 & Vector4::operator *= (Value s) noexcept
return *this;
}
Vector4 & Vector4::operator /= (Value s) noexcept
Vector4 & Vector4::operator /= (Value s)
{
x /= s;
y /= s;
@ -209,7 +209,7 @@ Vector4 & Vector4::operator /= (Value s) noexcept
return *this;
}
Vector4 & Vector4::operator %= (Value s) noexcept
Vector4 & Vector4::operator %= (Value s)
{
x = std::fmod(x, s);
y = std::fmod(y, s);
@ -219,7 +219,7 @@ Vector4 & Vector4::operator %= (Value s) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector4 & Vector4::operator ++ () noexcept
Vector4 & Vector4::operator ++ ()
{
++x;
++y;
@ -228,7 +228,7 @@ Vector4 & Vector4::operator ++ () noexcept
return *this;
}
Vector4 & Vector4::operator -- () noexcept
Vector4 & Vector4::operator -- ()
{
--x;
--y;
@ -238,7 +238,7 @@ Vector4 & Vector4::operator -- () noexcept
}
// ------------------------------------------------------------------------------------------------
Vector4 Vector4::operator ++ (int) noexcept
Vector4 Vector4::operator ++ (int)
{
Vector4 state(*this);
++x;
@ -248,7 +248,7 @@ Vector4 Vector4::operator ++ (int) noexcept
return state;
}
Vector4 Vector4::operator -- (int) noexcept
Vector4 Vector4::operator -- (int)
{
Vector4 state(*this);
--x;
@ -259,113 +259,113 @@ Vector4 Vector4::operator -- (int) noexcept
}
// ------------------------------------------------------------------------------------------------
Vector4 Vector4::operator + (const Vector4 & v) const noexcept
Vector4 Vector4::operator + (const Vector4 & v) const
{
return Vector4(x + v.x, y + v.y, z + v.z, w + v.w);
}
Vector4 Vector4::operator - (const Vector4 & v) const noexcept
Vector4 Vector4::operator - (const Vector4 & v) const
{
return Vector4(x - v.x, y - v.y, z - v.z, w - v.w);
}
Vector4 Vector4::operator * (const Vector4 & v) const noexcept
Vector4 Vector4::operator * (const Vector4 & v) const
{
return Vector4(x * v.x, y * v.y, z * v.z, w * v.w);
}
Vector4 Vector4::operator / (const Vector4 & v) const noexcept
Vector4 Vector4::operator / (const Vector4 & v) const
{
return Vector4(x / v.x, y / v.y, z / v.z, w / v.w);
}
Vector4 Vector4::operator % (const Vector4 & v) const noexcept
Vector4 Vector4::operator % (const Vector4 & v) const
{
return Vector4(std::fmod(x, v.x), std::fmod(y, v.y), std::fmod(z, v.z), std::fmod(w, v.w));
}
// ------------------------------------------------------------------------------------------------
Vector4 Vector4::operator + (Value s) const noexcept
Vector4 Vector4::operator + (Value s) const
{
return Vector4(x + s, y + s, z + s, w + s);
}
Vector4 Vector4::operator - (Value s) const noexcept
Vector4 Vector4::operator - (Value s) const
{
return Vector4(x - s, y - s, z - s, w - s);
}
Vector4 Vector4::operator * (Value s) const noexcept
Vector4 Vector4::operator * (Value s) const
{
return Vector4(x * s, y * s, z * s, w * s);
}
Vector4 Vector4::operator / (Value s) const noexcept
Vector4 Vector4::operator / (Value s) const
{
return Vector4(x / s, y / s, z / s, w / s);
}
Vector4 Vector4::operator % (Value s) const noexcept
Vector4 Vector4::operator % (Value s) const
{
return Vector4(std::fmod(x, s), std::fmod(y, s), std::fmod(z, s), std::fmod(w, s));
}
// ------------------------------------------------------------------------------------------------
Vector4 Vector4::operator + () const noexcept
Vector4 Vector4::operator + () const
{
return Vector4(std::fabs(x), std::fabs(y), std::fabs(z), std::fabs(w));
}
Vector4 Vector4::operator - () const noexcept
Vector4 Vector4::operator - () const
{
return Vector4(-x, -y, -z, -w);
}
// ------------------------------------------------------------------------------------------------
bool Vector4::operator == (const Vector4 & v) const noexcept
bool Vector4::operator == (const Vector4 & v) const
{
return EpsEq(x, v.x) && EpsEq(y, v.y) && EpsEq(z, v.z) && EpsEq(w, v.w);
}
bool Vector4::operator != (const Vector4 & v) const noexcept
bool Vector4::operator != (const Vector4 & v) const
{
return !EpsEq(x, v.x) && !EpsEq(y, v.y) && !EpsEq(z, v.z) && !EpsEq(w, v.w);
}
bool Vector4::operator < (const Vector4 & v) const noexcept
bool Vector4::operator < (const Vector4 & v) const
{
return std::isless(x, v.x) && std::isless(y, v.y) && std::isless(z, v.z) && std::isless(w, v.w);
}
bool Vector4::operator > (const Vector4 & v) const noexcept
bool Vector4::operator > (const Vector4 & v) const
{
return std::isgreater(x, v.x) && std::isgreater(y, v.y) && std::isgreater(z, v.z) && std::isgreater(w, v.w);
}
bool Vector4::operator <= (const Vector4 & v) const noexcept
bool Vector4::operator <= (const Vector4 & v) const
{
return std::islessequal(x, v.x) && std::islessequal(y, v.y) && std::islessequal(z, v.z) && std::islessequal(w, v.w);
}
bool Vector4::operator >= (const Vector4 & v) const noexcept
bool Vector4::operator >= (const Vector4 & v) const
{
return std::isgreaterequal(x, v.x) && std::isgreaterequal(y, v.y) && std::isgreaterequal(z, v.z) && std::isgreaterequal(w, v.w);
}
// ------------------------------------------------------------------------------------------------
SQInteger Vector4::Cmp(const Vector4 & v) const noexcept
SQInteger Vector4::Cmp(const Vector4 & v) const
{
return *this == v ? 0 : (*this > v ? 1 : -1);
}
// ------------------------------------------------------------------------------------------------
const SQChar * Vector4::ToString() const noexcept
const SQChar * Vector4::ToString() const
{
return ToStringF("%f,%f,%f,%f", x, y, z, w);
}
// ------------------------------------------------------------------------------------------------
void Vector4::Set(Value ns) noexcept
void Vector4::Set(Value ns)
{
x = ns;
y = ns;
@ -373,14 +373,14 @@ void Vector4::Set(Value ns) noexcept
w = ns;
}
void Vector4::Set(Value nx, Value ny, Value nz) noexcept
void Vector4::Set(Value nx, Value ny, Value nz)
{
x = nx;
y = ny;
z = nz;
}
void Vector4::Set(Value nx, Value ny, Value nz, Value nw) noexcept
void Vector4::Set(Value nx, Value ny, Value nz, Value nw)
{
x = nx;
y = ny;
@ -389,7 +389,7 @@ void Vector4::Set(Value nx, Value ny, Value nz, Value nw) noexcept
}
// ------------------------------------------------------------------------------------------------
void Vector4::Set(const Vector4 & v) noexcept
void Vector4::Set(const Vector4 & v)
{
x = v.x;
y = v.y;
@ -397,7 +397,7 @@ void Vector4::Set(const Vector4 & v) noexcept
w = v.w;
}
void Vector4::Set(const Vector3 & v) noexcept
void Vector4::Set(const Vector3 & v)
{
x = v.x;
y = v.y;
@ -405,7 +405,7 @@ void Vector4::Set(const Vector3 & v) noexcept
w = 0.0;
}
void Vector4::Set(const Quaternion & q) noexcept
void Vector4::Set(const Quaternion & q)
{
x = q.x;
y = q.y;
@ -414,13 +414,13 @@ void Vector4::Set(const Quaternion & q) noexcept
}
// ------------------------------------------------------------------------------------------------
void Vector4::Set(const SQChar * values, SQChar delim) noexcept
void Vector4::Set(const SQChar * values, SQChar delim)
{
Set(GetVector4(values, delim));
}
// ------------------------------------------------------------------------------------------------
void Vector4::Generate() noexcept
void Vector4::Generate()
{
x = RandomVal<Value>::Get();
y = RandomVal<Value>::Get();
@ -428,7 +428,7 @@ void Vector4::Generate() noexcept
w = RandomVal<Value>::Get();
}
void Vector4::Generate(Value min, Value max) noexcept
void Vector4::Generate(Value min, Value max)
{
if (max < min)
{
@ -443,7 +443,7 @@ void Vector4::Generate(Value min, Value max) noexcept
}
}
void Vector4::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax) noexcept
void Vector4::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax)
{
if (std::isless(xmax, xmin) || std::isless(ymax, ymin) || std::isless(zmax, zmin) || std::isless(wmax, wmin))
{
@ -459,7 +459,7 @@ void Vector4::Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmi
}
// ------------------------------------------------------------------------------------------------
Vector4 Vector4::Abs() const noexcept
Vector4 Vector4::Abs() const
{
return Vector4(std::fabs(x), std::fabs(y), std::fabs(z), std::fabs(w));
}

View File

@ -23,89 +23,89 @@ struct Vector4
// --------------------------------------------------------------------------------------------
Value x, y, z, w;
// --------------------------------------------------------------------------------------------
Vector4() noexcept;
Vector4(Value s) noexcept;
Vector4(Value xv, Value yv, Value zv) noexcept;
Vector4(Value xv, Value yv, Value zv, Value wv) noexcept;
Vector4();
Vector4(Value s);
Vector4(Value xv, Value yv, Value zv);
Vector4(Value xv, Value yv, Value zv, Value wv);
// --------------------------------------------------------------------------------------------
Vector4(const Vector3 & v) noexcept;
Vector4(const Quaternion & q) noexcept;
Vector4(const Vector3 & v);
Vector4(const Quaternion & q);
// --------------------------------------------------------------------------------------------
Vector4(const SQChar * values, SQChar delim) noexcept;
Vector4(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
Vector4(const Vector4 & v) noexcept;
Vector4(Vector4 && v) noexcept;
Vector4(const Vector4 & v);
Vector4(Vector4 && v);
// --------------------------------------------------------------------------------------------
~Vector4();
// --------------------------------------------------------------------------------------------
Vector4 & operator = (const Vector4 & v) noexcept;
Vector4 & operator = (Vector4 && v) noexcept;
Vector4 & operator = (const Vector4 & v);
Vector4 & operator = (Vector4 && v);
// --------------------------------------------------------------------------------------------
Vector4 & operator = (Value s) noexcept;
Vector4 & operator = (const Vector3 & v) noexcept;
Vector4 & operator = (const Quaternion & q) noexcept;
Vector4 & operator = (Value s);
Vector4 & operator = (const Vector3 & v);
Vector4 & operator = (const Quaternion & q);
// --------------------------------------------------------------------------------------------
Vector4 & operator += (const Vector4 & v) noexcept;
Vector4 & operator -= (const Vector4 & v) noexcept;
Vector4 & operator *= (const Vector4 & v) noexcept;
Vector4 & operator /= (const Vector4 & v) noexcept;
Vector4 & operator %= (const Vector4 & v) noexcept;
Vector4 & operator += (const Vector4 & v);
Vector4 & operator -= (const Vector4 & v);
Vector4 & operator *= (const Vector4 & v);
Vector4 & operator /= (const Vector4 & v);
Vector4 & operator %= (const Vector4 & v);
// --------------------------------------------------------------------------------------------
Vector4 & operator += (Value s) noexcept;
Vector4 & operator -= (Value s) noexcept;
Vector4 & operator *= (Value s) noexcept;
Vector4 & operator /= (Value s) noexcept;
Vector4 & operator %= (Value s) noexcept;
Vector4 & operator += (Value s);
Vector4 & operator -= (Value s);
Vector4 & operator *= (Value s);
Vector4 & operator /= (Value s);
Vector4 & operator %= (Value s);
// --------------------------------------------------------------------------------------------
Vector4 & operator ++ () noexcept;
Vector4 & operator -- () noexcept;
Vector4 & operator ++ ();
Vector4 & operator -- ();
// --------------------------------------------------------------------------------------------
Vector4 operator ++ (int) noexcept;
Vector4 operator -- (int) noexcept;
Vector4 operator ++ (int);
Vector4 operator -- (int);
// --------------------------------------------------------------------------------------------
Vector4 operator + (const Vector4 & v) const noexcept;
Vector4 operator - (const Vector4 & v) const noexcept;
Vector4 operator * (const Vector4 & v) const noexcept;
Vector4 operator / (const Vector4 & v) const noexcept;
Vector4 operator % (const Vector4 & v) const noexcept;
Vector4 operator + (const Vector4 & v) const;
Vector4 operator - (const Vector4 & v) const;
Vector4 operator * (const Vector4 & v) const;
Vector4 operator / (const Vector4 & v) const;
Vector4 operator % (const Vector4 & v) const;
// --------------------------------------------------------------------------------------------
Vector4 operator + (Value s) const noexcept;
Vector4 operator - (Value s) const noexcept;
Vector4 operator * (Value s) const noexcept;
Vector4 operator / (Value s) const noexcept;
Vector4 operator % (Value s) const noexcept;
Vector4 operator + (Value s) const;
Vector4 operator - (Value s) const;
Vector4 operator * (Value s) const;
Vector4 operator / (Value s) const;
Vector4 operator % (Value s) const;
// --------------------------------------------------------------------------------------------
Vector4 operator + () const noexcept;
Vector4 operator - () const noexcept;
Vector4 operator + () const;
Vector4 operator - () const;
// --------------------------------------------------------------------------------------------
bool operator == (const Vector4 & v) const noexcept;
bool operator != (const Vector4 & v) const noexcept;
bool operator < (const Vector4 & v) const noexcept;
bool operator > (const Vector4 & v) const noexcept;
bool operator <= (const Vector4 & v) const noexcept;
bool operator >= (const Vector4 & v) const noexcept;
bool operator == (const Vector4 & v) const;
bool operator != (const Vector4 & v) const;
bool operator < (const Vector4 & v) const;
bool operator > (const Vector4 & v) const;
bool operator <= (const Vector4 & v) const;
bool operator >= (const Vector4 & v) const;
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const Vector4 & v) const noexcept;
SQInteger Cmp(const Vector4 & v) const;
// --------------------------------------------------------------------------------------------
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
// --------------------------------------------------------------------------------------------
void Set(Value ns) noexcept;
void Set(Value nx, Value ny, Value nz) noexcept;
void Set(Value nx, Value ny, Value nz, Value nw) noexcept;
void Set(Value ns);
void Set(Value nx, Value ny, Value nz);
void Set(Value nx, Value ny, Value nz, Value nw);
// --------------------------------------------------------------------------------------------
void Set(const Vector4 & v) noexcept;
void Set(const Vector3 & v) noexcept;
void Set(const Quaternion & q) noexcept;
void Set(const Vector4 & v);
void Set(const Vector3 & v);
void Set(const Quaternion & q);
// --------------------------------------------------------------------------------------------
void Set(const SQChar * values, SQChar delim) noexcept;
void Set(const SQChar * values, SQChar delim);
// --------------------------------------------------------------------------------------------
void Generate() noexcept;
void Generate(Value min, Value max) noexcept;
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax) noexcept;
void Generate();
void Generate(Value min, Value max);
void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value zmin, Value zmax, Value wmin, Value wmax);
// --------------------------------------------------------------------------------------------
void Clear() noexcept { x = 0.0, y = 0.0, z = 0.0, w = 0.0; }
void Clear() { x = 0.0, y = 0.0, z = 0.0, w = 0.0; }
// --------------------------------------------------------------------------------------------
Vector4 Abs() const noexcept;
Vector4 Abs() const;
};
} // Namespace:: SqMod

View File

@ -18,7 +18,7 @@ PluginCallbacks* _Clbk = 0;
PluginInfo* _Info = 0;
// ------------------------------------------------------------------------------------------------
void BindCallbacks() noexcept;
void BindCallbacks();
// ------------------------------------------------------------------------------------------------
SQMOD_API_EXPORT unsigned int VcmpPluginInit(PluginFuncs * funcs, PluginCallbacks * calls, PluginInfo * info)
@ -85,7 +85,7 @@ SQMOD_API_EXPORT unsigned int VcmpPluginInit(PluginFuncs * funcs, PluginCallback
}
// --------------------------------------------------------------------------------------------
static int VC_InitServer(void) noexcept
static int VC_InitServer(void)
{
if (_Core->Load())
{
@ -98,61 +98,61 @@ static int VC_InitServer(void) noexcept
return _Core->GetState();
}
static void VC_ShutdownServer(void) noexcept
static void VC_ShutdownServer(void)
{
_Core->OnServerShutdown();
_Core->Terminate();
}
static void VC_Frame(float delta) noexcept
static void VC_Frame(float delta)
{
_Core->OnServerFrame(delta);
}
static void VC_PlayerConnect(int player) noexcept
static void VC_PlayerConnect(int player)
{
static SqObj playload;
playload.Release();
_Core->ConnectPlayer(player, SQMOD_CREATE_AUTOMATIC, playload);
}
static void VC_PlayerDisconnect(int player, int reason) noexcept
static void VC_PlayerDisconnect(int player, int reason)
{
static SqObj playload;
playload.Release();
_Core->DisconnectPlayer(player, reason, playload);
}
static void VC_PlayerBeginTyping(int player) noexcept
static void VC_PlayerBeginTyping(int player)
{
_Core->OnPlayerStartTyping(player);
}
static void VC_PlayerEndTyping(int player) noexcept
static void VC_PlayerEndTyping(int player)
{
_Core->OnPlayerStopTyping(player);
}
static int VC_PlayerRequestClass(int player, int offset) noexcept
static int VC_PlayerRequestClass(int player, int offset)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPlayerRequestClass(player, offset);
return _Core->GetState();
}
static int VC_PlayerRequestSpawn(int player) noexcept
static int VC_PlayerRequestSpawn(int player)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPlayerRequestSpawn(player);
return _Core->GetState();
}
static void VC_PlayerSpawn(int player) noexcept
static void VC_PlayerSpawn(int player)
{
_Core->OnPlayerSpawn(player);
}
static void VC_PlayerDeath(int player, int killer, int reason, int body_part) noexcept
static void VC_PlayerDeath(int player, int killer, int reason, int body_part)
{
if (_Func->IsPlayerConnected(killer))
{
@ -164,136 +164,136 @@ static void VC_PlayerDeath(int player, int killer, int reason, int body_part) no
}
}
static void VC_PlayerUpdate(int player, int type) noexcept
static void VC_PlayerUpdate(int player, int type)
{
_Core->OnPlayerUpdate(player, type);
}
static int VC_PlayerRequestEnter(int player, int vehicle, int slot) noexcept
static int VC_PlayerRequestEnter(int player, int vehicle, int slot)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPlayerEmbarking(player, vehicle, slot);
return _Core->GetState();
}
static void VC_PlayerEnterVehicle(int player, int vehicle, int slot) noexcept
static void VC_PlayerEnterVehicle(int player, int vehicle, int slot)
{
_Core->OnPlayerEmbarked(player, vehicle, slot);
}
static void VC_PlayerExitVehicle(int player, int vehicle) noexcept
static void VC_PlayerExitVehicle(int player, int vehicle)
{
_Core->OnPlayerDisembark(player, vehicle);
}
static int VC_PickupClaimPicked(int pickup, int player) noexcept
static int VC_PickupClaimPicked(int pickup, int player)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPickupClaimed(player, pickup);
return _Core->GetState();
}
static void VC_PickupPickedUp(int pickup, int player) noexcept
static void VC_PickupPickedUp(int pickup, int player)
{
_Core->OnPickupCollected(player, pickup);
}
static void VC_PickupRespawn(int pickup) noexcept
static void VC_PickupRespawn(int pickup)
{
_Core->OnPickupRespawn(pickup);
}
static void VC_VehicleUpdate(int vehicle, int type) noexcept
static void VC_VehicleUpdate(int vehicle, int type)
{
_Core->OnVehicleUpdate(vehicle, type);
}
static void VC_VehicleExplode(int vehicle) noexcept
static void VC_VehicleExplode(int vehicle)
{
_Core->OnVehicleExplode(vehicle);
}
static void VC_VehicleRespawn(int vehicle) noexcept
static void VC_VehicleRespawn(int vehicle)
{
_Core->OnVehicleRespawn(vehicle);
}
static void VC_ObjectShot(int object, int player, int weapon) noexcept
static void VC_ObjectShot(int object, int player, int weapon)
{
_Core->OnObjectShot(player, object, weapon);
}
static void VC_ObjectBump(int object, int player) noexcept
static void VC_ObjectBump(int object, int player)
{
_Core->OnObjectBump(player, object);
}
static int VC_PublicMessage(int player, const char * text) noexcept
static int VC_PublicMessage(int player, const char * text)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPlayerChat(player, static_cast<const SQChar *>(text));
return _Core->GetState();
}
static int VC_CommandMessage(int player, const char * text) noexcept
static int VC_CommandMessage(int player, const char * text)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPlayerCommand(player, static_cast<const SQChar *>(text));
return _Core->GetState();
}
static int VC_PrivateMessage(int player, int target, const char * text) noexcept
static int VC_PrivateMessage(int player, int target, const char * text)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnPlayerMessage(player, target, static_cast<const SQChar *>(text));
return _Core->GetState();
}
static int VC_InternalCommand(unsigned int type, const char * text) noexcept
static int VC_InternalCommand(unsigned int type, const char * text)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnInternalCommand(type, static_cast<const SQChar *>(text));
return _Core->GetState();
}
static int VC_LoginAttempt(char * name, const char * passwd, const char * address) noexcept
static int VC_LoginAttempt(char * name, const char * passwd, const char * address)
{
_Core->SetState(SQMOD_SUCCESS);
_Core->OnLoginAttempt(static_cast<const SQChar *>(name), static_cast<const SQChar *>(passwd), static_cast<const SQChar *>(address));
return _Core->GetState();
}
static void VC_EntityPool(int type, int id, unsigned int deleted) noexcept
static void VC_EntityPool(int type, int id, unsigned int deleted)
{
_Core->OnEntityPool(type, id, static_cast<bool>(deleted));
}
static void VC_KeyBindDown(int player, int bind) noexcept
static void VC_KeyBindDown(int player, int bind)
{
_Core->OnPlayerKeyPress(player, bind);
}
static void VC_KeyBindUp(int player, int bind) noexcept
static void VC_KeyBindUp(int player, int bind)
{
_Core->OnPlayerKeyRelease(player, bind);
}
static void VC_PlayerAway(int player, unsigned int status) noexcept
static void VC_PlayerAway(int player, unsigned int status)
{
_Core->OnPlayerAway(player, static_cast<bool>(status));
}
static void VC_PlayerSpectate(int player, int target) noexcept
static void VC_PlayerSpectate(int player, int target)
{
_Core->OnPlayerSpectate(player, target);
}
static void VC_PlayerCrashReport(int player, const char * report) noexcept
static void VC_PlayerCrashReport(int player, const char * report)
{
_Core->OnPlayerCrashreport(player, static_cast<const SQChar *>(report));
}
static void VC_ServerPerformanceReport(int count, const char ** description, unsigned long long * millis) noexcept
static void VC_ServerPerformanceReport(int count, const char ** description, unsigned long long * millis)
{
// Ignored for now...
SQMOD_UNUSED_VAR(count);
@ -301,12 +301,12 @@ static void VC_ServerPerformanceReport(int count, const char ** description, uns
SQMOD_UNUSED_VAR(millis);
}
static void VC_PlayerName(int player, const char * previous, const char * current) noexcept
static void VC_PlayerName(int player, const char * previous, const char * current)
{
_Core->OnPlayerName(player, static_cast<const SQChar *>(previous), static_cast<const SQChar *>(current));
}
static void VC_PlayerState(int player, int previous, int current) noexcept
static void VC_PlayerState(int player, int previous, int current)
{
_Core->OnPlayerState(player, previous, current);
@ -342,7 +342,7 @@ static void VC_PlayerState(int player, int previous, int current) noexcept
}
}
static void VC_PlayerAction(int player, int previous, int current) noexcept
static void VC_PlayerAction(int player, int previous, int current)
{
_Core->OnPlayerAction(player, previous, current);
@ -390,43 +390,43 @@ static void VC_PlayerAction(int player, int previous, int current) noexcept
}
}
static void VC_PlayerOnFire(int player, unsigned int state) noexcept
static void VC_PlayerOnFire(int player, unsigned int state)
{
_Core->OnPlayerBurning(player, static_cast<bool>(state));
}
static void VC_PlayerCrouch(int player, unsigned int state) noexcept
static void VC_PlayerCrouch(int player, unsigned int state)
{
_Core->OnPlayerCrouching(player, static_cast<bool>(state));
}
static void VC_PlayerGameKeys(int player, int previous, int current) noexcept
static void VC_PlayerGameKeys(int player, int previous, int current)
{
_Core->OnPlayerGameKeys(player, previous, current);
}
static void VC_OnCheckpointEntered(int checkpoint, int player) noexcept
static void VC_OnCheckpointEntered(int checkpoint, int player)
{
_Core->OnCheckpointEntered(player, checkpoint);
}
static void VC_OnCheckpointExited(int checkpoint, int player) noexcept
static void VC_OnCheckpointExited(int checkpoint, int player)
{
_Core->OnCheckpointExited(player, checkpoint);
}
static void VC_OnSphereEntered(int sphere, int player) noexcept
static void VC_OnSphereEntered(int sphere, int player)
{
_Core->OnSphereEntered(player, sphere);
}
static void VC_OnSphereExited(int sphere, int player) noexcept
static void VC_OnSphereExited(int sphere, int player)
{
_Core->OnSphereExited(player, sphere);
}
// ------------------------------------------------------------------------------------------------
void BindCallbacks() noexcept
void BindCallbacks()
{
_Clbk->OnInitServer = VC_InitServer;
_Clbk->OnShutdownServer = VC_ShutdownServer;
@ -476,7 +476,7 @@ void BindCallbacks() noexcept
}
// ------------------------------------------------------------------------------------------------
SqObj & NullData() noexcept
SqObj & NullData()
{
static SqObj d;
d.Release();

View File

@ -31,12 +31,12 @@ extern PluginInfo* _Info;
/* ------------------------------------------------------------------------------------------------
* ...
*/
SqObj & NullData() noexcept;
SqObj & NullData();
/* ------------------------------------------------------------------------------------------------
* Utility used to transform values into script objects on the default VM
*/
template < typename T > SqObj MakeSqObj(const T & v) noexcept
template < typename T > SqObj MakeSqObj(const T & v)
{
// Push the specified value on the stack
Sqrat::PushVar< T >(Sqrat::DefaultVM::Get(), v);
@ -51,7 +51,7 @@ template < typename T > SqObj MakeSqObj(const T & v) noexcept
/* ------------------------------------------------------------------------------------------------
* Utility used to transform values into script objects
*/
template < typename T > SqObj MakeSqObj(HSQUIRRELVM vm, const T & v) noexcept
template < typename T > SqObj MakeSqObj(HSQUIRRELVM vm, const T & v)
{
// Push the specified value on the stack
Sqrat::PushVar< T >(vm, v);

File diff suppressed because it is too large Load Diff

View File

@ -88,21 +88,21 @@ private:
protected:
// --------------------------------------------------------------------------------------------
Core() noexcept;
Core();
// --------------------------------------------------------------------------------------------
~Core() noexcept;
~Core();
// --------------------------------------------------------------------------------------------
Core(Core const &) noexcept = delete;
Core(Core &&) noexcept = delete;
Core(Core const &) = delete;
Core(Core &&) = delete;
// --------------------------------------------------------------------------------------------
Core & operator=(Core const &) noexcept = delete;
Core & operator=(Core &&) noexcept = delete;
Core & operator=(Core const &) = delete;
Core & operator=(Core &&) = delete;
// --------------------------------------------------------------------------------------------
static void _Finalizer(Core * ptr) noexcept;
static void _Finalizer(Core * ptr);
public:
@ -110,71 +110,71 @@ public:
typedef std::unique_ptr<Core, void(*)(Core *)> Pointer;
// --------------------------------------------------------------------------------------------
static Pointer Inst() noexcept;
static Pointer Inst();
// --------------------------------------------------------------------------------------------
bool Init() noexcept;
bool Load() noexcept;
bool Init();
bool Load();
// --------------------------------------------------------------------------------------------
void Deinit() noexcept;
void Unload() noexcept;
void Deinit();
void Unload();
// --------------------------------------------------------------------------------------------
void Terminate() noexcept;
void Terminate();
// --------------------------------------------------------------------------------------------
void SetState(SQInteger val) noexcept;
SQInteger GetState() const noexcept;
void SetState(SQInteger val);
SQInteger GetState() const;
// --------------------------------------------------------------------------------------------
String GetOption(const String & name) const noexcept;
void SetOption(const String & name, const String & value) noexcept;
String GetOption(const String & name) const;
void SetOption(const String & name, const String & value);
// --------------------------------------------------------------------------------------------
Buffer PullBuffer(unsigned sz = 4096) noexcept;
void PushBuffer(Buffer && buf) noexcept;
void MakeBuffer(unsigned num, unsigned sz = 4096) noexcept;
Buffer PullBuffer(unsigned sz = 4096);
void PushBuffer(Buffer && buf);
void MakeBuffer(unsigned num, unsigned sz = 4096);
// --------------------------------------------------------------------------------------------
void ConnectPlayer(SQInt32 id, SQInt32 header, SqObj & payload) noexcept;
void DisconnectPlayer(SQInt32 id, SQInt32 header, SqObj & payload) noexcept;
void ConnectPlayer(SQInt32 id, SQInt32 header, SqObj & payload);
void DisconnectPlayer(SQInt32 id, SQInt32 header, SqObj & payload);
protected:
// --------------------------------------------------------------------------------------------
bool Configure() noexcept;
bool Configure();
// --------------------------------------------------------------------------------------------
bool CreateVM() noexcept;
void DestroyVM() noexcept;
bool CreateVM();
void DestroyVM();
// --------------------------------------------------------------------------------------------
bool LoadScripts() noexcept;
bool LoadScripts();
// --------------------------------------------------------------------------------------------
bool Compile(const String & name) noexcept;
bool Execute() noexcept;
bool Compile(const String & name);
bool Execute();
// --------------------------------------------------------------------------------------------
void PrintCallstack() noexcept;
void PrintCallstack();
public:
// --------------------------------------------------------------------------------------------
static void PrintFunc(HSQUIRRELVM vm, const SQChar * str, ...) noexcept;
static void ErrorFunc(HSQUIRRELVM vm, const SQChar * str, ...) noexcept;
static void PrintFunc(HSQUIRRELVM vm, const SQChar * str, ...);
static void ErrorFunc(HSQUIRRELVM vm, const SQChar * str, ...);
// --------------------------------------------------------------------------------------------
static SQInteger RuntimeErrorHandler(HSQUIRRELVM vm) noexcept;
static void CompilerErrorHandler(HSQUIRRELVM vm, const SQChar * desc, const SQChar * src, SQInteger line, SQInteger column) noexcept;
static SQInteger RuntimeErrorHandler(HSQUIRRELVM vm);
static void CompilerErrorHandler(HSQUIRRELVM vm, const SQChar * desc, const SQChar * src, SQInteger line, SQInteger column);
protected:
/* --------------------------------------------------------------------------------------------
* Destroys a Player created by the server
*/
bool DestroyPlayer(SQInt32 id, SQInt32 header, SqObj & payload) noexcept;
bool DestroyPlayer(SQInt32 id, SQInt32 header, SqObj & payload);
public:
@ -183,237 +183,237 @@ public:
*/
Reference< CBlip > NewBlip(SQInt32 index, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
SQInt32 scale, SQUint32 color, SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Checkpoint on the server
*/
Reference< CCheckpoint > NewCheckpoint(SQInt32 player, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Keybind on the server
*/
Reference< CKeybind > NewKeybind(SQInt32 slot, bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Object on the server
*/
Reference< CObject > NewObject(SQInt32 model, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Pickup on the server
*/
Reference< CPickup > NewPickup(SQInt32 model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Sphere on the server
*/
Reference< CSphere > NewSphere(SQInt32 player, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Sprite on the server
*/
Reference< CSprite > NewSprite(SQInt32 index, const SQChar * file, SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr, SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Textdraw on the server
*/
Reference< CTextdraw > NewTextdraw(SQInt32 index, const SQChar * text, SQInt32 xp, SQInt32 yp,
SQUint32 color, bool rel,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Creates a new Vehicle on the server
*/
Reference< CVehicle > NewVehicle(SQInt32 model, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept;
SQInt32 header, SqObj & payload);
public:
// --------------------------------------------------------------------------------------------
void OnBlipCreated(SQInt32 blip, SQInt32 header, SqObj & payload) noexcept;
void OnCheckpointCreated(SQInt32 checkpoint, SQInt32 header, SqObj & payload) noexcept;
void OnKeybindCreated(SQInt32 keybind, SQInt32 header, SqObj & payload) noexcept;
void OnObjectCreated(SQInt32 object, SQInt32 header, SqObj & payload) noexcept;
void OnPickupCreated(SQInt32 pickup, SQInt32 header, SqObj & payload) noexcept;
void OnPlayerCreated(SQInt32 player, SQInt32 header, SqObj & payload) noexcept;
void OnSphereCreated(SQInt32 sphere, SQInt32 header, SqObj & payload) noexcept;
void OnSpriteCreated(SQInt32 sprite, SQInt32 header, SqObj & payload) noexcept;
void OnTextdrawCreated(SQInt32 textdraw, SQInt32 header, SqObj & payload) noexcept;
void OnVehicleCreated(SQInt32 vehicle, SQInt32 header, SqObj & payload) noexcept;
void OnBlipCreated(SQInt32 blip, SQInt32 header, SqObj & payload);
void OnCheckpointCreated(SQInt32 checkpoint, SQInt32 header, SqObj & payload);
void OnKeybindCreated(SQInt32 keybind, SQInt32 header, SqObj & payload);
void OnObjectCreated(SQInt32 object, SQInt32 header, SqObj & payload);
void OnPickupCreated(SQInt32 pickup, SQInt32 header, SqObj & payload);
void OnPlayerCreated(SQInt32 player, SQInt32 header, SqObj & payload);
void OnSphereCreated(SQInt32 sphere, SQInt32 header, SqObj & payload);
void OnSpriteCreated(SQInt32 sprite, SQInt32 header, SqObj & payload);
void OnTextdrawCreated(SQInt32 textdraw, SQInt32 header, SqObj & payload);
void OnVehicleCreated(SQInt32 vehicle, SQInt32 header, SqObj & payload);
// --------------------------------------------------------------------------------------------
void OnBlipDestroyed(SQInt32 blip, SQInt32 header, SqObj & payload) noexcept;
void OnCheckpointDestroyed(SQInt32 checkpoint, SQInt32 header, SqObj & payload) noexcept;
void OnKeybindDestroyed(SQInt32 keybind, SQInt32 header, SqObj & payload) noexcept;
void OnObjectDestroyed(SQInt32 object, SQInt32 header, SqObj & payload) noexcept;
void OnPickupDestroyed(SQInt32 pickup, SQInt32 header, SqObj & payload) noexcept;
void OnPlayerDestroyed(SQInt32 player, SQInt32 header, SqObj & payload) noexcept;
void OnSphereDestroyed(SQInt32 sphere, SQInt32 header, SqObj & payload) noexcept;
void OnSpriteDestroyed(SQInt32 sprite, SQInt32 header, SqObj & payload) noexcept;
void OnTextdrawDestroyed(SQInt32 textdraw, SQInt32 header, SqObj & payload) noexcept;
void OnVehicleDestroyed(SQInt32 vehicle, SQInt32 header, SqObj & payload) noexcept;
void OnBlipDestroyed(SQInt32 blip, SQInt32 header, SqObj & payload);
void OnCheckpointDestroyed(SQInt32 checkpoint, SQInt32 header, SqObj & payload);
void OnKeybindDestroyed(SQInt32 keybind, SQInt32 header, SqObj & payload);
void OnObjectDestroyed(SQInt32 object, SQInt32 header, SqObj & payload);
void OnPickupDestroyed(SQInt32 pickup, SQInt32 header, SqObj & payload);
void OnPlayerDestroyed(SQInt32 player, SQInt32 header, SqObj & payload);
void OnSphereDestroyed(SQInt32 sphere, SQInt32 header, SqObj & payload);
void OnSpriteDestroyed(SQInt32 sprite, SQInt32 header, SqObj & payload);
void OnTextdrawDestroyed(SQInt32 textdraw, SQInt32 header, SqObj & payload);
void OnVehicleDestroyed(SQInt32 vehicle, SQInt32 header, SqObj & payload);
// --------------------------------------------------------------------------------------------
void OnBlipCustom(SQInt32 blip, SQInt32 header, SqObj & payload) noexcept;
void OnCheckpointCustom(SQInt32 checkpoint, SQInt32 header, SqObj & payload) noexcept;
void OnKeybindCustom(SQInt32 keybind, SQInt32 header, SqObj & payload) noexcept;
void OnObjectCustom(SQInt32 object, SQInt32 header, SqObj & payload) noexcept;
void OnPickupCustom(SQInt32 pickup, SQInt32 header, SqObj & payload) noexcept;
void OnPlayerCustom(SQInt32 player, SQInt32 header, SqObj & payload) noexcept;
void OnSphereCustom(SQInt32 sphere, SQInt32 header, SqObj & payload) noexcept;
void OnSpriteCustom(SQInt32 sprite, SQInt32 header, SqObj & payload) noexcept;
void OnTextdrawCustom(SQInt32 textdraw, SQInt32 header, SqObj & payload) noexcept;
void OnVehicleCustom(SQInt32 vehicle, SQInt32 header, SqObj & payload) noexcept;
void OnBlipCustom(SQInt32 blip, SQInt32 header, SqObj & payload);
void OnCheckpointCustom(SQInt32 checkpoint, SQInt32 header, SqObj & payload);
void OnKeybindCustom(SQInt32 keybind, SQInt32 header, SqObj & payload);
void OnObjectCustom(SQInt32 object, SQInt32 header, SqObj & payload);
void OnPickupCustom(SQInt32 pickup, SQInt32 header, SqObj & payload);
void OnPlayerCustom(SQInt32 player, SQInt32 header, SqObj & payload);
void OnSphereCustom(SQInt32 sphere, SQInt32 header, SqObj & payload);
void OnSpriteCustom(SQInt32 sprite, SQInt32 header, SqObj & payload);
void OnTextdrawCustom(SQInt32 textdraw, SQInt32 header, SqObj & payload);
void OnVehicleCustom(SQInt32 vehicle, SQInt32 header, SqObj & payload);
// --------------------------------------------------------------------------------------------
void OnPlayerAway(SQInt32 player, bool status) noexcept;
void OnPlayerAway(SQInt32 player, bool status);
// --------------------------------------------------------------------------------------------
void OnPlayerGameKeys(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void OnPlayerName(SQInt32 player, const SQChar * previous, const SQChar * current) noexcept;
void OnPlayerGameKeys(SQInt32 player, SQInt32 previous, SQInt32 current);
void OnPlayerName(SQInt32 player, const SQChar * previous, const SQChar * current);
// --------------------------------------------------------------------------------------------
void OnPlayerRequestClass(SQInt32 player, SQInt32 offset) noexcept;
void OnPlayerRequestSpawn(SQInt32 player) noexcept;
void OnPlayerRequestClass(SQInt32 player, SQInt32 offset);
void OnPlayerRequestSpawn(SQInt32 player);
// --------------------------------------------------------------------------------------------
void OnPlayerSpawn(SQInt32 player) noexcept;
void OnPlayerSpawn(SQInt32 player);
// --------------------------------------------------------------------------------------------
void OnPlayerStartTyping(SQInt32 player) noexcept;
void OnPlayerStopTyping(SQInt32 player) noexcept;
void OnPlayerStartTyping(SQInt32 player);
void OnPlayerStopTyping(SQInt32 player);
// --------------------------------------------------------------------------------------------
void OnPlayerChat(SQInt32 player, const SQChar * message) noexcept;
void OnPlayerCommand(SQInt32 player, const SQChar * command) noexcept;
void OnPlayerMessage(SQInt32 player, SQInt32 receiver, const SQChar * message) noexcept;
void OnPlayerChat(SQInt32 player, const SQChar * message);
void OnPlayerCommand(SQInt32 player, const SQChar * command);
void OnPlayerMessage(SQInt32 player, SQInt32 receiver, const SQChar * message);
// --------------------------------------------------------------------------------------------
void OnPlayerHealth(SQInt32 player, SQFloat previous, SQFloat current) noexcept;
void OnPlayerArmour(SQInt32 player, SQFloat previous, SQFloat current) noexcept;
void OnPlayerWeapon(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void OnPlayerMove(SQInt32 player, const Vector3 & previous, const Vector3 & current) noexcept;
void OnPlayerHealth(SQInt32 player, SQFloat previous, SQFloat current);
void OnPlayerArmour(SQInt32 player, SQFloat previous, SQFloat current);
void OnPlayerWeapon(SQInt32 player, SQInt32 previous, SQInt32 current);
void OnPlayerMove(SQInt32 player, const Vector3 & previous, const Vector3 & current);
// --------------------------------------------------------------------------------------------
void OnPlayerWasted(SQInt32 player, SQInt32 reason) noexcept;
void OnPlayerKilled(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part) noexcept;
void OnPlayerWasted(SQInt32 player, SQInt32 reason);
void OnPlayerKilled(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part);
// --------------------------------------------------------------------------------------------
void OnPlayerSpectate(SQInt32 player, SQInt32 target) noexcept;
void OnPlayerCrashreport(SQInt32 player, const SQChar * report) noexcept;
void OnPlayerSpectate(SQInt32 player, SQInt32 target);
void OnPlayerCrashreport(SQInt32 player, const SQChar * report);
// --------------------------------------------------------------------------------------------
void OnPlayerBurning(SQInt32 player, bool state) noexcept;
void OnPlayerCrouching(SQInt32 player, bool state) noexcept;
void OnPlayerBurning(SQInt32 player, bool state);
void OnPlayerCrouching(SQInt32 player, bool state);
// --------------------------------------------------------------------------------------------
void OnPlayerState(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void OnPlayerAction(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void OnPlayerState(SQInt32 player, SQInt32 previous, SQInt32 current);
void OnPlayerAction(SQInt32 player, SQInt32 previous, SQInt32 current);
// --------------------------------------------------------------------------------------------
void OnStateNone(SQInt32 player, SQInt32 previous) noexcept;
void OnStateNormal(SQInt32 player, SQInt32 previous) noexcept;
void OnStateShooting(SQInt32 player, SQInt32 previous) noexcept;
void OnStateDriver(SQInt32 player, SQInt32 previous) noexcept;
void OnStatePassenger(SQInt32 player, SQInt32 previous) noexcept;
void OnStateEnterDriver(SQInt32 player, SQInt32 previous) noexcept;
void OnStateEnterPassenger(SQInt32 player, SQInt32 previous) noexcept;
void OnStateExitVehicle(SQInt32 player, SQInt32 previous) noexcept;
void OnStateUnspawned(SQInt32 player, SQInt32 previous) noexcept;
void OnStateNone(SQInt32 player, SQInt32 previous);
void OnStateNormal(SQInt32 player, SQInt32 previous);
void OnStateShooting(SQInt32 player, SQInt32 previous);
void OnStateDriver(SQInt32 player, SQInt32 previous);
void OnStatePassenger(SQInt32 player, SQInt32 previous);
void OnStateEnterDriver(SQInt32 player, SQInt32 previous);
void OnStateEnterPassenger(SQInt32 player, SQInt32 previous);
void OnStateExitVehicle(SQInt32 player, SQInt32 previous);
void OnStateUnspawned(SQInt32 player, SQInt32 previous);
// --------------------------------------------------------------------------------------------
void OnActionNone(SQInt32 player, SQInt32 previous) noexcept;
void OnActionNormal(SQInt32 player, SQInt32 previous) noexcept;
void OnActionAiming(SQInt32 player, SQInt32 previous) noexcept;
void OnActionShooting(SQInt32 player, SQInt32 previous) noexcept;
void OnActionJumping(SQInt32 player, SQInt32 previous) noexcept;
void OnActionLieDown(SQInt32 player, SQInt32 previous) noexcept;
void OnActionGettingUp(SQInt32 player, SQInt32 previous) noexcept;
void OnActionJumpVehicle(SQInt32 player, SQInt32 previous) noexcept;
void OnActionDriving(SQInt32 player, SQInt32 previous) noexcept;
void OnActionDying(SQInt32 player, SQInt32 previous) noexcept;
void OnActionWasted(SQInt32 player, SQInt32 previous) noexcept;
void OnActionEmbarking(SQInt32 player, SQInt32 previous) noexcept;
void OnActionDisembarking(SQInt32 player, SQInt32 previous) noexcept;
void OnActionNone(SQInt32 player, SQInt32 previous);
void OnActionNormal(SQInt32 player, SQInt32 previous);
void OnActionAiming(SQInt32 player, SQInt32 previous);
void OnActionShooting(SQInt32 player, SQInt32 previous);
void OnActionJumping(SQInt32 player, SQInt32 previous);
void OnActionLieDown(SQInt32 player, SQInt32 previous);
void OnActionGettingUp(SQInt32 player, SQInt32 previous);
void OnActionJumpVehicle(SQInt32 player, SQInt32 previous);
void OnActionDriving(SQInt32 player, SQInt32 previous);
void OnActionDying(SQInt32 player, SQInt32 previous);
void OnActionWasted(SQInt32 player, SQInt32 previous);
void OnActionEmbarking(SQInt32 player, SQInt32 previous);
void OnActionDisembarking(SQInt32 player, SQInt32 previous);
// --------------------------------------------------------------------------------------------
void OnVehicleRespawn(SQInt32 vehicle) noexcept;
void OnVehicleExplode(SQInt32 vehicle) noexcept;
void OnVehicleRespawn(SQInt32 vehicle);
void OnVehicleExplode(SQInt32 vehicle);
// --------------------------------------------------------------------------------------------
void OnVehicleHealth(SQInt32 vehicle, SQFloat previous, SQFloat current) noexcept;
void OnVehicleMove(SQInt32 vehicle, const Vector3 & previous, const Vector3 & current) noexcept;
void OnVehicleHealth(SQInt32 vehicle, SQFloat previous, SQFloat current);
void OnVehicleMove(SQInt32 vehicle, const Vector3 & previous, const Vector3 & current);
// --------------------------------------------------------------------------------------------
void OnPickupRespawn(SQInt32 pickup) noexcept;
void OnPickupRespawn(SQInt32 pickup);
// --------------------------------------------------------------------------------------------
void OnPlayerKeyPress(SQInt32 player, SQInt32 keybind) noexcept;
void OnPlayerKeyRelease(SQInt32 player, SQInt32 keybind) noexcept;
void OnPlayerKeyPress(SQInt32 player, SQInt32 keybind);
void OnPlayerKeyRelease(SQInt32 player, SQInt32 keybind);
// --------------------------------------------------------------------------------------------
void OnPlayerEmbarking(SQInt32 player, SQInt32 vehicle, SQInt32 slot) noexcept;
void OnPlayerEmbarked(SQInt32 player, SQInt32 vehicle, SQInt32 slot) noexcept;
void OnPlayerDisembark(SQInt32 player, SQInt32 vehicle) noexcept;
void OnPlayerEmbarking(SQInt32 player, SQInt32 vehicle, SQInt32 slot);
void OnPlayerEmbarked(SQInt32 player, SQInt32 vehicle, SQInt32 slot);
void OnPlayerDisembark(SQInt32 player, SQInt32 vehicle);
// --------------------------------------------------------------------------------------------
void OnPickupClaimed(SQInt32 player, SQInt32 pickup) noexcept;
void OnPickupCollected(SQInt32 player, SQInt32 pickup) noexcept;
void OnPickupClaimed(SQInt32 player, SQInt32 pickup);
void OnPickupCollected(SQInt32 player, SQInt32 pickup);
// --------------------------------------------------------------------------------------------
void OnObjectShot(SQInt32 player, SQInt32 object, SQInt32 weapon) noexcept;
void OnObjectBump(SQInt32 player, SQInt32 object) noexcept;
void OnObjectShot(SQInt32 player, SQInt32 object, SQInt32 weapon);
void OnObjectBump(SQInt32 player, SQInt32 object);
// --------------------------------------------------------------------------------------------
void OnCheckpointEntered(SQInt32 player, SQInt32 checkpoint) noexcept;
void OnCheckpointExited(SQInt32 player, SQInt32 checkpoint) noexcept;
void OnCheckpointEntered(SQInt32 player, SQInt32 checkpoint);
void OnCheckpointExited(SQInt32 player, SQInt32 checkpoint);
// --------------------------------------------------------------------------------------------
void OnSphereEntered(SQInt32 player, SQInt32 sphere) noexcept;
void OnSphereExited(SQInt32 player, SQInt32 sphere) noexcept;
void OnSphereEntered(SQInt32 player, SQInt32 sphere);
void OnSphereExited(SQInt32 player, SQInt32 sphere);
// --------------------------------------------------------------------------------------------
void OnServerFrame(SQFloat delta) noexcept;
void OnServerFrame(SQFloat delta);
// --------------------------------------------------------------------------------------------
void OnServerStartup() noexcept;
void OnServerShutdown() noexcept;
void OnServerStartup();
void OnServerShutdown();
// --------------------------------------------------------------------------------------------
void OnInternalCommand(SQInt32 type, const SQChar * text) noexcept;
void OnLoginAttempt(const SQChar * name, const SQChar * passwd, const SQChar * ip) noexcept;
void OnInternalCommand(SQInt32 type, const SQChar * text);
void OnLoginAttempt(const SQChar * name, const SQChar * passwd, const SQChar * ip);
// --------------------------------------------------------------------------------------------
void OnCustomEvent(SQInt32 group, SQInt32 header, SqObj & payload) noexcept;
void OnCustomEvent(SQInt32 group, SQInt32 header, SqObj & payload);
// --------------------------------------------------------------------------------------------
void OnWorldOption(SQInt32 option, SqObj & value) noexcept;
void OnWorldToggle(SQInt32 option, bool value) noexcept;
void OnWorldOption(SQInt32 option, SqObj & value);
void OnWorldToggle(SQInt32 option, bool value);
// --------------------------------------------------------------------------------------------
void OnScriptReload(SQInt32 header, SqObj & payload) noexcept;
void OnScriptReload(SQInt32 header, SqObj & payload);
// --------------------------------------------------------------------------------------------
void OnLogMessage(SQInt32 type, const SQChar * message) noexcept;
void OnLogMessage(SQInt32 type, const SQChar * message);
// --------------------------------------------------------------------------------------------
void OnPlayerUpdate(SQInt32 player, SQInt32 type) noexcept;
void OnVehicleUpdate(SQInt32 vehicle, SQInt32 type) noexcept;
void OnEntityPool(SQInt32 type, SQInt32 id, bool deleted) noexcept;
void OnPlayerUpdate(SQInt32 player, SQInt32 type);
void OnVehicleUpdate(SQInt32 vehicle, SQInt32 type);
void OnEntityPool(SQInt32 type, SQInt32 id, bool deleted);
public:

View File

@ -6,154 +6,154 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
EBlipCreated & GBlipCreated() noexcept
EBlipCreated & GBlipCreated()
{
return _Core->BlipCreated;
}
ECheckpointCreated & GCheckpointCreated() noexcept
ECheckpointCreated & GCheckpointCreated()
{
return _Core->CheckpointCreated;
}
EKeybindCreated & GKeybindCreated() noexcept
EKeybindCreated & GKeybindCreated()
{
return _Core->KeybindCreated;
}
EObjectCreated & GObjectCreated() noexcept
EObjectCreated & GObjectCreated()
{
return _Core->ObjectCreated;
}
EPickupCreated & GPickupCreated() noexcept
EPickupCreated & GPickupCreated()
{
return _Core->PickupCreated;
}
EPlayerCreated & GPlayerCreated() noexcept
EPlayerCreated & GPlayerCreated()
{
return _Core->PlayerCreated;
}
ESphereCreated & GSphereCreated() noexcept
ESphereCreated & GSphereCreated()
{
return _Core->SphereCreated;
}
ESpriteCreated & GSpriteCreated() noexcept
ESpriteCreated & GSpriteCreated()
{
return _Core->SpriteCreated;
}
ETextdrawCreated & GTextdrawCreated() noexcept
ETextdrawCreated & GTextdrawCreated()
{
return _Core->TextdrawCreated;
}
EVehicleCreated & GVehicleCreated() noexcept
EVehicleCreated & GVehicleCreated()
{
return _Core->VehicleCreated;
}
// ------------------------------------------------------------------------------------------------
EBlipDestroyed & GBlipDestroyed() noexcept
EBlipDestroyed & GBlipDestroyed()
{
return _Core->BlipDestroyed;
}
ECheckpointDestroyed & GCheckpointDestroyed() noexcept
ECheckpointDestroyed & GCheckpointDestroyed()
{
return _Core->CheckpointDestroyed;
}
EKeybindDestroyed & GKeybindDestroyed() noexcept
EKeybindDestroyed & GKeybindDestroyed()
{
return _Core->KeybindDestroyed;
}
EObjectDestroyed & GObjectDestroyed() noexcept
EObjectDestroyed & GObjectDestroyed()
{
return _Core->ObjectDestroyed;
}
EPickupDestroyed & GPickupDestroyed() noexcept
EPickupDestroyed & GPickupDestroyed()
{
return _Core->PickupDestroyed;
}
EPlayerDestroyed & GPlayerDestroyed() noexcept
EPlayerDestroyed & GPlayerDestroyed()
{
return _Core->PlayerDestroyed;
}
ESphereDestroyed & GSphereDestroyed() noexcept
ESphereDestroyed & GSphereDestroyed()
{
return _Core->SphereDestroyed;
}
ESpriteDestroyed & GSpriteDestroyed() noexcept
ESpriteDestroyed & GSpriteDestroyed()
{
return _Core->SpriteDestroyed;
}
ETextdrawDestroyed & GTextdrawDestroyed() noexcept
ETextdrawDestroyed & GTextdrawDestroyed()
{
return _Core->TextdrawDestroyed;
}
EVehicleDestroyed & GVehicleDestroyed() noexcept
EVehicleDestroyed & GVehicleDestroyed()
{
return _Core->VehicleDestroyed;
}
// ------------------------------------------------------------------------------------------------
EBlipCustom & GBlipCustom() noexcept
EBlipCustom & GBlipCustom()
{
return _Core->BlipCustom;
}
ECheckpointCustom & GCheckpointCustom() noexcept
ECheckpointCustom & GCheckpointCustom()
{
return _Core->CheckpointCustom;
}
EKeybindCustom & GKeybindCustom() noexcept
EKeybindCustom & GKeybindCustom()
{
return _Core->KeybindCustom;
}
EObjectCustom & GObjectCustom() noexcept
EObjectCustom & GObjectCustom()
{
return _Core->ObjectCustom;
}
EPickupCustom & GPickupCustom() noexcept
EPickupCustom & GPickupCustom()
{
return _Core->PickupCustom;
}
EPlayerCustom & GPlayerCustom() noexcept
EPlayerCustom & GPlayerCustom()
{
return _Core->PlayerCustom;
}
ESphereCustom & GSphereCustom() noexcept
ESphereCustom & GSphereCustom()
{
return _Core->SphereCustom;
}
ESpriteCustom & GSpriteCustom() noexcept
ESpriteCustom & GSpriteCustom()
{
return _Core->SpriteCustom;
}
ETextdrawCustom & GTextdrawCustom() noexcept
ETextdrawCustom & GTextdrawCustom()
{
return _Core->TextdrawCustom;
}
EVehicleCustom & GVehicleCustom() noexcept
EVehicleCustom & GVehicleCustom()
{
return _Core->VehicleCustom;
}

File diff suppressed because it is too large Load Diff

View File

@ -5,14 +5,14 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
CBlip::CBlip(const Reference< CBlip > & o) noexcept
CBlip::CBlip(const Reference< CBlip > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
SQInteger CBlip::GetWorld() const noexcept
SQInteger CBlip::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -26,7 +26,7 @@ SQInteger CBlip::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInteger CBlip::GetScale() const noexcept
SQInteger CBlip::GetScale() const
{
if (VALID_ENTITY(m_ID))
{
@ -40,7 +40,7 @@ SQInteger CBlip::GetScale() const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CBlip::GetPosition() const noexcept
const Vector3 & CBlip::GetPosition() const
{
if (VALID_ENTITY(m_ID))
{
@ -55,7 +55,7 @@ const Vector3 & CBlip::GetPosition() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CBlip::GetPositionX() const noexcept
SQFloat CBlip::GetPositionX() const
{
if (VALID_ENTITY(m_ID))
{
@ -70,7 +70,7 @@ SQFloat CBlip::GetPositionX() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CBlip::GetPositionY() const noexcept
SQFloat CBlip::GetPositionY() const
{
if (VALID_ENTITY(m_ID))
{
@ -85,7 +85,7 @@ SQFloat CBlip::GetPositionY() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CBlip::GetPositionZ() const noexcept
SQFloat CBlip::GetPositionZ() const
{
if (VALID_ENTITY(m_ID))
{
@ -100,7 +100,7 @@ SQFloat CBlip::GetPositionZ() const noexcept
}
// ------------------------------------------------------------------------------------------------
const Color4 & CBlip::GetColor() const noexcept
const Color4 & CBlip::GetColor() const
{
if (VALID_ENTITY(m_ID))
{
@ -115,7 +115,7 @@ const Color4 & CBlip::GetColor() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CBlip::GetSprID() const noexcept
SQInt32 CBlip::GetSprID() const
{
if (VALID_ENTITY(m_ID))
{
@ -134,7 +134,7 @@ Reference< CBlip > CreateBaseBlip_ES(SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid) noexcept
SQInt32 sprid)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -145,7 +145,7 @@ Reference< CBlip > CreateBaseBlip_ES(SQInt32 world,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
header, payload);
@ -156,7 +156,7 @@ Reference< CBlip > CreateBaseBlip_EF(SQInt32 index, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid) noexcept
SQInt32 sprid)
{
return _Core->NewBlip(index, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -167,7 +167,7 @@ Reference< CBlip > CreateBaseBlip_EF(SQInt32 index, SQInt32 world,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(index, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
header, payload);
@ -175,7 +175,7 @@ Reference< CBlip > CreateBaseBlip_EF(SQInt32 index, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CBlip > CreateBaseBlip_CS(SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid) noexcept
SQInt32 scale, const Color4 & color, SQInt32 sprid)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -183,7 +183,7 @@ Reference< CBlip > CreateBaseBlip_CS(SQInt32 world, const Vector3 & pos,
Reference< CBlip > CreateBaseBlip_CS(SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
header, payload);
@ -191,7 +191,7 @@ Reference< CBlip > CreateBaseBlip_CS(SQInt32 world, const Vector3 & pos,
// ------------------------------------------------------------------------------------------------
Reference< CBlip > CreateBaseBlip_CF(SQInt32 index, SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid) noexcept
SQInt32 scale, const Color4 & color, SQInt32 sprid)
{
return _Core->NewBlip(index, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -199,7 +199,7 @@ Reference< CBlip > CreateBaseBlip_CF(SQInt32 index, SQInt32 world, const Vector3
Reference< CBlip > CreateBaseBlip_CF(SQInt32 index, SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(index, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
header, payload);
@ -210,7 +210,7 @@ CBlip CreateBlip_ES(SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid) noexcept
SQInt32 sprid)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -221,7 +221,7 @@ CBlip CreateBlip_ES(SQInt32 world,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
header, payload);
@ -232,7 +232,7 @@ CBlip CreateBlip_EF(SQInt32 index, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid) noexcept
SQInt32 sprid)
{
return _Core->NewBlip(index, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -243,7 +243,7 @@ CBlip CreateBlip_EF(SQInt32 index, SQInt32 world,
SQInt32 scale,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(index, world, x, y, z, scale, PACK_RGBA(r, g, b, a), sprid,
header, payload);
@ -251,7 +251,7 @@ CBlip CreateBlip_EF(SQInt32 index, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CBlip CreateBlip_CS(SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid) noexcept
SQInt32 scale, const Color4 & color, SQInt32 sprid)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -259,7 +259,7 @@ CBlip CreateBlip_CS(SQInt32 world, const Vector3 & pos,
CBlip CreateBlip_CS(SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(SQMOD_UNKNOWN, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
header, payload);
@ -267,7 +267,7 @@ CBlip CreateBlip_CS(SQInt32 world, const Vector3 & pos,
// ------------------------------------------------------------------------------------------------
CBlip CreateBlip_CF(SQInt32 index, SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid) noexcept
SQInt32 scale, const Color4 & color, SQInt32 sprid)
{
return _Core->NewBlip(index, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
SQMOD_CREATE_DEFAULT, NullData());
@ -275,7 +275,7 @@ CBlip CreateBlip_CF(SQInt32 index, SQInt32 world, const Vector3 & pos,
CBlip CreateBlip_CF(SQInt32 index, SQInt32 world, const Vector3 & pos,
SQInt32 scale, const Color4 & color, SQInt32 sprid,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewBlip(index, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), sprid,
header, payload);

View File

@ -22,47 +22,47 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CBlip(const Reference< CBlip > & o) noexcept;
CBlip(const Reference< CBlip > & o);
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced blip instance exists.
*/
SQInteger GetWorld() const noexcept;
SQInteger GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the scale of the referenced blip instance.
*/
SQInteger GetScale() const noexcept;
SQInteger GetScale() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced blip instance.
*/
const Vector3 & GetPosition() const noexcept;
const Vector3 & GetPosition() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the x axis position of the referenced blip instance.
*/
SQFloat GetPositionX() const noexcept;
SQFloat GetPositionX() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the y axis position of the referenced blip instance.
*/
SQFloat GetPositionY() const noexcept;
SQFloat GetPositionY() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the z axis position of the referenced blip instance.
*/
SQFloat GetPositionZ() const noexcept;
SQFloat GetPositionZ() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the color of the referenced blip instance.
*/
const Color4 & GetColor() const noexcept;
const Color4 & GetColor() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the sprite identifier of the referenced blip instance.
*/
SQInt32 GetSprID() const noexcept;
SQInt32 GetSprID() const;
};
} // Namespace:: SqMod

View File

@ -16,14 +16,14 @@ SQUint32 CCheckpoint::s_ColorB;
SQUint32 CCheckpoint::s_ColorA;
// ------------------------------------------------------------------------------------------------
CCheckpoint::CCheckpoint(const Reference< CCheckpoint > & o) noexcept
CCheckpoint::CCheckpoint(const Reference< CCheckpoint > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
bool CCheckpoint::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
bool CCheckpoint::IsStreamedFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -42,7 +42,7 @@ bool CCheckpoint::IsStreamedFor(const Reference< CPlayer > & player) const noexc
}
// ------------------------------------------------------------------------------------------------
SQInt32 CCheckpoint::GetWorld() const noexcept
SQInt32 CCheckpoint::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -57,7 +57,7 @@ SQInt32 CCheckpoint::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CCheckpoint::SetWorld(SQInt32 world) const noexcept
void CCheckpoint::SetWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -70,7 +70,7 @@ void CCheckpoint::SetWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Color4 & CCheckpoint::GetColor() const noexcept
const Color4 & CCheckpoint::GetColor() const
{
// Clear any previous color
s_Color4.Clear();
@ -89,7 +89,7 @@ const Color4 & CCheckpoint::GetColor() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CCheckpoint::SetColor(const Color4 & col) const noexcept
void CCheckpoint::SetColor(const Color4 & col) const
{
if (VALID_ENTITY(m_ID))
{
@ -102,7 +102,7 @@ void CCheckpoint::SetColor(const Color4 & col) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CCheckpoint::SetColorEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept
void CCheckpoint::SetColorEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const
{
if (VALID_ENTITY(m_ID))
{
@ -115,7 +115,7 @@ void CCheckpoint::SetColorEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CCheckpoint::GetPosition() const noexcept
const Vector3 & CCheckpoint::GetPosition() const
{
// Clear any previous position
s_Vector3.Clear();
@ -133,7 +133,7 @@ const Vector3 & CCheckpoint::GetPosition() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CCheckpoint::SetPosition(const Vector3 & pos) const noexcept
void CCheckpoint::SetPosition(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -146,7 +146,7 @@ void CCheckpoint::SetPosition(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CCheckpoint::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CCheckpoint::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -159,7 +159,7 @@ void CCheckpoint::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CCheckpoint::GetRadius() const noexcept
SQFloat CCheckpoint::GetRadius() const
{
if (VALID_ENTITY(m_ID))
{
@ -174,7 +174,7 @@ SQFloat CCheckpoint::GetRadius() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CCheckpoint::SetRadius(SQFloat radius) const noexcept
void CCheckpoint::SetRadius(SQFloat radius) const
{
if (VALID_ENTITY(m_ID))
{
@ -187,7 +187,7 @@ void CCheckpoint::SetRadius(SQFloat radius) const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference< CPlayer > CCheckpoint::GetOwner() const noexcept
Reference< CPlayer > CCheckpoint::GetOwner() const
{
if (VALID_ENTITY(m_ID))
{
@ -202,7 +202,7 @@ Reference< CPlayer > CCheckpoint::GetOwner() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CCheckpoint::GetOwnerID() const noexcept
SQInt32 CCheckpoint::GetOwnerID() const
{
if (VALID_ENTITY(m_ID))
{
@ -220,7 +220,7 @@ SQInt32 CCheckpoint::GetOwnerID() const noexcept
Reference< CCheckpoint > CreateBaseCheckpoint_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -230,7 +230,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
header, payload);
@ -238,7 +238,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_PEF(SQInt32 player, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CCheckpoint > CreateBaseCheckpoint_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color4 & color, SQFloat radius)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -246,7 +246,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_PCF(SQInt32 player, SQInt32 world,
Reference< CCheckpoint > CreateBaseCheckpoint_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
header, payload);
@ -256,7 +256,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_PCF(SQInt32 player, SQInt32 world,
Reference< CCheckpoint > CreateBaseCheckpoint_EF(const Reference< CPlayer > & player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -266,7 +266,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_EF(const Reference< CPlayer > & pl
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
header, payload);
@ -274,7 +274,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_EF(const Reference< CPlayer > & pl
// ------------------------------------------------------------------------------------------------
Reference< CCheckpoint > CreateBaseCheckpoint_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color4 & color, SQFloat radius)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -282,7 +282,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_CF(const Reference< CPlayer > & pl
Reference< CCheckpoint > CreateBaseCheckpoint_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
header, payload);
@ -292,7 +292,7 @@ Reference< CCheckpoint > CreateBaseCheckpoint_CF(const Reference< CPlayer > & pl
CCheckpoint CreateCheckpoint_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -302,7 +302,7 @@ CCheckpoint CreateCheckpoint_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
header, payload);
@ -310,7 +310,7 @@ CCheckpoint CreateCheckpoint_PEF(SQInt32 player, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CCheckpoint CreateCheckpoint_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color4 & color, SQFloat radius)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -318,7 +318,7 @@ CCheckpoint CreateCheckpoint_PCF(SQInt32 player, SQInt32 world,
CCheckpoint CreateCheckpoint_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
header, payload);
@ -328,7 +328,7 @@ CCheckpoint CreateCheckpoint_PCF(SQInt32 player, SQInt32 world,
CCheckpoint CreateCheckpoint_EF(const Reference< CPlayer > & player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -338,7 +338,7 @@ CCheckpoint CreateCheckpoint_EF(const Reference< CPlayer > & player, SQInt32 wor
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, x, y, z, r, g, b, a, radius,
header, payload);
@ -346,7 +346,7 @@ CCheckpoint CreateCheckpoint_EF(const Reference< CPlayer > & player, SQInt32 wor
// ------------------------------------------------------------------------------------------------
CCheckpoint CreateCheckpoint_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color4 & color, SQFloat radius)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -354,7 +354,7 @@ CCheckpoint CreateCheckpoint_CF(const Reference< CPlayer > & player, SQInt32 wor
CCheckpoint CreateCheckpoint_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color4 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewCheckpoint(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a, radius,
header, payload);

View File

@ -29,72 +29,72 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CCheckpoint(const Reference< CCheckpoint > & o) noexcept;
CCheckpoint(const Reference< CCheckpoint > & o);
/* --------------------------------------------------------------------------------------------
* See if the referenced checkpoint instance is streamed for the specified player.
*/
bool IsStreamedFor(const Reference< CPlayer > & player) const noexcept;
bool IsStreamedFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced checkpoint instance exists.
*/
SQInt32 GetWorld() const noexcept;
SQInt32 GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the world in which the referenced checkpoint instance exists.
*/
void SetWorld(SQInt32 world) const noexcept;
void SetWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the color of the referenced checkpoint instance.
*/
const Color4 & GetColor() const noexcept;
const Color4 & GetColor() const;
/* --------------------------------------------------------------------------------------------
* Change the color of the referenced checkpoint instance.
*/
void SetColor(const Color4 & col) const noexcept;
void SetColor(const Color4 & col) const;
/* --------------------------------------------------------------------------------------------
* Change the color of the referenced checkpoint instance.
*/
void SetColorEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept;
void SetColorEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced checkpoint instance.
*/
const Vector3 & GetPosition() const noexcept;
const Vector3 & GetPosition() const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced checkpoint instance.
*/
void SetPosition(const Vector3 & pos) const noexcept;
void SetPosition(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced checkpoint instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the radius of the referenced checkpoint instance.
*/
SQFloat GetRadius() const noexcept;
SQFloat GetRadius() const;
/* --------------------------------------------------------------------------------------------
* Change the radius of the referenced checkpoint instance.
*/
void SetRadius(SQFloat radius) const noexcept;
void SetRadius(SQFloat radius) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the owner of the referenced checkpoint instance.
*/
Reference< CPlayer > GetOwner() const noexcept;
Reference< CPlayer > GetOwner() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the owner identifier of the referenced checkpoint instance.
*/
SQInt32 GetOwnerID() const noexcept;
SQInt32 GetOwnerID() const;
};
} // Namespace:: SqMod

View File

@ -6,14 +6,14 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
CKeybind::CKeybind(const Reference< CKeybind > & o) noexcept
CKeybind::CKeybind(const Reference< CKeybind > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
SQInt32 CKeybind::GetPrimary() const noexcept
SQInt32 CKeybind::GetPrimary() const
{
if (VALID_ENTITY(m_ID))
{
@ -28,7 +28,7 @@ SQInt32 CKeybind::GetPrimary() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CKeybind::GetSecondary() const noexcept
SQInt32 CKeybind::GetSecondary() const
{
if (VALID_ENTITY(m_ID))
{
@ -43,7 +43,7 @@ SQInt32 CKeybind::GetSecondary() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CKeybind::GetAlternative() const noexcept
SQInt32 CKeybind::GetAlternative() const
{
if (VALID_ENTITY(m_ID))
{
@ -58,7 +58,7 @@ SQInt32 CKeybind::GetAlternative() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CKeybind::IsRelease() const noexcept
bool CKeybind::IsRelease() const
{
if (VALID_ENTITY(m_ID))
{
@ -74,7 +74,7 @@ bool CKeybind::IsRelease() const noexcept
// ------------------------------------------------------------------------------------------------
Reference< CKeybind > CreateBaseKeybind_ES(bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative) noexcept
SQInt32 primary, SQInt32 secondary, SQInt32 alternative)
{
return _Core->NewKeybind(SQMOD_UNKNOWN, release, primary, secondary, alternative,
SQMOD_CREATE_DEFAULT, NullData());
@ -82,7 +82,7 @@ Reference< CKeybind > CreateBaseKeybind_ES(bool release,
Reference< CKeybind > CreateBaseKeybind_ES(bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewKeybind(SQMOD_UNKNOWN, release, primary, secondary, alternative,
header, payload);
@ -90,7 +90,7 @@ Reference< CKeybind > CreateBaseKeybind_ES(bool release,
// ------------------------------------------------------------------------------------------------
Reference< CKeybind > CreateBaseKeybind_EF(SQInt32 slot, bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative) noexcept
SQInt32 primary, SQInt32 secondary, SQInt32 alternative)
{
return _Core->NewKeybind(slot, release, primary, secondary, alternative,
SQMOD_CREATE_DEFAULT, NullData());
@ -98,7 +98,7 @@ Reference< CKeybind > CreateBaseKeybind_EF(SQInt32 slot, bool release,
Reference< CKeybind > CreateBaseKeybind_EF(SQInt32 slot, bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewKeybind(slot, release, primary, secondary, alternative,
header, payload);
@ -106,7 +106,7 @@ Reference< CKeybind > CreateBaseKeybind_EF(SQInt32 slot, bool release,
// ------------------------------------------------------------------------------------------------
CKeybind CreateKeybind_ES(bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative) noexcept
SQInt32 primary, SQInt32 secondary, SQInt32 alternative)
{
return _Core->NewKeybind(SQMOD_UNKNOWN, release, primary, secondary, alternative,
SQMOD_CREATE_DEFAULT, NullData());
@ -114,7 +114,7 @@ CKeybind CreateKeybind_ES(bool release,
CKeybind CreateKeybind_ES(bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewKeybind(SQMOD_UNKNOWN, release, primary, secondary, alternative,
header, payload);
@ -122,7 +122,7 @@ CKeybind CreateKeybind_ES(bool release,
// ------------------------------------------------------------------------------------------------
CKeybind CreateKeybind_EF(SQInt32 slot, bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative) noexcept
SQInt32 primary, SQInt32 secondary, SQInt32 alternative)
{
return _Core->NewKeybind(slot, release, primary, secondary, alternative,
SQMOD_CREATE_DEFAULT, NullData());
@ -130,7 +130,7 @@ CKeybind CreateKeybind_EF(SQInt32 slot, bool release,
CKeybind CreateKeybind_EF(SQInt32 slot, bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewKeybind(slot, release, primary, secondary, alternative,
header, payload);

View File

@ -22,27 +22,27 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CKeybind(const Reference< CKeybind > & o) noexcept;
CKeybind(const Reference< CKeybind > & o);
/* --------------------------------------------------------------------------------------------
* Retrieve the primary key code of the referenced keybind instance.
*/
SQInt32 GetPrimary() const noexcept;
SQInt32 GetPrimary() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the secondary key code of the referenced keybind instance.
*/
SQInt32 GetSecondary() const noexcept;
SQInt32 GetSecondary() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the alternative key code of the referenced keybind instance.
*/
SQInt32 GetAlternative() const noexcept;
SQInt32 GetAlternative() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced keybind instance reacts to key press events.
*/
bool IsRelease() const noexcept;
bool IsRelease() const;
};
} // Namespace:: SqMod

View File

@ -15,14 +15,14 @@ Vector3 CObject::s_Vector3;
Quaternion CObject::s_Quaternion;
// ------------------------------------------------------------------------------------------------
CObject::CObject(const Reference< CObject > & o) noexcept
CObject::CObject(const Reference< CObject > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
bool CObject::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
bool CObject::IsStreamedFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -41,7 +41,7 @@ bool CObject::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
const CModel & CObject::GetModel() const noexcept
const CModel & CObject::GetModel() const
{
// Clear any previous model
s_Model.SetID(SQMOD_UNKNOWN);
@ -59,7 +59,7 @@ const CModel & CObject::GetModel() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CObject::GetModelID() const noexcept
SQInt32 CObject::GetModelID() const
{
if (VALID_ENTITY(m_ID))
{
@ -74,7 +74,7 @@ SQInt32 CObject::GetModelID() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CObject::GetWorld() const noexcept
SQInt32 CObject::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -89,7 +89,7 @@ SQInt32 CObject::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetWorld(SQInt32 world) const noexcept
void CObject::SetWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -102,7 +102,7 @@ void CObject::SetWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CObject::GetAlpha() const noexcept
SQInt32 CObject::GetAlpha() const
{
if (VALID_ENTITY(m_ID))
{
@ -117,7 +117,7 @@ SQInt32 CObject::GetAlpha() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetAlpha(SQInt32 alpha) const noexcept
void CObject::SetAlpha(SQInt32 alpha) const
{
if (VALID_ENTITY(m_ID))
{
@ -130,7 +130,7 @@ void CObject::SetAlpha(SQInt32 alpha) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetAlphaEx(SQInt32 alpha, SQInt32 time) const noexcept
void CObject::SetAlphaEx(SQInt32 alpha, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -143,7 +143,7 @@ void CObject::SetAlphaEx(SQInt32 alpha, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveToPr(const Vector3 & pos) const noexcept
void CObject::MoveToPr(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -156,7 +156,7 @@ void CObject::MoveToPr(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveTo(const Vector3 & pos, SQInt32 time) const noexcept
void CObject::MoveTo(const Vector3 & pos, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -169,7 +169,7 @@ void CObject::MoveTo(const Vector3 & pos, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveToEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CObject::MoveToEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -182,7 +182,7 @@ void CObject::MoveToEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveToEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept
void CObject::MoveToEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -195,7 +195,7 @@ void CObject::MoveToEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noex
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveByPr(const Vector3 & pos) const noexcept
void CObject::MoveByPr(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -208,7 +208,7 @@ void CObject::MoveByPr(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveBy(const Vector3 & pos, SQInt32 time) const noexcept
void CObject::MoveBy(const Vector3 & pos, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -221,7 +221,7 @@ void CObject::MoveBy(const Vector3 & pos, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveByEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CObject::MoveByEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -234,7 +234,7 @@ void CObject::MoveByEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::MoveByEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept
void CObject::MoveByEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -247,7 +247,7 @@ void CObject::MoveByEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noex
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CObject::GetPosition() noexcept
const Vector3 & CObject::GetPosition()
{
// Clear any previous position
s_Vector3.Clear();
@ -265,7 +265,7 @@ const Vector3 & CObject::GetPosition() noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetPosition(const Vector3 & pos) const noexcept
void CObject::SetPosition(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -278,7 +278,7 @@ void CObject::SetPosition(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CObject::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -291,7 +291,7 @@ void CObject::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToPr(const Quaternion & rot) const noexcept
void CObject::RotateToPr(const Quaternion & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -304,7 +304,7 @@ void CObject::RotateToPr(const Quaternion & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateTo(const Quaternion & rot, SQInt32 time) const noexcept
void CObject::RotateTo(const Quaternion & rot, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -317,7 +317,7 @@ void CObject::RotateTo(const Quaternion & rot, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept
void CObject::RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
{
if (VALID_ENTITY(m_ID))
{
@ -330,7 +330,7 @@ void CObject::RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexc
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const noexcept
void CObject::RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -343,7 +343,7 @@ void CObject::RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 tim
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToEulerPr(const Vector3 & rot) const noexcept
void CObject::RotateToEulerPr(const Vector3 & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -356,7 +356,7 @@ void CObject::RotateToEulerPr(const Vector3 & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToEuler(const Vector3 & rot, SQInt32 time) const noexcept
void CObject::RotateToEuler(const Vector3 & rot, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -369,7 +369,7 @@ void CObject::RotateToEuler(const Vector3 & rot, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CObject::RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -382,7 +382,7 @@ void CObject::RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept
void CObject::RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -395,7 +395,7 @@ void CObject::RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) con
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByPr(const Quaternion & rot) const noexcept
void CObject::RotateByPr(const Quaternion & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -408,7 +408,7 @@ void CObject::RotateByPr(const Quaternion & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateBy(const Quaternion & rot, SQInt32 time) const noexcept
void CObject::RotateBy(const Quaternion & rot, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -421,7 +421,7 @@ void CObject::RotateBy(const Quaternion & rot, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept
void CObject::RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
{
if (VALID_ENTITY(m_ID))
{
@ -434,7 +434,7 @@ void CObject::RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexc
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const noexcept
void CObject::RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -447,7 +447,7 @@ void CObject::RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 tim
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByEulerPr(const Vector3 & rot) const noexcept
void CObject::RotateByEulerPr(const Vector3 & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -460,7 +460,7 @@ void CObject::RotateByEulerPr(const Vector3 & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByEuler(const Vector3 & rot, SQInt32 time) const noexcept
void CObject::RotateByEuler(const Vector3 & rot, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -473,7 +473,7 @@ void CObject::RotateByEuler(const Vector3 & rot, SQInt32 time) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CObject::RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -486,7 +486,7 @@ void CObject::RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept
void CObject::RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const
{
if (VALID_ENTITY(m_ID))
{
@ -499,7 +499,7 @@ void CObject::RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) con
}
// ------------------------------------------------------------------------------------------------
const Quaternion & CObject::GetRotation() noexcept
const Quaternion & CObject::GetRotation()
{
// Clear any previous rotation
s_Quaternion.Clear();
@ -517,7 +517,7 @@ const Quaternion & CObject::GetRotation() noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CObject::GetRotationEuler() noexcept
const Vector3 & CObject::GetRotationEuler()
{
// Clear any previous rotation
s_Vector3.Clear();
@ -535,7 +535,7 @@ const Vector3 & CObject::GetRotationEuler() noexcept
}
// ------------------------------------------------------------------------------------------------
bool CObject::GetShotReport() const noexcept
bool CObject::GetShotReport() const
{
if (VALID_ENTITY(m_ID))
{
@ -550,7 +550,7 @@ bool CObject::GetShotReport() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetShotReport(bool toggle) const noexcept
void CObject::SetShotReport(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -563,7 +563,7 @@ void CObject::SetShotReport(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CObject::GetBumpReport() const noexcept
bool CObject::GetBumpReport() const
{
if (VALID_ENTITY(m_ID))
{
@ -578,7 +578,7 @@ bool CObject::GetBumpReport() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CObject::SetBumpReport(bool toggle) const noexcept
void CObject::SetBumpReport(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -593,7 +593,7 @@ void CObject::SetBumpReport(bool toggle) const noexcept
// ------------------------------------------------------------------------------------------------
Reference< CObject > CreateBaseObject_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha) noexcept
SQInt32 alpha)
{
return _Core->NewObject(model, world, x, y, z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -602,7 +602,7 @@ Reference< CObject > CreateBaseObject_PEF(SQInt32 model, SQInt32 world,
Reference< CObject > CreateBaseObject_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, x, y, z, alpha,
header, payload);
@ -610,7 +610,7 @@ Reference< CObject > CreateBaseObject_PEF(SQInt32 model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CObject > CreateBaseObject_PCF(SQInt32 model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha) noexcept
const Vector3 & pos, SQInt32 alpha)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -618,7 +618,7 @@ Reference< CObject > CreateBaseObject_PCF(SQInt32 model, SQInt32 world,
Reference< CObject > CreateBaseObject_PCF(SQInt32 model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
header, payload);
@ -627,7 +627,7 @@ Reference< CObject > CreateBaseObject_PCF(SQInt32 model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CObject > CreateBaseObject_EF(const CModel & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha) noexcept
SQInt32 alpha)
{
return _Core->NewObject(model, world, x, y, z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -636,7 +636,7 @@ Reference< CObject > CreateBaseObject_EF(const CModel & model, SQInt32 world,
Reference< CObject > CreateBaseObject_EF(const CModel & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, x, y, z, alpha,
header, payload);
@ -644,7 +644,7 @@ Reference< CObject > CreateBaseObject_EF(const CModel & model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CObject > CreateBaseObject_CF(const CModel & model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha) noexcept
const Vector3 & pos, SQInt32 alpha)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -652,7 +652,7 @@ Reference< CObject > CreateBaseObject_CF(const CModel & model, SQInt32 world,
Reference< CObject > CreateBaseObject_CF(const CModel & model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
header, payload);
@ -661,7 +661,7 @@ Reference< CObject > CreateBaseObject_CF(const CModel & model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CObject CreateObject_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha) noexcept
SQInt32 alpha)
{
return _Core->NewObject(model, world, x, y, z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -670,7 +670,7 @@ CObject CreateObject_PEF(SQInt32 model, SQInt32 world,
CObject CreateObject_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, x, y, z, alpha,
header, payload);
@ -678,7 +678,7 @@ CObject CreateObject_PEF(SQInt32 model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CObject CreateObject_PCF(SQInt32 model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha) noexcept
const Vector3 & pos, SQInt32 alpha)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -686,7 +686,7 @@ CObject CreateObject_PCF(SQInt32 model, SQInt32 world,
CObject CreateObject_PCF(SQInt32 model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
header, payload);
@ -695,7 +695,7 @@ CObject CreateObject_PCF(SQInt32 model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CObject CreateObject_EF(const CModel & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha) noexcept
SQInt32 alpha)
{
return _Core->NewObject(model, world, x, y, z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -704,7 +704,7 @@ CObject CreateObject_EF(const CModel & model, SQInt32 world,
CObject CreateObject_EF(const CModel & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, x, y, z, alpha,
header, payload);
@ -712,7 +712,7 @@ CObject CreateObject_EF(const CModel & model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CObject CreateObject_CF(const CModel & model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha) noexcept
const Vector3 & pos, SQInt32 alpha)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
SQMOD_CREATE_DEFAULT, NullData());
@ -720,7 +720,7 @@ CObject CreateObject_CF(const CModel & model, SQInt32 world,
CObject CreateObject_CF(const CModel & model, SQInt32 world,
const Vector3 & pos, SQInt32 alpha,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewObject(model, world, pos.x, pos.y, pos.z, alpha,
header, payload);

View File

@ -29,212 +29,212 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CObject(const Reference< CObject > & o) noexcept;
CObject(const Reference< CObject > & o);
/* --------------------------------------------------------------------------------------------
* See if the referenced object instance is streamed for the specified player.
*/
bool IsStreamedFor(const Reference< CPlayer > & player) const noexcept;
bool IsStreamedFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the model of the referenced object instance.
*/
const CModel & GetModel() const noexcept;
const CModel & GetModel() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the model identifier of the referenced object instance.
*/
SQInt32 GetModelID() const noexcept;
SQInt32 GetModelID() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced object instance exists.
*/
SQInt32 GetWorld() const noexcept;
SQInt32 GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the world in which the referenced object instance exists.
*/
void SetWorld(SQInt32 world) const noexcept;
void SetWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the alpha of the referenced object instance.
*/
SQInt32 GetAlpha() const noexcept;
SQInt32 GetAlpha() const;
/* --------------------------------------------------------------------------------------------
* Change the alpha of the referenced object instance.
*/
void SetAlpha(SQInt32 alpha) const noexcept;
void SetAlpha(SQInt32 alpha) const;
/* --------------------------------------------------------------------------------------------
* Change the alpha of the referenced object instance over the specified time.
*/
void SetAlphaEx(SQInt32 alpha, SQInt32 time) const noexcept;
void SetAlphaEx(SQInt32 alpha, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance to the specified position instantly.
*/
void MoveToPr(const Vector3 & pos) const noexcept;
void MoveToPr(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance to the specified position over the specified time.
*/
void MoveTo(const Vector3 & pos, SQInt32 time) const noexcept;
void MoveTo(const Vector3 & pos, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance to the specified position instantly.
*/
void MoveToEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void MoveToEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance to the specified position over the specified time.
*/
void MoveToEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept;
void MoveToEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance by the specified position instantly.
*/
void MoveByPr(const Vector3 & pos) const noexcept;
void MoveByPr(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance by the specified position over the specified time.
*/
void MoveBy(const Vector3 & pos, SQInt32 time) const noexcept;
void MoveBy(const Vector3 & pos, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance by the specified position instantly.
*/
void MoveByEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void MoveByEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Move the referenced object instance by the specified position over the specified time.
*/
void MoveByEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept;
void MoveByEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced object instance.
*/
const Vector3 & GetPosition() noexcept;
const Vector3 & GetPosition();
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced object instance.
*/
void SetPosition(const Vector3 & pos) const noexcept;
void SetPosition(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced object instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified rotation instantly.
*/
void RotateToPr(const Quaternion & rot) const noexcept;
void RotateToPr(const Quaternion & rot) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified rotation over the specified time.
*/
void RotateTo(const Quaternion & rot, SQInt32 time) const noexcept;
void RotateTo(const Quaternion & rot, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified rotation instantly.
*/
void RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept;
void RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified rotation over the specified time.
*/
void RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const noexcept;
void RotateToEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified euler rotation instantly.
*/
void RotateToEulerPr(const Vector3 & rot) const noexcept;
void RotateToEulerPr(const Vector3 & rot) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified euler rotation over the specified time.
*/
void RotateToEuler(const Vector3 & rot, SQInt32 time) const noexcept;
void RotateToEuler(const Vector3 & rot, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified euler rotation instantly.
*/
void RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance to the specified euler rotation over the specified time.
*/
void RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept;
void RotateToEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified rotation instantly.
*/
void RotateByPr(const Quaternion & rot) const noexcept;
void RotateByPr(const Quaternion & rot) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified rotation over the specified time.
*/
void RotateBy(const Quaternion & rot, SQInt32 time) const noexcept;
void RotateBy(const Quaternion & rot, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified rotation instantly.
*/
void RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept;
void RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified rotation over the specified time.
*/
void RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const noexcept;
void RotateByEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified euler rotation instantly.
*/
void RotateByEulerPr(const Vector3 & rot) const noexcept;
void RotateByEulerPr(const Vector3 & rot) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified euler rotation over the specified time.
*/
void RotateByEuler(const Vector3 & rot, SQInt32 time) const noexcept;
void RotateByEuler(const Vector3 & rot, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified euler rotation instantly.
*/
void RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Rotate the referenced object instance by the specified euler rotation over the specified time.
*/
void RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const noexcept;
void RotateByEulerEx(SQFloat x, SQFloat y, SQFloat z, SQInt32 time) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the rotation of the referenced object instance.
*/
const Quaternion & GetRotation() noexcept;
const Quaternion & GetRotation();
/* --------------------------------------------------------------------------------------------
* Retrieve the euler rotation of the referenced object instance.
*/
const Vector3 & GetRotationEuler() noexcept;
const Vector3 & GetRotationEuler();
/* --------------------------------------------------------------------------------------------
* See whether the referenced object instance reports gunshots.
*/
bool GetShotReport() const noexcept;
bool GetShotReport() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced object instance reports gunshots.
*/
void SetShotReport(bool toggle) const noexcept;
void SetShotReport(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced object instance reports player bumps.
*/
bool GetBumpReport() const noexcept;
bool GetBumpReport() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced object instance reports player bumps.
*/
void SetBumpReport(bool toggle) const noexcept;
void SetBumpReport(bool toggle) const;
};
} // Namespace:: SqMod

View File

@ -13,14 +13,14 @@ CModel CPickup::s_Model;
Vector3 CPickup::s_Vector3;
// ------------------------------------------------------------------------------------------------
CPickup::CPickup(const Reference< CPickup > & o) noexcept
CPickup::CPickup(const Reference< CPickup > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
bool CPickup::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
bool CPickup::IsStreamedFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -39,7 +39,7 @@ bool CPickup::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
const CModel & CPickup::GetModel() const noexcept
const CModel & CPickup::GetModel() const
{
// Clear any previous model
s_Model.SetID(SQMOD_UNKNOWN);
@ -57,7 +57,7 @@ const CModel & CPickup::GetModel() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPickup::GetModelID() const noexcept
SQInt32 CPickup::GetModelID() const
{
if (VALID_ENTITY(m_ID))
{
@ -72,7 +72,7 @@ SQInt32 CPickup::GetModelID() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPickup::GetWorld() const noexcept
SQInt32 CPickup::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -87,7 +87,7 @@ SQInt32 CPickup::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::SetWorld(SQInt32 world) const noexcept
void CPickup::SetWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -100,7 +100,7 @@ void CPickup::SetWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPickup::GetAlpha() const noexcept
SQInt32 CPickup::GetAlpha() const
{
if (VALID_ENTITY(m_ID))
{
@ -115,7 +115,7 @@ SQInt32 CPickup::GetAlpha() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::SetAlpha(SQInt32 alpha) const noexcept
void CPickup::SetAlpha(SQInt32 alpha) const
{
if (VALID_ENTITY(m_ID))
{
@ -128,7 +128,7 @@ void CPickup::SetAlpha(SQInt32 alpha) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPickup::GetAutomatic() const noexcept
bool CPickup::GetAutomatic() const
{
if (VALID_ENTITY(m_ID))
{
@ -143,7 +143,7 @@ bool CPickup::GetAutomatic() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::SetAutomatic(bool toggle) const noexcept
void CPickup::SetAutomatic(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -156,7 +156,7 @@ void CPickup::SetAutomatic(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPickup::GetAutoTimer() const noexcept
SQInt32 CPickup::GetAutoTimer() const
{
if (VALID_ENTITY(m_ID))
{
@ -171,7 +171,7 @@ SQInt32 CPickup::GetAutoTimer() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::SetAutoTimer(SQInt32 timer) const noexcept
void CPickup::SetAutoTimer(SQInt32 timer) const
{
if (VALID_ENTITY(m_ID))
{
@ -184,7 +184,7 @@ void CPickup::SetAutoTimer(SQInt32 timer) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::Refresh() const noexcept
void CPickup::Refresh() const
{
if (VALID_ENTITY(m_ID))
{
@ -197,7 +197,7 @@ void CPickup::Refresh() const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CPickup::GetPosition() noexcept
const Vector3 & CPickup::GetPosition()
{
// Clear any previous position
s_Vector3.Clear();
@ -215,7 +215,7 @@ const Vector3 & CPickup::GetPosition() noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::SetPosition(const Vector3 & pos) const noexcept
void CPickup::SetPosition(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -228,7 +228,7 @@ void CPickup::SetPosition(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPickup::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CPickup::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -241,7 +241,7 @@ void CPickup::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPickup::GetQuantity() const noexcept
SQInt32 CPickup::GetQuantity() const
{
if (VALID_ENTITY(m_ID))
{
@ -258,7 +258,7 @@ SQInt32 CPickup::GetQuantity() const noexcept
// ------------------------------------------------------------------------------------------------
Reference< CPickup > CreateBasePickup_PEF(SQInt32 model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic) noexcept
SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -267,7 +267,7 @@ Reference< CPickup > CreateBasePickup_PEF(SQInt32 model, SQInt32 world, SQInt32
Reference< CPickup > CreateBasePickup_PEF(SQInt32 model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
header, payload);
@ -275,7 +275,7 @@ Reference< CPickup > CreateBasePickup_PEF(SQInt32 model, SQInt32 world, SQInt32
// ------------------------------------------------------------------------------------------------
Reference< CPickup > CreateBasePickup_PCF(SQInt32 model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic) noexcept
const Vector3 & pos, SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -283,7 +283,7 @@ Reference< CPickup > CreateBasePickup_PCF(SQInt32 model, SQInt32 world, SQInt32
Reference< CPickup > CreateBasePickup_PCF(SQInt32 model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
header, payload);
@ -292,7 +292,7 @@ Reference< CPickup > CreateBasePickup_PCF(SQInt32 model, SQInt32 world, SQInt32
// ------------------------------------------------------------------------------------------------
Reference< CPickup > CreateBasePickup_EF(const CModel & model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic) noexcept
SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -301,7 +301,7 @@ Reference< CPickup > CreateBasePickup_EF(const CModel & model, SQInt32 world, SQ
Reference< CPickup > CreateBasePickup_EF(const CModel & model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
header, payload);
@ -309,7 +309,7 @@ Reference< CPickup > CreateBasePickup_EF(const CModel & model, SQInt32 world, SQ
// ------------------------------------------------------------------------------------------------
Reference< CPickup > CreateBasePickup_CF(const CModel & model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic) noexcept
const Vector3 & pos, SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -317,7 +317,7 @@ Reference< CPickup > CreateBasePickup_CF(const CModel & model, SQInt32 world, SQ
Reference< CPickup > CreateBasePickup_CF(const CModel & model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
header, payload);
@ -326,7 +326,7 @@ Reference< CPickup > CreateBasePickup_CF(const CModel & model, SQInt32 world, SQ
// ------------------------------------------------------------------------------------------------
CPickup CreatePickup_PEF(SQInt32 model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic) noexcept
SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -335,7 +335,7 @@ CPickup CreatePickup_PEF(SQInt32 model, SQInt32 world, SQInt32 quantity,
CPickup CreatePickup_PEF(SQInt32 model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
header, payload);
@ -343,7 +343,7 @@ CPickup CreatePickup_PEF(SQInt32 model, SQInt32 world, SQInt32 quantity,
// ------------------------------------------------------------------------------------------------
CPickup CreatePickup_PCF(SQInt32 model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic) noexcept
const Vector3 & pos, SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -351,7 +351,7 @@ CPickup CreatePickup_PCF(SQInt32 model, SQInt32 world, SQInt32 quantity,
CPickup CreatePickup_PCF(SQInt32 model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
header, payload);
@ -360,7 +360,7 @@ CPickup CreatePickup_PCF(SQInt32 model, SQInt32 world, SQInt32 quantity,
// ------------------------------------------------------------------------------------------------
CPickup CreatePickup_EF(const CModel & model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic) noexcept
SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -369,7 +369,7 @@ CPickup CreatePickup_EF(const CModel & model, SQInt32 world, SQInt32 quantity,
CPickup CreatePickup_EF(const CModel & model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, x, y, z, alpha, automatic,
header, payload);
@ -377,7 +377,7 @@ CPickup CreatePickup_EF(const CModel & model, SQInt32 world, SQInt32 quantity,
// ------------------------------------------------------------------------------------------------
CPickup CreatePickup_CF(const CModel & model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic) noexcept
const Vector3 & pos, SQInt32 alpha, bool automatic)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
SQMOD_CREATE_DEFAULT, NullData());
@ -385,7 +385,7 @@ CPickup CreatePickup_CF(const CModel & model, SQInt32 world, SQInt32 quantity,
CPickup CreatePickup_CF(const CModel & model, SQInt32 world, SQInt32 quantity,
const Vector3 & pos, SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
header, payload);

View File

@ -28,87 +28,87 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CPickup(const Reference< CPickup > & o) noexcept;
CPickup(const Reference< CPickup > & o);
/* --------------------------------------------------------------------------------------------
* See if the referenced pickup instance is streamed for the specified player.
*/
bool IsStreamedFor(const Reference< CPlayer > & player) const noexcept;
bool IsStreamedFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the model of the referenced pickup instance.
*/
const CModel & GetModel() const noexcept;
const CModel & GetModel() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the model identifier of the referenced pickup instance.
*/
SQInt32 GetModelID() const noexcept;
SQInt32 GetModelID() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced pickup instance exists.
*/
SQInt32 GetWorld() const noexcept;
SQInt32 GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the world in which the referenced pickup instance exists.
*/
void SetWorld(SQInt32 world) const noexcept;
void SetWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the alpha of the referenced pickup instance.
*/
SQInt32 GetAlpha() const noexcept;
SQInt32 GetAlpha() const;
/* --------------------------------------------------------------------------------------------
* Change the alpha of the referenced pickup instance.
*/
void SetAlpha(SQInt32 alpha) const noexcept;
void SetAlpha(SQInt32 alpha) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced pickup instance is automatic.
*/
bool GetAutomatic() const noexcept;
bool GetAutomatic() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced pickup instance is automatic.
*/
void SetAutomatic(bool toggle) const noexcept;
void SetAutomatic(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the automatic timer of the referenced pickup instance.
*/
SQInt32 GetAutoTimer() const noexcept;
SQInt32 GetAutoTimer() const;
/* --------------------------------------------------------------------------------------------
* Change the automatic timer of the referenced pickup instance.
*/
void SetAutoTimer(SQInt32 timer) const noexcept;
void SetAutoTimer(SQInt32 timer) const;
/* --------------------------------------------------------------------------------------------
* Refresh the referenced pickup instance.
*/
void Refresh() const noexcept;
void Refresh() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced pickup instance.
*/
const Vector3 & GetPosition() noexcept;
const Vector3 & GetPosition();
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced pickup instance.
*/
void SetPosition(const Vector3 & pos) const noexcept;
void SetPosition(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced pickup instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the quantity of the referenced pickup instance.
*/
SQInt32 GetQuantity() const noexcept;
SQInt32 GetQuantity() const;
};
} // Namespace:: SqMod

View File

@ -19,14 +19,14 @@ Vector3 CPlayer::s_Vector3;
SQChar CPlayer::s_Buffer[128];
// ------------------------------------------------------------------------------------------------
CPlayer::CPlayer(const Reference< CPlayer > & o) noexcept
CPlayer::CPlayer(const Reference< CPlayer > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsStreamedFor(const Reference < CPlayer > & player) const noexcept
bool CPlayer::IsStreamedFor(const Reference < CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -45,7 +45,7 @@ bool CPlayer::IsStreamedFor(const Reference < CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetClass() const noexcept
SQInt32 CPlayer::GetClass() const
{
if (VALID_ENTITY(m_ID))
{
@ -60,7 +60,7 @@ SQInt32 CPlayer::GetClass() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetAdmin() const noexcept
bool CPlayer::GetAdmin() const
{
if (VALID_ENTITY(m_ID))
{
@ -75,7 +75,7 @@ bool CPlayer::GetAdmin() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetAdmin(bool toggle) const noexcept
void CPlayer::SetAdmin(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -88,7 +88,7 @@ void CPlayer::SetAdmin(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CPlayer::GetIP() const noexcept
const SQChar * CPlayer::GetIP() const
{
// Clear any previous ip address
s_Buffer[0] = '\0';
@ -107,7 +107,7 @@ const SQChar * CPlayer::GetIP() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::Kick() const noexcept
void CPlayer::Kick() const
{
if (VALID_ENTITY(m_ID))
{
@ -120,7 +120,7 @@ void CPlayer::Kick() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::Ban() const noexcept
void CPlayer::Ban() const
{
if (VALID_ENTITY(m_ID))
{
@ -133,7 +133,7 @@ void CPlayer::Ban() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsConnected() const noexcept
bool CPlayer::IsConnected() const
{
if (VALID_ENTITY(m_ID))
{
@ -148,7 +148,7 @@ bool CPlayer::IsConnected() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsSpawned() const noexcept
bool CPlayer::IsSpawned() const
{
if (VALID_ENTITY(m_ID))
{
@ -163,7 +163,7 @@ bool CPlayer::IsSpawned() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQUnsignedInteger CPlayer::GetKey() const noexcept
SQUnsignedInteger CPlayer::GetKey() const
{
if (VALID_ENTITY(m_ID))
{
@ -178,7 +178,7 @@ SQUnsignedInteger CPlayer::GetKey() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetWorld() const noexcept
SQInt32 CPlayer::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -193,7 +193,7 @@ SQInt32 CPlayer::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWorld(SQInt32 world) const noexcept
void CPlayer::SetWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -206,7 +206,7 @@ void CPlayer::SetWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetSecWorld() const noexcept
SQInt32 CPlayer::GetSecWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -221,7 +221,7 @@ SQInt32 CPlayer::GetSecWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetSecWorld(SQInt32 world) const noexcept
void CPlayer::SetSecWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -234,7 +234,7 @@ void CPlayer::SetSecWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetUniqueWorld() const noexcept
SQInt32 CPlayer::GetUniqueWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -249,7 +249,7 @@ SQInt32 CPlayer::GetUniqueWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsWorldCompatible(SQInt32 world) const noexcept
bool CPlayer::IsWorldCompatible(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -264,7 +264,7 @@ bool CPlayer::IsWorldCompatible(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetState() const noexcept
SQInt32 CPlayer::GetState() const
{
if (VALID_ENTITY(m_ID))
{
@ -279,7 +279,7 @@ SQInt32 CPlayer::GetState() const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CPlayer::GetName() const noexcept
const SQChar * CPlayer::GetName() const
{
// Clear any previous ip address
s_Buffer[0] = '\0';
@ -298,7 +298,7 @@ const SQChar * CPlayer::GetName() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetName(const SQChar * name) const noexcept
void CPlayer::SetName(const SQChar * name) const
{
if (VALID_ENTITY(m_ID))
{
@ -311,7 +311,7 @@ void CPlayer::SetName(const SQChar * name) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetTeam() const noexcept
SQInt32 CPlayer::GetTeam() const
{
if (VALID_ENTITY(m_ID))
{
@ -326,7 +326,7 @@ SQInt32 CPlayer::GetTeam() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetTeam(SQInt32 team) const noexcept
void CPlayer::SetTeam(SQInt32 team) const
{
if (VALID_ENTITY(m_ID))
{
@ -339,7 +339,7 @@ void CPlayer::SetTeam(SQInt32 team) const noexcept
}
// ------------------------------------------------------------------------------------------------
const CSkin & CPlayer::GetSkin() const noexcept
const CSkin & CPlayer::GetSkin() const
{
// Clear any previous skin
s_Skin.SetID(SQMOD_UNKNOWN);
@ -357,7 +357,7 @@ const CSkin & CPlayer::GetSkin() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetSkin(const CSkin & skin) const noexcept
void CPlayer::SetSkin(const CSkin & skin) const
{
if (VALID_ENTITY(m_ID) && skin)
{
@ -374,7 +374,7 @@ void CPlayer::SetSkin(const CSkin & skin) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetSkinID() const noexcept
SQInt32 CPlayer::GetSkinID() const
{
if (VALID_ENTITY(m_ID))
{
@ -389,7 +389,7 @@ SQInt32 CPlayer::GetSkinID() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetSkinID(SQInt32 skin) const noexcept
void CPlayer::SetSkinID(SQInt32 skin) const
{
if (VALID_ENTITY(m_ID))
{
@ -402,7 +402,7 @@ void CPlayer::SetSkinID(SQInt32 skin) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Color3 & CPlayer::GetColor() const noexcept
const Color3 & CPlayer::GetColor() const
{
// Clear any previous color
s_Color3.Clear();
@ -420,7 +420,7 @@ const Color3 & CPlayer::GetColor() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetColor(const Color3 & color) const noexcept
void CPlayer::SetColor(const Color3 & color) const
{
if (VALID_ENTITY(m_ID))
{
@ -433,7 +433,7 @@ void CPlayer::SetColor(const Color3 & color) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetColorEx(Uint8 r, Uint8 g, Uint8 b) const noexcept
void CPlayer::SetColorEx(Uint8 r, Uint8 g, Uint8 b) const
{
if (VALID_ENTITY(m_ID))
{
@ -446,7 +446,7 @@ void CPlayer::SetColorEx(Uint8 r, Uint8 g, Uint8 b) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::ForceSpawn() const noexcept
void CPlayer::ForceSpawn() const
{
if (VALID_ENTITY(m_ID))
{
@ -459,7 +459,7 @@ void CPlayer::ForceSpawn() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::ForceSelect() const noexcept
void CPlayer::ForceSelect() const
{
if (VALID_ENTITY(m_ID))
{
@ -472,7 +472,7 @@ void CPlayer::ForceSelect() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetMoney() const noexcept
SQInt32 CPlayer::GetMoney() const
{
if (VALID_ENTITY(m_ID))
{
@ -487,7 +487,7 @@ SQInt32 CPlayer::GetMoney() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetMoney(SQInt32 amount) const noexcept
void CPlayer::SetMoney(SQInt32 amount) const
{
if (VALID_ENTITY(m_ID))
{
@ -500,7 +500,7 @@ void CPlayer::SetMoney(SQInt32 amount) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::GiveMoney(SQInt32 amount) const noexcept
void CPlayer::GiveMoney(SQInt32 amount) const
{
if (VALID_ENTITY(m_ID))
{
@ -513,7 +513,7 @@ void CPlayer::GiveMoney(SQInt32 amount) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetScore() const noexcept
SQInt32 CPlayer::GetScore() const
{
if (VALID_ENTITY(m_ID))
{
@ -528,7 +528,7 @@ SQInt32 CPlayer::GetScore() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetScore(SQInt32 score) const noexcept
void CPlayer::SetScore(SQInt32 score) const
{
if (VALID_ENTITY(m_ID))
{
@ -541,7 +541,7 @@ void CPlayer::SetScore(SQInt32 score) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetPing() const noexcept
SQInt32 CPlayer::GetPing() const
{
if (VALID_ENTITY(m_ID))
{
@ -556,7 +556,7 @@ SQInt32 CPlayer::GetPing() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CPlayer::GetFPS() const noexcept
SQFloat CPlayer::GetFPS() const
{
if (VALID_ENTITY(m_ID))
{
@ -571,7 +571,7 @@ SQFloat CPlayer::GetFPS() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsTyping() const noexcept
bool CPlayer::IsTyping() const
{
if (VALID_ENTITY(m_ID))
{
@ -586,7 +586,7 @@ bool CPlayer::IsTyping() const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CPlayer::GetUID() const noexcept
const SQChar * CPlayer::GetUID() const
{
// Clear any previous uid
s_Buffer[0] = '\0';
@ -605,7 +605,7 @@ const SQChar * CPlayer::GetUID() const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CPlayer::GetUID2() const noexcept
const SQChar * CPlayer::GetUID2() const
{
// Clear any previous uid2
s_Buffer[0] = '\0';
@ -624,7 +624,7 @@ const SQChar * CPlayer::GetUID2() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CPlayer::GetHealth() const noexcept
SQFloat CPlayer::GetHealth() const
{
if (VALID_ENTITY(m_ID))
{
@ -639,7 +639,7 @@ SQFloat CPlayer::GetHealth() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetHealth(SQFloat amount) const noexcept
void CPlayer::SetHealth(SQFloat amount) const
{
if (VALID_ENTITY(m_ID))
{
@ -652,7 +652,7 @@ void CPlayer::SetHealth(SQFloat amount) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CPlayer::GetArmour() const noexcept
SQFloat CPlayer::GetArmour() const
{
if (VALID_ENTITY(m_ID))
{
@ -667,7 +667,7 @@ SQFloat CPlayer::GetArmour() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetArmour(SQFloat amount) const noexcept
void CPlayer::SetArmour(SQFloat amount) const
{
if (VALID_ENTITY(m_ID))
{
@ -680,7 +680,7 @@ void CPlayer::SetArmour(SQFloat amount) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetImmunity() const noexcept
SQInt32 CPlayer::GetImmunity() const
{
if (VALID_ENTITY(m_ID))
{
@ -695,7 +695,7 @@ SQInt32 CPlayer::GetImmunity() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetImmunity(SQInt32 flags) const noexcept
void CPlayer::SetImmunity(SQInt32 flags) const
{
if (VALID_ENTITY(m_ID))
{
@ -708,7 +708,7 @@ void CPlayer::SetImmunity(SQInt32 flags) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CPlayer::GetPosition() const noexcept
const Vector3 & CPlayer::GetPosition() const
{
// Clear any previous position
s_Vector3.Clear();
@ -726,7 +726,7 @@ const Vector3 & CPlayer::GetPosition() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetPosition(const Vector3 & pos) const noexcept
void CPlayer::SetPosition(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -739,7 +739,7 @@ void CPlayer::SetPosition(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CPlayer::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -752,7 +752,7 @@ void CPlayer::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CPlayer::GetSpeed() const noexcept
const Vector3 & CPlayer::GetSpeed() const
{
// Clear any previous speed
s_Vector3.Clear();
@ -770,7 +770,7 @@ const Vector3 & CPlayer::GetSpeed() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetSpeed(const Vector3 & vel) const noexcept
void CPlayer::SetSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -783,7 +783,7 @@ void CPlayer::SetSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CPlayer::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -796,7 +796,7 @@ void CPlayer::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::AddSpeed(const Vector3 & vel) const noexcept
void CPlayer::AddSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -809,7 +809,7 @@ void CPlayer::AddSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CPlayer::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -822,7 +822,7 @@ void CPlayer::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CPlayer::GetHeading() const noexcept
SQFloat CPlayer::GetHeading() const
{
if (VALID_ENTITY(m_ID))
{
@ -836,7 +836,7 @@ SQFloat CPlayer::GetHeading() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetHeading(SQFloat angle) const noexcept
void CPlayer::SetHeading(SQFloat angle) const
{
if (VALID_ENTITY(m_ID))
{
@ -849,7 +849,7 @@ void CPlayer::SetHeading(SQFloat angle) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetAlpha() const noexcept
SQInt32 CPlayer::GetAlpha() const
{
if (VALID_ENTITY(m_ID))
{
@ -864,7 +864,7 @@ SQInt32 CPlayer::GetAlpha() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetAlpha(SQInt32 alpha, SQInt32 fade) const noexcept
void CPlayer::SetAlpha(SQInt32 alpha, SQInt32 fade) const
{
if (VALID_ENTITY(m_ID))
{
@ -877,7 +877,7 @@ void CPlayer::SetAlpha(SQInt32 alpha, SQInt32 fade) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetVehicleStatus() const noexcept
SQInt32 CPlayer::GetVehicleStatus() const
{
if (VALID_ENTITY(m_ID))
{
@ -892,7 +892,7 @@ SQInt32 CPlayer::GetVehicleStatus() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetOccupiedSlot() const noexcept
SQInt32 CPlayer::GetOccupiedSlot() const
{
if (VALID_ENTITY(m_ID))
{
@ -907,7 +907,7 @@ SQInt32 CPlayer::GetOccupiedSlot() const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference < CVehicle > CPlayer::GetVehicle() const noexcept
Reference < CVehicle > CPlayer::GetVehicle() const
{
if (VALID_ENTITY(m_ID))
{
@ -922,7 +922,7 @@ Reference < CVehicle > CPlayer::GetVehicle() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetVehicleID() const noexcept
SQInt32 CPlayer::GetVehicleID() const
{
if (VALID_ENTITY(m_ID))
{
@ -937,7 +937,7 @@ SQInt32 CPlayer::GetVehicleID() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetControllable() const noexcept
bool CPlayer::GetControllable() const
{
if (VALID_ENTITY(m_ID))
{
@ -952,7 +952,7 @@ bool CPlayer::GetControllable() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetControllable(bool toggle) const noexcept
void CPlayer::SetControllable(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -965,7 +965,7 @@ void CPlayer::SetControllable(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetDriveby() const noexcept
bool CPlayer::GetDriveby() const
{
if (VALID_ENTITY(m_ID))
{
@ -980,7 +980,7 @@ bool CPlayer::GetDriveby() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetDriveby(bool toggle) const noexcept
void CPlayer::SetDriveby(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -993,7 +993,7 @@ void CPlayer::SetDriveby(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetWhiteScanlines() const noexcept
bool CPlayer::GetWhiteScanlines() const
{
if (VALID_ENTITY(m_ID))
{
@ -1008,7 +1008,7 @@ bool CPlayer::GetWhiteScanlines() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWhiteScanlines(bool toggle) const noexcept
void CPlayer::SetWhiteScanlines(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1021,7 +1021,7 @@ void CPlayer::SetWhiteScanlines(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetGreenScanlines() const noexcept
bool CPlayer::GetGreenScanlines() const
{
if (VALID_ENTITY(m_ID))
{
@ -1036,7 +1036,7 @@ bool CPlayer::GetGreenScanlines() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetGreenScanlines(bool toggle) const noexcept
void CPlayer::SetGreenScanlines(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1049,7 +1049,7 @@ void CPlayer::SetGreenScanlines(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetWidescreen() const noexcept
bool CPlayer::GetWidescreen() const
{
if (VALID_ENTITY(m_ID))
{
@ -1064,7 +1064,7 @@ bool CPlayer::GetWidescreen() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWidescreen(bool toggle) const noexcept
void CPlayer::SetWidescreen(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1077,7 +1077,7 @@ void CPlayer::SetWidescreen(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetShowMarkers() const noexcept
bool CPlayer::GetShowMarkers() const
{
if (VALID_ENTITY(m_ID))
{
@ -1091,7 +1091,7 @@ bool CPlayer::GetShowMarkers() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetShowMarkers(bool toggle) const noexcept
void CPlayer::SetShowMarkers(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1104,7 +1104,7 @@ void CPlayer::SetShowMarkers(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetAttackPriv() const noexcept
bool CPlayer::GetAttackPriv() const
{
if (VALID_ENTITY(m_ID))
{
@ -1119,7 +1119,7 @@ bool CPlayer::GetAttackPriv() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetAttackPriv(bool toggle) const noexcept
void CPlayer::SetAttackPriv(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1132,7 +1132,7 @@ void CPlayer::SetAttackPriv(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetHasMarker() const noexcept
bool CPlayer::GetHasMarker() const
{
if (VALID_ENTITY(m_ID))
{
@ -1147,7 +1147,7 @@ bool CPlayer::GetHasMarker() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetHasMarker(bool toggle) const noexcept
void CPlayer::SetHasMarker(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1160,7 +1160,7 @@ void CPlayer::SetHasMarker(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetChatTags() const noexcept
bool CPlayer::GetChatTags() const
{
if (VALID_ENTITY(m_ID))
{
@ -1175,7 +1175,7 @@ bool CPlayer::GetChatTags() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetChatTags(bool toggle) const noexcept
void CPlayer::SetChatTags(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1188,7 +1188,7 @@ void CPlayer::SetChatTags(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::GetDrunkEffects() const noexcept
bool CPlayer::GetDrunkEffects() const
{
if (VALID_ENTITY(m_ID))
{
@ -1203,7 +1203,7 @@ bool CPlayer::GetDrunkEffects() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetDrunkEffects(bool toggle) const noexcept
void CPlayer::SetDrunkEffects(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1216,7 +1216,7 @@ void CPlayer::SetDrunkEffects(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
const CWeapon & CPlayer::GetWeapon() const noexcept
const CWeapon & CPlayer::GetWeapon() const
{
// Clear any previous weapon
s_Weapon.SetID(SQMOD_UNKNOWN);
@ -1234,7 +1234,7 @@ const CWeapon & CPlayer::GetWeapon() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWeapon(const CWeapon & wep) const noexcept
void CPlayer::SetWeapon(const CWeapon & wep) const
{
if (VALID_ENTITY(m_ID) && wep)
{
@ -1251,7 +1251,7 @@ void CPlayer::SetWeapon(const CWeapon & wep) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWeaponEx(const CWeapon & wep, SQInt32 ammo) const noexcept
void CPlayer::SetWeaponEx(const CWeapon & wep, SQInt32 ammo) const
{
if (VALID_ENTITY(m_ID) && wep)
{
@ -1268,7 +1268,7 @@ void CPlayer::SetWeaponEx(const CWeapon & wep, SQInt32 ammo) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetWeaponID() const noexcept
SQInt32 CPlayer::GetWeaponID() const
{
if (VALID_ENTITY(m_ID))
{
@ -1282,7 +1282,7 @@ SQInt32 CPlayer::GetWeaponID() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWeaponID(SQInt32 wep) const noexcept
void CPlayer::SetWeaponID(SQInt32 wep) const
{
if (VALID_ENTITY(m_ID) && VALID_ENTITY(wep))
{
@ -1299,7 +1299,7 @@ void CPlayer::SetWeaponID(SQInt32 wep) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWeaponIDEx(SQInt32 wep, SQInt32 ammo) const noexcept
void CPlayer::SetWeaponIDEx(SQInt32 wep, SQInt32 ammo) const
{
if (VALID_ENTITY(m_ID) && VALID_ENTITY(wep))
{
@ -1316,7 +1316,7 @@ void CPlayer::SetWeaponIDEx(SQInt32 wep, SQInt32 ammo) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::GiveWeapon(const CWeapon & wep) const noexcept
void CPlayer::GiveWeapon(const CWeapon & wep) const
{
if (VALID_ENTITY(m_ID) && wep)
{
@ -1333,7 +1333,7 @@ void CPlayer::GiveWeapon(const CWeapon & wep) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::GiveWeaponEx(const CWeapon & wep, SQInt32 ammo) const noexcept
void CPlayer::GiveWeaponEx(const CWeapon & wep, SQInt32 ammo) const
{
if (VALID_ENTITY(m_ID) && wep)
{
@ -1350,7 +1350,7 @@ void CPlayer::GiveWeaponEx(const CWeapon & wep, SQInt32 ammo) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::GiveWeaponIDEx(SQInt32 wep, SQInt32 ammo) const noexcept
void CPlayer::GiveWeaponIDEx(SQInt32 wep, SQInt32 ammo) const
{
if (VALID_ENTITY(m_ID) && VALID_ENTITY(wep))
{
@ -1367,7 +1367,7 @@ void CPlayer::GiveWeaponIDEx(SQInt32 wep, SQInt32 ammo) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::StripWeapons() const noexcept
void CPlayer::StripWeapons() const
{
if (VALID_ENTITY(m_ID))
{
@ -1380,7 +1380,7 @@ void CPlayer::StripWeapons() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetCameraPosition(const Vector3 & pos, const Vector3 & aim) const noexcept
void CPlayer::SetCameraPosition(const Vector3 & pos, const Vector3 & aim) const
{
if (VALID_ENTITY(m_ID))
{
@ -1393,7 +1393,7 @@ void CPlayer::SetCameraPosition(const Vector3 & pos, const Vector3 & aim) const
}
// ------------------------------------------------------------------------------------------------
void CPlayer::RestoreCamera() const noexcept
void CPlayer::RestoreCamera() const
{
if (VALID_ENTITY(m_ID))
{
@ -1406,7 +1406,7 @@ void CPlayer::RestoreCamera() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsCameraLocked() const noexcept
bool CPlayer::IsCameraLocked() const
{
if (VALID_ENTITY(m_ID))
{
@ -1421,7 +1421,7 @@ bool CPlayer::IsCameraLocked() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetAnimation(SQInt32 group, SQInt32 anim) const noexcept
void CPlayer::SetAnimation(SQInt32 group, SQInt32 anim) const
{
if (VALID_ENTITY(m_ID))
{
@ -1434,7 +1434,7 @@ void CPlayer::SetAnimation(SQInt32 group, SQInt32 anim) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetWantedLevel() const noexcept
SQInt32 CPlayer::GetWantedLevel() const
{
if (VALID_ENTITY(m_ID))
{
@ -1449,7 +1449,7 @@ SQInt32 CPlayer::GetWantedLevel() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetWantedLevel(SQInt32 level) const noexcept
void CPlayer::SetWantedLevel(SQInt32 level) const
{
if (VALID_ENTITY(m_ID))
{
@ -1462,7 +1462,7 @@ void CPlayer::SetWantedLevel(SQInt32 level) const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference < CVehicle > CPlayer::StandingOnVehicle() const noexcept
Reference < CVehicle > CPlayer::StandingOnVehicle() const
{
if (VALID_ENTITY(m_ID))
{
@ -1477,7 +1477,7 @@ Reference < CVehicle > CPlayer::StandingOnVehicle() const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference < CObject > CPlayer::StandingOnObject() const noexcept
Reference < CObject > CPlayer::StandingOnObject() const
{
if (VALID_ENTITY(m_ID))
{
@ -1492,7 +1492,7 @@ Reference < CObject > CPlayer::StandingOnObject() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsAway() const noexcept
bool CPlayer::IsAway() const
{
if (VALID_ENTITY(m_ID))
{
@ -1507,7 +1507,7 @@ bool CPlayer::IsAway() const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference < CPlayer > CPlayer::Spectating() const noexcept
Reference < CPlayer > CPlayer::Spectating() const
{
if (VALID_ENTITY(m_ID))
{
@ -1522,7 +1522,7 @@ Reference < CPlayer > CPlayer::Spectating() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::Spectate(const Reference < CPlayer > & target) const noexcept
void CPlayer::Spectate(const Reference < CPlayer > & target) const
{
if (VALID_ENTITY(m_ID) && target)
{
@ -1539,7 +1539,7 @@ void CPlayer::Spectate(const Reference < CPlayer > & target) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsBurning() const noexcept
bool CPlayer::IsBurning() const
{
if (VALID_ENTITY(m_ID))
{
@ -1554,7 +1554,7 @@ bool CPlayer::IsBurning() const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsCrouched() const noexcept
bool CPlayer::IsCrouched() const
{
if (VALID_ENTITY(m_ID))
{
@ -1569,7 +1569,7 @@ bool CPlayer::IsCrouched() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetAction() const noexcept
SQInt32 CPlayer::GetAction() const
{
if (VALID_ENTITY(m_ID))
{
@ -1584,7 +1584,7 @@ SQInt32 CPlayer::GetAction() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetGameKeys() const noexcept
SQInt32 CPlayer::GetGameKeys() const
{
if (VALID_ENTITY(m_ID))
{
@ -1599,7 +1599,7 @@ SQInt32 CPlayer::GetGameKeys() const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CPlayer::GetAimPos() const noexcept
const Vector3 & CPlayer::GetAimPos() const
{
// Clear any previous aim position
s_Vector3.Clear();
@ -1617,7 +1617,7 @@ const Vector3 & CPlayer::GetAimPos() const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CPlayer::GetAimDir() const noexcept
const Vector3 & CPlayer::GetAimDir() const
{
// Clear any previous aim direction
s_Vector3.Clear();
@ -1635,7 +1635,7 @@ const Vector3 & CPlayer::GetAimDir() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::Embark(const Reference < CVehicle > & vehicle) const noexcept
void CPlayer::Embark(const Reference < CVehicle > & vehicle) const
{
if (VALID_ENTITY(m_ID) && vehicle)
{
@ -1652,7 +1652,7 @@ void CPlayer::Embark(const Reference < CVehicle > & vehicle) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CPlayer::Embark(const Reference < CVehicle > & vehicle, SQInt32 slot, bool allocate, bool warp) const noexcept
void CPlayer::Embark(const Reference < CVehicle > & vehicle, SQInt32 slot, bool allocate, bool warp) const
{
if (VALID_ENTITY(m_ID) && vehicle)
{
@ -1669,7 +1669,7 @@ void CPlayer::Embark(const Reference < CVehicle > & vehicle, SQInt32 slot, bool
}
// ------------------------------------------------------------------------------------------------
void CPlayer::Disembark() const noexcept
void CPlayer::Disembark() const
{
if (VALID_ENTITY(m_ID))
{
@ -1683,7 +1683,7 @@ void CPlayer::Disembark() const noexcept
// ------------------------------------------------------------------------------------------------
bool CPlayer::Redirect(const SQChar * ip, SQUnsignedInteger port, const SQChar * nick, \
const SQChar * pass, const SQChar * user) noexcept
const SQChar * pass, const SQChar * user)
{
if (VALID_ENTITY(m_ID))
{

View File

@ -33,573 +33,573 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CPlayer(const Reference< CPlayer > & o) noexcept;
CPlayer(const Reference< CPlayer > & o);
/* --------------------------------------------------------------------------------------------
* See if the referenced player instance is streamed for the specified player.
*/
bool IsStreamedFor(const Reference < CPlayer > & player) const noexcept;
bool IsStreamedFor(const Reference < CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the class of the referenced player instance.
*/
SQInt32 GetClass() const noexcept;
SQInt32 GetClass() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has administrator privileges.
*/
bool GetAdmin() const noexcept;
bool GetAdmin() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has administrator privileges.
*/
void SetAdmin(bool toggle) const noexcept;
void SetAdmin(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the ip address of the referenced player instance.
*/
const SQChar * GetIP() const noexcept;
const SQChar * GetIP() const;
/* --------------------------------------------------------------------------------------------
* Kick the referenced player instance from the server.
*/
void Kick() const noexcept;
void Kick() const;
/* --------------------------------------------------------------------------------------------
* Ban the referenced player instance from the server.
*/
void Ban() const noexcept;
void Ban() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is connected.
*/
bool IsConnected() const noexcept;
bool IsConnected() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is spawned.
*/
bool IsSpawned() const noexcept;
bool IsSpawned() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the key of the referenced player instance.
*/
SQUnsignedInteger GetKey() const noexcept;
SQUnsignedInteger GetKey() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced player instance exists.
*/
SQInt32 GetWorld() const noexcept;
SQInt32 GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the world in which the referenced player instance exists.
*/
void SetWorld(SQInt32 world) const noexcept;
void SetWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the secondary world of the referenced player instance.
*/
SQInt32 GetSecWorld() const noexcept;
SQInt32 GetSecWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the secondary world of the referenced player instance.
*/
void SetSecWorld(SQInt32 world) const noexcept;
void SetSecWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the unique world of the referenced player instance.
*/
SQInt32 GetUniqueWorld() const noexcept;
SQInt32 GetUniqueWorld() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is compatible with the specified world.
*/
bool IsWorldCompatible(SQInt32 world) const noexcept;
bool IsWorldCompatible(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the current state of the referenced player instance.
*/
SQInt32 GetState() const noexcept;
SQInt32 GetState() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the nick name of the referenced player instance.
*/
const SQChar * GetName() const noexcept;
const SQChar * GetName() const;
/* --------------------------------------------------------------------------------------------
* Change the nick name of the referenced player instance.
*/
void SetName(const SQChar * name) const noexcept;
void SetName(const SQChar * name) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the team of the referenced player instance.
*/
SQInt32 GetTeam() const noexcept;
SQInt32 GetTeam() const;
/* --------------------------------------------------------------------------------------------
* Change the team of the referenced player instance.
*/
void SetTeam(SQInt32 team) const noexcept;
void SetTeam(SQInt32 team) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the skin of the referenced player instance.
*/
const CSkin & GetSkin() const noexcept;
const CSkin & GetSkin() const;
/* --------------------------------------------------------------------------------------------
* Change the skin of the referenced player instance.
*/
void SetSkin(const CSkin & skin) const noexcept;
void SetSkin(const CSkin & skin) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the skin identifier of the referenced player instance.
*/
SQInt32 GetSkinID() const noexcept;
SQInt32 GetSkinID() const;
/* --------------------------------------------------------------------------------------------
* Change the skin identifier of the referenced player instance.
*/
void SetSkinID(SQInt32 skin) const noexcept;
void SetSkinID(SQInt32 skin) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the color of the referenced player instance.
*/
const Color3 & GetColor() const noexcept;
const Color3 & GetColor() const;
/* --------------------------------------------------------------------------------------------
* Change the color of the referenced player instance.
*/
void SetColor(const Color3 & color) const noexcept;
void SetColor(const Color3 & color) const;
/* --------------------------------------------------------------------------------------------
* Change the color of the referenced player instance.
*/
void SetColorEx(uint8 r, uint8 g, uint8 b) const noexcept;
void SetColorEx(uint8 r, uint8 g, uint8 b) const;
/* --------------------------------------------------------------------------------------------
* Force the referenced player instance to spawn in the game.
*/
void ForceSpawn() const noexcept;
void ForceSpawn() const;
/* --------------------------------------------------------------------------------------------
* Force the referenced player instance to select a class.
*/
void ForceSelect() const noexcept;
void ForceSelect() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the money amount of the referenced player instance.
*/
SQInt32 GetMoney() const noexcept;
SQInt32 GetMoney() const;
/* --------------------------------------------------------------------------------------------
* Change the money amount of the referenced player instance.
*/
void SetMoney(SQInt32 amount) const noexcept;
void SetMoney(SQInt32 amount) const;
/* --------------------------------------------------------------------------------------------
* Give a certain amount of money to the referenced player instance.
*/
void GiveMoney(SQInt32 amount) const noexcept;
void GiveMoney(SQInt32 amount) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the score of the referenced player instance.
*/
SQInt32 GetScore() const noexcept;
SQInt32 GetScore() const;
/* --------------------------------------------------------------------------------------------
* Change the score of the referenced player instance.
*/
void SetScore(SQInt32 score) const noexcept;
void SetScore(SQInt32 score) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the connection latency of the referenced player instance.
*/
SQInt32 GetPing() const noexcept;
SQInt32 GetPing() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the frames per second of the referenced player instance.
*/
SQFloat GetFPS() const noexcept;
SQFloat GetFPS() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is typing.
*/
bool IsTyping() const noexcept;
bool IsTyping() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the unique user identifier of the referenced player instance.
*/
const SQChar * GetUID() const noexcept;
const SQChar * GetUID() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the unique user identifier version 2 of the referenced player instance.
*/
const SQChar * GetUID2() const noexcept;
const SQChar * GetUID2() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the current health of the referenced player instance.
*/
SQFloat GetHealth() const noexcept;
SQFloat GetHealth() const;
/* --------------------------------------------------------------------------------------------
* Change the health of the referenced player instance.
*/
void SetHealth(SQFloat amount) const noexcept;
void SetHealth(SQFloat amount) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the current health of the referenced player instance.
*/
SQFloat GetArmour() const noexcept;
SQFloat GetArmour() const;
/* --------------------------------------------------------------------------------------------
* Change the health of the referenced player instance.
*/
void SetArmour(SQFloat amount) const noexcept;
void SetArmour(SQFloat amount) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the immunity flags of the referenced player instance.
*/
SQInt32 GetImmunity() const noexcept;
SQInt32 GetImmunity() const;
/* --------------------------------------------------------------------------------------------
* Change the immunity flags of the referenced player instance.
*/
void SetImmunity(SQInt32 flags) const noexcept;
void SetImmunity(SQInt32 flags) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced player instance.
*/
const Vector3 & GetPosition() const noexcept;
const Vector3 & GetPosition() const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced player instance.
*/
void SetPosition(const Vector3 & pos) const noexcept;
void SetPosition(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced player instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the speed of the referenced player instance.
*/
const Vector3 & GetSpeed() const noexcept;
const Vector3 & GetSpeed() const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced player instance.
*/
void SetSpeed(const Vector3 & vel) const noexcept;
void SetSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced player instance.
*/
void SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced player instance.
*/
void AddSpeed(const Vector3 & vel) const noexcept;
void AddSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced player instance.
*/
void AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the heading angle of the referenced player instance.
*/
SQFloat GetHeading() const noexcept;
SQFloat GetHeading() const;
/* --------------------------------------------------------------------------------------------
* Change the heading angle of the referenced player instance.
*/
void SetHeading(SQFloat angle) const noexcept;
void SetHeading(SQFloat angle) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the alpha of the referenced player instance.
*/
SQInt32 GetAlpha() const noexcept;
SQInt32 GetAlpha() const;
/* --------------------------------------------------------------------------------------------
* Change the alpha of the referenced player instance.
*/
void SetAlpha(SQInt32 alpha, SQInt32 fade) const noexcept;
void SetAlpha(SQInt32 alpha, SQInt32 fade) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the vehicle status of the referenced player instance.
*/
SQInt32 GetVehicleStatus() const noexcept;
SQInt32 GetVehicleStatus() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the occupied vehicle slot by the referenced player instance.
*/
SQInt32 GetOccupiedSlot() const noexcept;
SQInt32 GetOccupiedSlot() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the vehicle in which the referenced player instance is embarked.
*/
Reference < CVehicle > GetVehicle() const noexcept;
Reference < CVehicle > GetVehicle() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the vehicle identifier in which the referenced player instance is embarked.
*/
SQInt32 GetVehicleID() const noexcept;
SQInt32 GetVehicleID() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance can be controlled.
*/
bool GetControllable() const noexcept;
bool GetControllable() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance can be controlled.
*/
void SetControllable(bool toggle) const noexcept;
void SetControllable(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance can driveby.
*/
bool GetDriveby() const noexcept;
bool GetDriveby() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance can driveby.
*/
void SetDriveby(bool toggle) const noexcept;
void SetDriveby(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has white scanlines.
*/
bool GetWhiteScanlines() const noexcept;
bool GetWhiteScanlines() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has white scanlines.
*/
void SetWhiteScanlines(bool toggle) const noexcept;
void SetWhiteScanlines(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has green scanlines.
*/
bool GetGreenScanlines() const noexcept;
bool GetGreenScanlines() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has green scanlines.
*/
void SetGreenScanlines(bool toggle) const noexcept;
void SetGreenScanlines(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has widescreen.
*/
bool GetWidescreen() const noexcept;
bool GetWidescreen() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has widescreen.
*/
void SetWidescreen(bool toggle) const noexcept;
void SetWidescreen(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance displays markers.
*/
bool GetShowMarkers() const noexcept;
bool GetShowMarkers() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance displays markers.
*/
void SetShowMarkers(bool toggle) const noexcept;
void SetShowMarkers(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has attacking privileges.
*/
bool GetAttackPriv() const noexcept;
bool GetAttackPriv() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has attacking privileges.
*/
void SetAttackPriv(bool toggle) const noexcept;
void SetAttackPriv(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has markers.
*/
bool GetHasMarker() const noexcept;
bool GetHasMarker() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has markers.
*/
void SetHasMarker(bool toggle) const noexcept;
void SetHasMarker(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has chat tags.
*/
bool GetChatTags() const noexcept;
bool GetChatTags() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has chat tags.
*/
void SetChatTags(bool toggle) const noexcept;
void SetChatTags(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is under drunk effects.
*/
bool GetDrunkEffects() const noexcept;
bool GetDrunkEffects() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance is under drunk effects.
*/
void SetDrunkEffects(bool toggle) const noexcept;
void SetDrunkEffects(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the weapon of the referenced player instance.
*/
const CWeapon & GetWeapon() const noexcept;
const CWeapon & GetWeapon() const;
/* --------------------------------------------------------------------------------------------
* Change the weapon of the referenced player instance.
*/
void SetWeapon(const CWeapon & wep) const noexcept;
void SetWeapon(const CWeapon & wep) const;
/* --------------------------------------------------------------------------------------------
* Change the weapon of the referenced player instance.
*/
void SetWeaponEx(const CWeapon & wep, SQInt32 ammo) const noexcept;
void SetWeaponEx(const CWeapon & wep, SQInt32 ammo) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the weapon identifier of the referenced player instance.
*/
SQInt32 GetWeaponID() const noexcept;
SQInt32 GetWeaponID() const;
/* --------------------------------------------------------------------------------------------
* Change the weapon of the referenced player instance.
*/
void SetWeaponID(SQInt32 wep) const noexcept;
void SetWeaponID(SQInt32 wep) const;
/* --------------------------------------------------------------------------------------------
* Change the weapon of the referenced player instance.
*/
void SetWeaponIDEx(SQInt32 wep, SQInt32 ammo) const noexcept;
void SetWeaponIDEx(SQInt32 wep, SQInt32 ammo) const;
/* --------------------------------------------------------------------------------------------
* Give a weapon of the referenced player instance.
*/
void GiveWeapon(const CWeapon & wep) const noexcept;
void GiveWeapon(const CWeapon & wep) const;
/* --------------------------------------------------------------------------------------------
* Give a weapon of the referenced player instance.
*/
void GiveWeaponEx(const CWeapon & wep, SQInt32 ammo) const noexcept;
void GiveWeaponEx(const CWeapon & wep, SQInt32 ammo) const;
/* --------------------------------------------------------------------------------------------
* Give a weapon of the referenced player instance.
*/
void GiveWeaponIDEx(SQInt32 wep, SQInt32 ammo) const noexcept;
void GiveWeaponIDEx(SQInt32 wep, SQInt32 ammo) const;
/* --------------------------------------------------------------------------------------------
* Strip the referenced player instance of all weapons.
*/
void StripWeapons() const noexcept;
void StripWeapons() const;
/* --------------------------------------------------------------------------------------------
* Change the camera position of the referenced player instance.
*/
void SetCameraPosition(const Vector3 & pos, const Vector3 & aim) const noexcept;
void SetCameraPosition(const Vector3 & pos, const Vector3 & aim) const;
/* --------------------------------------------------------------------------------------------
* Restore the camera position of the referenced player instance.
*/
void RestoreCamera() const noexcept;
void RestoreCamera() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has camera locked.
*/
bool IsCameraLocked() const noexcept;
bool IsCameraLocked() const;
/* --------------------------------------------------------------------------------------------
* Change the animation of the referenced player instance.
*/
void SetAnimation(SQInt32 group, SQInt32 anim) const noexcept;
void SetAnimation(SQInt32 group, SQInt32 anim) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the wanted level of the referenced player instance.
*/
SQInt32 GetWantedLevel() const noexcept;
SQInt32 GetWantedLevel() const;
/* --------------------------------------------------------------------------------------------
* Change the wanted level of the referenced player instance.
*/
void SetWantedLevel(SQInt32 level) const noexcept;
void SetWantedLevel(SQInt32 level) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the vehicle that the referenced player instance is standing on.
*/
Reference < CVehicle > StandingOnVehicle() const noexcept;
Reference < CVehicle > StandingOnVehicle() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the object that the referenced player instance is standing on.
*/
Reference < CObject > StandingOnObject() const noexcept;
Reference < CObject > StandingOnObject() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is away.
*/
bool IsAway() const noexcept;
bool IsAway() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the player that the referenced player instance is spectating.
*/
Reference < CPlayer > Spectating() const noexcept;
Reference < CPlayer > Spectating() const;
/* --------------------------------------------------------------------------------------------
* Set the referenced player instance to spectate the specified player instance.
*/
void Spectate(const Reference < CPlayer > & target) const noexcept;
void Spectate(const Reference < CPlayer > & target) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is burning.
*/
bool IsBurning() const noexcept;
bool IsBurning() const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance is crouched.
*/
bool IsCrouched() const noexcept;
bool IsCrouched() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the current action of the referenced player instance.
*/
SQInt32 GetAction() const noexcept;
SQInt32 GetAction() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the game keys of the referenced player instance.
*/
SQInt32 GetGameKeys() const noexcept;
SQInt32 GetGameKeys() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the aim position of the referenced player instance.
*/
const Vector3 & GetAimPos() const noexcept;
const Vector3 & GetAimPos() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the aim direction of the referenced player instance.
*/
const Vector3 & GetAimDir() const noexcept;
const Vector3 & GetAimDir() const;
/* --------------------------------------------------------------------------------------------
* Embark the referenced player instance into the specified vehicle instance.
*/
void Embark(const Reference < CVehicle > & vehicle) const noexcept;
void Embark(const Reference < CVehicle > & vehicle) const;
/* --------------------------------------------------------------------------------------------
* Embark the referenced player instance into the specified vehicle instance.
*/
void Embark(const Reference < CVehicle > & vehicle, SQInt32 slot, bool allocate, bool warp) const noexcept;
void Embark(const Reference < CVehicle > & vehicle, SQInt32 slot, bool allocate, bool warp) const;
/* --------------------------------------------------------------------------------------------
* Disembark the referenced player instance from the currently embarked vehicle instance.
*/
void Disembark() const noexcept;
void Disembark() const;
/* --------------------------------------------------------------------------------------------
* Redirect the referenced player instance to the specified server.
*/
bool Redirect(const SQChar * ip, SQUnsignedInteger port, const SQChar * nick, \
const SQChar * pass, const SQChar * user) noexcept;
const SQChar * pass, const SQChar * user);
};
} // Namespace:: SqMod

View File

@ -16,14 +16,14 @@ SQUint32 CSphere::s_ColorG;
SQUint32 CSphere::s_ColorB;
// ------------------------------------------------------------------------------------------------
CSphere::CSphere(const Reference< CSphere > & o) noexcept
CSphere::CSphere(const Reference< CSphere > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
bool CSphere::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
bool CSphere::IsStreamedFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -42,7 +42,7 @@ bool CSphere::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CSphere::GetWorld() const noexcept
SQInt32 CSphere::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -57,7 +57,7 @@ SQInt32 CSphere::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSphere::SetWorld(SQInt32 world) const noexcept
void CSphere::SetWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -70,7 +70,7 @@ void CSphere::SetWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Color3 & CSphere::GetColor() const noexcept
const Color3 & CSphere::GetColor() const
{
// Clear any previous color
s_Color3.Clear();
@ -89,7 +89,7 @@ const Color3 & CSphere::GetColor() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSphere::SetColor(const Color3 & col) const noexcept
void CSphere::SetColor(const Color3 & col) const
{
if (VALID_ENTITY(m_ID))
{
@ -102,7 +102,7 @@ void CSphere::SetColor(const Color3 & col) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSphere::SetColorEx(Uint8 r, Uint8 g, Uint8 b) const noexcept
void CSphere::SetColorEx(Uint8 r, Uint8 g, Uint8 b) const
{
if (VALID_ENTITY(m_ID))
{
@ -115,7 +115,7 @@ void CSphere::SetColorEx(Uint8 r, Uint8 g, Uint8 b) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CSphere::GetPosition() const noexcept
const Vector3 & CSphere::GetPosition() const
{
// Clear any previous position
s_Vector3.Clear();
@ -133,7 +133,7 @@ const Vector3 & CSphere::GetPosition() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSphere::SetPosition(const Vector3 & pos) const noexcept
void CSphere::SetPosition(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -146,7 +146,7 @@ void CSphere::SetPosition(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSphere::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CSphere::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -159,7 +159,7 @@ void CSphere::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CSphere::GetRadius() const noexcept
SQFloat CSphere::GetRadius() const
{
if (VALID_ENTITY(m_ID))
{
@ -174,7 +174,7 @@ SQFloat CSphere::GetRadius() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSphere::SetRadius(SQFloat radius) const noexcept
void CSphere::SetRadius(SQFloat radius) const
{
if (VALID_ENTITY(m_ID))
{
@ -187,7 +187,7 @@ void CSphere::SetRadius(SQFloat radius) const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference< CPlayer > CSphere::GetOwner() const noexcept
Reference< CPlayer > CSphere::GetOwner() const
{
if (VALID_ENTITY(m_ID))
{
@ -202,7 +202,7 @@ Reference< CPlayer > CSphere::GetOwner() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CSphere::GetOwnerID() const noexcept
SQInt32 CSphere::GetOwnerID() const
{
if (VALID_ENTITY(m_ID))
{
@ -220,7 +220,7 @@ SQInt32 CSphere::GetOwnerID() const noexcept
Reference< CSphere > CreateBaseSphere_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -230,7 +230,7 @@ Reference< CSphere > CreateBaseSphere_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
header, payload);
@ -238,7 +238,7 @@ Reference< CSphere > CreateBaseSphere_PEF(SQInt32 player, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CSphere > CreateBaseSphere_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color3 & color, SQFloat radius)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -246,7 +246,7 @@ Reference< CSphere > CreateBaseSphere_PCF(SQInt32 player, SQInt32 world,
Reference< CSphere > CreateBaseSphere_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
header, payload);
@ -256,7 +256,7 @@ Reference< CSphere > CreateBaseSphere_PCF(SQInt32 player, SQInt32 world,
Reference< CSphere > CreateBaseSphere_EF(const Reference< CPlayer > & player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -266,7 +266,7 @@ Reference< CSphere > CreateBaseSphere_EF(const Reference< CPlayer > & player, SQ
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
header, payload);
@ -274,7 +274,7 @@ Reference< CSphere > CreateBaseSphere_EF(const Reference< CPlayer > & player, SQ
// ------------------------------------------------------------------------------------------------
Reference< CSphere > CreateBaseSphere_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color3 & color, SQFloat radius)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -282,7 +282,7 @@ Reference< CSphere > CreateBaseSphere_CF(const Reference< CPlayer > & player, SQ
Reference< CSphere > CreateBaseSphere_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
header, payload);
@ -292,7 +292,7 @@ Reference< CSphere > CreateBaseSphere_CF(const Reference< CPlayer > & player, SQ
CSphere CreateSphere_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -302,7 +302,7 @@ CSphere CreateSphere_PEF(SQInt32 player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
header, payload);
@ -310,7 +310,7 @@ CSphere CreateSphere_PEF(SQInt32 player, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CSphere CreateSphere_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color3 & color, SQFloat radius)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -318,7 +318,7 @@ CSphere CreateSphere_PCF(SQInt32 player, SQInt32 world,
CSphere CreateSphere_PCF(SQInt32 player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
header, payload);
@ -328,7 +328,7 @@ CSphere CreateSphere_PCF(SQInt32 player, SQInt32 world,
CSphere CreateSphere_EF(const Reference< CPlayer > & player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius) noexcept
SQFloat radius)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -338,7 +338,7 @@ CSphere CreateSphere_EF(const Reference< CPlayer > & player, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b,
SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, x, y, z, r, g, b, radius,
header, payload);
@ -346,7 +346,7 @@ CSphere CreateSphere_EF(const Reference< CPlayer > & player, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CSphere CreateSphere_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius) noexcept
const Vector3 & pos, const Color3 & color, SQFloat radius)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
SQMOD_CREATE_DEFAULT, NullData());
@ -354,7 +354,7 @@ CSphere CreateSphere_CF(const Reference< CPlayer > & player, SQInt32 world,
CSphere CreateSphere_CF(const Reference< CPlayer > & player, SQInt32 world,
const Vector3 & pos, const Color3 & color, SQFloat radius,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSphere(player, world, pos.x, pos.y, pos.z, color.r, color.g, color.b, radius,
header, payload);

View File

@ -29,72 +29,72 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CSphere(const Reference< CSphere > & o) noexcept;
CSphere(const Reference< CSphere > & o);
/* --------------------------------------------------------------------------------------------
* See if the referenced sphere instance is streamed for the specified player.
*/
bool IsStreamedFor(const Reference< CPlayer > & player) const noexcept;
bool IsStreamedFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced sphere instance exists.
*/
SQInt32 GetWorld() const noexcept;
SQInt32 GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the world in which the referenced sphere instance exists.
*/
void SetWorld(SQInt32 world) const noexcept;
void SetWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the color of the referenced sphere instance.
*/
const Color3 & GetColor() const noexcept;
const Color3 & GetColor() const;
/* --------------------------------------------------------------------------------------------
* Change the color of the referenced sphere instance.
*/
void SetColor(const Color3 & col) const noexcept;
void SetColor(const Color3 & col) const;
/* --------------------------------------------------------------------------------------------
* Change the color of the referenced sphere instance.
*/
void SetColorEx(Uint8 r, Uint8 g, Uint8 b) const noexcept;
void SetColorEx(Uint8 r, Uint8 g, Uint8 b) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced sphere instance.
*/
const Vector3 & GetPosition() const noexcept;
const Vector3 & GetPosition() const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced sphere instance.
*/
void SetPosition(const Vector3 & pos) const noexcept;
void SetPosition(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced sphere instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the radius of the referenced sphere instance.
*/
SQFloat GetRadius() const noexcept;
SQFloat GetRadius() const;
/* --------------------------------------------------------------------------------------------
* Change the radius of the referenced sphere instance.
*/
void SetRadius(SQFloat radius) const noexcept;
void SetRadius(SQFloat radius) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the owner of the referenced sphere instance.
*/
Reference< CPlayer > GetOwner() const noexcept;
Reference< CPlayer > GetOwner() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the owner identifier of the referenced sphere instance.
*/
SQInt32 GetOwnerID() const noexcept;
SQInt32 GetOwnerID() const;
};
} // Namespace:: SqMod

View File

@ -7,14 +7,14 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
CSprite::CSprite(const Reference< CSprite > & o) noexcept
CSprite::CSprite(const Reference< CSprite > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
void CSprite::ShowAll() const noexcept
void CSprite::ShowAll() const
{
if (VALID_ENTITY(m_ID))
{
@ -27,7 +27,7 @@ void CSprite::ShowAll() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::ShowFor(const Reference< CPlayer > & player) const noexcept
void CSprite::ShowFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -44,7 +44,7 @@ void CSprite::ShowFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::ShowRange(SQInt32 first, SQInt32 last) const noexcept
void CSprite::ShowRange(SQInt32 first, SQInt32 last) const
{
if (VALID_ENTITY(m_ID) && (first <= last))
{
@ -67,7 +67,7 @@ void CSprite::ShowRange(SQInt32 first, SQInt32 last) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::HideAll() const noexcept
void CSprite::HideAll() const
{
if (VALID_ENTITY(m_ID))
{
@ -80,7 +80,7 @@ void CSprite::HideAll() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::HideFor(const Reference< CPlayer > & player) const noexcept
void CSprite::HideFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -97,7 +97,7 @@ void CSprite::HideFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::HideRange(SQInt32 first, SQInt32 last) const noexcept
void CSprite::HideRange(SQInt32 first, SQInt32 last) const
{
if (VALID_ENTITY(m_ID) && (first <= last))
{
@ -120,7 +120,7 @@ void CSprite::HideRange(SQInt32 first, SQInt32 last) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetPositionAll(const Vector2i & pos) const noexcept
void CSprite::SetPositionAll(const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -133,7 +133,7 @@ void CSprite::SetPositionAll(const Vector2i & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept
void CSprite::SetPositionAllEx(SQInt32 x, SQInt32 y) const
{
if (VALID_ENTITY(m_ID))
{
@ -146,7 +146,7 @@ void CSprite::SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept
void CSprite::SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -164,7 +164,7 @@ void CSprite::SetPositionFor(const Reference< CPlayer > & player, const Vector2i
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept
void CSprite::SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -181,7 +181,7 @@ void CSprite::SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, S
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept
void CSprite::SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID) && (first <= last))
{
@ -204,7 +204,7 @@ void CSprite::SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetCenterAll(const Vector2i & pos) const noexcept
void CSprite::SetCenterAll(const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -217,7 +217,7 @@ void CSprite::SetCenterAll(const Vector2i & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetCenterAllEx(SQInt32 x, SQInt32 y) const noexcept
void CSprite::SetCenterAllEx(SQInt32 x, SQInt32 y) const
{
if (VALID_ENTITY(m_ID))
{
@ -230,7 +230,7 @@ void CSprite::SetCenterAllEx(SQInt32 x, SQInt32 y) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetCenterFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept
void CSprite::SetCenterFor(const Reference< CPlayer > & player, const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -247,7 +247,7 @@ void CSprite::SetCenterFor(const Reference< CPlayer > & player, const Vector2i &
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetCenterForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept
void CSprite::SetCenterForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -264,7 +264,7 @@ void CSprite::SetCenterForEx(const Reference< CPlayer > & player, SQInt32 x, SQI
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetCenterRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept
void CSprite::SetCenterRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID) && (first <= last))
{
@ -287,7 +287,7 @@ void CSprite::SetCenterRange(SQInt32 first, SQInt32 last, const Vector2i & pos)
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetRotationAll(SQFloat rot) const noexcept
void CSprite::SetRotationAll(SQFloat rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -300,7 +300,7 @@ void CSprite::SetRotationAll(SQFloat rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetRotationFor(const Reference< CPlayer > & player, SQFloat rot) const noexcept
void CSprite::SetRotationFor(const Reference< CPlayer > & player, SQFloat rot) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -317,7 +317,7 @@ void CSprite::SetRotationFor(const Reference< CPlayer > & player, SQFloat rot) c
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetRotationRange(SQInt32 first, SQInt32 last, SQFloat rot) const noexcept
void CSprite::SetRotationRange(SQInt32 first, SQInt32 last, SQFloat rot) const
{
if (VALID_ENTITY(m_ID) && (first <= last))
{
@ -340,7 +340,7 @@ void CSprite::SetRotationRange(SQInt32 first, SQInt32 last, SQFloat rot) const n
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetAlphaAll(Uint8 alpha) const noexcept
void CSprite::SetAlphaAll(Uint8 alpha) const
{
if (VALID_ENTITY(m_ID))
{
@ -353,7 +353,7 @@ void CSprite::SetAlphaAll(Uint8 alpha) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetAlphaFor(const Reference< CPlayer > & player, Uint8 alpha) const noexcept
void CSprite::SetAlphaFor(const Reference< CPlayer > & player, Uint8 alpha) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -370,7 +370,7 @@ void CSprite::SetAlphaFor(const Reference< CPlayer > & player, Uint8 alpha) cons
}
// ------------------------------------------------------------------------------------------------
void CSprite::SetAlphaRange(SQInt32 first, SQInt32 last, Uint8 alpha) const noexcept
void CSprite::SetAlphaRange(SQInt32 first, SQInt32 last, Uint8 alpha) const
{
if (VALID_ENTITY(m_ID) && (first <= last))
{
@ -393,7 +393,7 @@ void CSprite::SetAlphaRange(SQInt32 first, SQInt32 last, Uint8 alpha) const noex
}
// ------------------------------------------------------------------------------------------------
const SQChar * CSprite::GetFilePath() const noexcept
const SQChar * CSprite::GetFilePath() const
{
if (VALID_ENTITY(m_ID))
{
@ -411,7 +411,7 @@ const SQChar * CSprite::GetFilePath() const noexcept
Reference< CSprite > CreateBaseSprite_ES(const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, xp, yp, xr, yr, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -421,7 +421,7 @@ Reference< CSprite > CreateBaseSprite_ES(const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, xp, yp, xr, yr, angle, alpha, rel,
header, payload);
@ -431,7 +431,7 @@ Reference< CSprite > CreateBaseSprite_ES(const SQChar * file,
Reference< CSprite > CreateBaseSprite_EF(SQInt32 index, const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(index, file, xp, yp, xr, yr, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -441,7 +441,7 @@ Reference< CSprite > CreateBaseSprite_EF(SQInt32 index, const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(index, file, xp, yp, xr, yr, angle, alpha, rel,
header, payload);
@ -450,7 +450,7 @@ Reference< CSprite > CreateBaseSprite_EF(SQInt32 index, const SQChar * file,
// ------------------------------------------------------------------------------------------------
Reference< CSprite > CreateBaseSprite_CS(const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -459,7 +459,7 @@ Reference< CSprite > CreateBaseSprite_CS(const SQChar * file,
Reference< CSprite > CreateBaseSprite_CS(const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
header, payload);
@ -468,7 +468,7 @@ Reference< CSprite > CreateBaseSprite_CS(const SQChar * file,
// ------------------------------------------------------------------------------------------------
Reference< CSprite > CreateBaseSprite_CF(SQInt32 index, const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(index, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -477,7 +477,7 @@ Reference< CSprite > CreateBaseSprite_CF(SQInt32 index, const SQChar * file,
Reference< CSprite > CreateBaseSprite_CF(SQInt32 index, const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(index, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
header, payload);
@ -487,7 +487,7 @@ Reference< CSprite > CreateBaseSprite_CF(SQInt32 index, const SQChar * file,
CSprite CreateSprite_ES(const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, xp, yp, xr, yr, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -497,7 +497,7 @@ CSprite CreateSprite_ES(const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, xp, yp, xr, yr, angle, alpha, rel,
header, payload);
@ -507,7 +507,7 @@ CSprite CreateSprite_ES(const SQChar * file,
CSprite CreateSprite_EF(SQInt32 index, const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(index, file, xp, yp, xr, yr, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -517,7 +517,7 @@ CSprite CreateSprite_EF(SQInt32 index, const SQChar * file,
SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(index, file, xp, yp, xr, yr, angle, alpha, rel,
header, payload);
@ -526,7 +526,7 @@ CSprite CreateSprite_EF(SQInt32 index, const SQChar * file,
// ------------------------------------------------------------------------------------------------
CSprite CreateSprite_CS(const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -535,7 +535,7 @@ CSprite CreateSprite_CS(const SQChar * file,
CSprite CreateSprite_CS(const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(SQMOD_UNKNOWN, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
header, payload);
@ -544,7 +544,7 @@ CSprite CreateSprite_CS(const SQChar * file,
// ------------------------------------------------------------------------------------------------
CSprite CreateSprite_CF(SQInt32 index, const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel) noexcept
SQFloat angle, SQInt32 alpha, bool rel)
{
return _Core->NewSprite(index, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -553,7 +553,7 @@ CSprite CreateSprite_CF(SQInt32 index, const SQChar * file,
CSprite CreateSprite_CF(SQInt32 index, const SQChar * file,
const Vector2i & pos, const Vector2i & rot,
SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewSprite(index, file, pos.x, pos.y, rot.x, rot.y, angle, alpha, rel,
header, payload);

View File

@ -22,122 +22,122 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CSprite(const Reference< CSprite > & o) noexcept;
CSprite(const Reference< CSprite > & o);
/* --------------------------------------------------------------------------------------------
* Show the referenced sprite instance to all players on the server.
*/
void ShowAll() const noexcept;
void ShowAll() const;
/* --------------------------------------------------------------------------------------------
* Show the referenced sprite instance to the specified player instance.
*/
void ShowFor(const Reference< CPlayer > & player) const noexcept;
void ShowFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Show the referenced sprite instance to all players in the specified range.
*/
void ShowRange(SQInt32 first, SQInt32 last) const noexcept;
void ShowRange(SQInt32 first, SQInt32 last) const;
/* --------------------------------------------------------------------------------------------
* Hide the referenced sprite instance from all players on the server.
*/
void HideAll() const noexcept;
void HideAll() const;
/* --------------------------------------------------------------------------------------------
* Hide the referenced sprite instance from the specified player instance.
*/
void HideFor(const Reference< CPlayer > & player) const noexcept;
void HideFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Hide the referenced sprite instance from all players in the specified range.
*/
void HideRange(SQInt32 first, SQInt32 last) const noexcept;
void HideRange(SQInt32 first, SQInt32 last) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced sprite instance for all players on the server.
*/
void SetPositionAll(const Vector2i & pos) const noexcept;
void SetPositionAll(const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced sprite instance for all players on the server.
*/
void SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept;
void SetPositionAllEx(SQInt32 x, SQInt32 y) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced sprite instance for the specified player instance.
*/
void SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept;
void SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced sprite instance for the specified player instance.
*/
void SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept;
void SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced sprite instance for all players in the specified range.
*/
void SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept;
void SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the center of the referenced sprite instance for all players on the server.
*/
void SetCenterAll(const Vector2i & pos) const noexcept;
void SetCenterAll(const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the center of the referenced sprite instance for all players on the server.
*/
void SetCenterAllEx(SQInt32 x, SQInt32 y) const noexcept;
void SetCenterAllEx(SQInt32 x, SQInt32 y) const;
/* --------------------------------------------------------------------------------------------
* Set the center of the referenced sprite instance for the specified player instance.
*/
void SetCenterFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept;
void SetCenterFor(const Reference< CPlayer > & player, const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the center of the referenced sprite instance for the specified player instance.
*/
void SetCenterForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept;
void SetCenterForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const;
/* --------------------------------------------------------------------------------------------
* Set the center of the referenced sprite instance for all players in the specified range.
*/
void SetCenterRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept;
void SetCenterRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the rotation of the referenced sprite instance for all players on the server.
*/
void SetRotationAll(SQFloat rot) const noexcept;
void SetRotationAll(SQFloat rot) const;
/* --------------------------------------------------------------------------------------------
* Set the rotation of the referenced sprite instance for the specified player instance.
*/
void SetRotationFor(const Reference< CPlayer > & player, SQFloat rot) const noexcept;
void SetRotationFor(const Reference< CPlayer > & player, SQFloat rot) const;
/* --------------------------------------------------------------------------------------------
* Set the rotation of the referenced sprite instance for all players in the specified range.
*/
void SetRotationRange(SQInt32 first, SQInt32 last, SQFloat rot) const noexcept;
void SetRotationRange(SQInt32 first, SQInt32 last, SQFloat rot) const;
/* --------------------------------------------------------------------------------------------
* Set the rotation of the referenced sprite instance for all players on the server.
*/
void SetAlphaAll(Uint8 alpha) const noexcept;
void SetAlphaAll(Uint8 alpha) const;
/* --------------------------------------------------------------------------------------------
* Set the rotation of the referenced sprite instance for the specified player instance.
*/
void SetAlphaFor(const Reference< CPlayer > & player, Uint8 alpha) const noexcept;
void SetAlphaFor(const Reference< CPlayer > & player, Uint8 alpha) const;
/* --------------------------------------------------------------------------------------------
* Set the rotation of the referenced sprite instance for all players in the specified range.
*/
void SetAlphaRange(SQInt32 first, SQInt32 last, Uint8 alpha) const noexcept;
void SetAlphaRange(SQInt32 first, SQInt32 last, Uint8 alpha) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the file path of the texture used by the referenced sprite instance.
*/
const SQChar * GetFilePath() const noexcept;
const SQChar * GetFilePath() const;
};
} // Namespace:: SqMod

View File

@ -7,14 +7,14 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
CTextdraw::CTextdraw(const Reference< CTextdraw > & o) noexcept
CTextdraw::CTextdraw(const Reference< CTextdraw > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::ShowAll() const noexcept
void CTextdraw::ShowAll() const
{
if (VALID_ENTITY(m_ID))
{
@ -27,7 +27,7 @@ void CTextdraw::ShowAll() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::ShowFor(const Reference< CPlayer > & player) const noexcept
void CTextdraw::ShowFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -44,7 +44,7 @@ void CTextdraw::ShowFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::ShowRange(SQInt32 first, SQInt32 last) const noexcept
void CTextdraw::ShowRange(SQInt32 first, SQInt32 last) const
{
if (VALID_ENTITY(m_ID) && (last >= first))
{
@ -67,7 +67,7 @@ void CTextdraw::ShowRange(SQInt32 first, SQInt32 last) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::HideAll() const noexcept
void CTextdraw::HideAll() const
{
if (VALID_ENTITY(m_ID))
{
@ -80,7 +80,7 @@ void CTextdraw::HideAll() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::HideFor(const Reference< CPlayer > & player) const noexcept
void CTextdraw::HideFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -97,7 +97,7 @@ void CTextdraw::HideFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::HideRange(SQInt32 first, SQInt32 last) const noexcept
void CTextdraw::HideRange(SQInt32 first, SQInt32 last) const
{
if (VALID_ENTITY(m_ID) && (last >= first))
{
@ -120,7 +120,7 @@ void CTextdraw::HideRange(SQInt32 first, SQInt32 last) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetPositionAll(const Vector2i & pos) const noexcept
void CTextdraw::SetPositionAll(const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -133,7 +133,7 @@ void CTextdraw::SetPositionAll(const Vector2i & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept
void CTextdraw::SetPositionAllEx(SQInt32 x, SQInt32 y) const
{
if (VALID_ENTITY(m_ID))
{
@ -146,7 +146,7 @@ void CTextdraw::SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept
void CTextdraw::SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -163,7 +163,7 @@ void CTextdraw::SetPositionFor(const Reference< CPlayer > & player, const Vector
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept
void CTextdraw::SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -180,7 +180,7 @@ void CTextdraw::SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x,
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept
void CTextdraw::SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const
{
if (VALID_ENTITY(m_ID) && (last >= first))
{
@ -203,7 +203,7 @@ void CTextdraw::SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & p
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetColorAll(const Color4 & col) const noexcept
void CTextdraw::SetColorAll(const Color4 & col) const
{
if (VALID_ENTITY(m_ID))
{
@ -216,7 +216,7 @@ void CTextdraw::SetColorAll(const Color4 & col) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetColorAllEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept
void CTextdraw::SetColorAllEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const
{
if (VALID_ENTITY(m_ID))
{
@ -229,7 +229,7 @@ void CTextdraw::SetColorAllEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetColorFor(const Reference< CPlayer > & player, const Color4 & col) const noexcept
void CTextdraw::SetColorFor(const Reference< CPlayer > & player, const Color4 & col) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -246,7 +246,7 @@ void CTextdraw::SetColorFor(const Reference< CPlayer > & player, const Color4 &
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetColorForEx(const Reference< CPlayer > & player, Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept
void CTextdraw::SetColorForEx(const Reference< CPlayer > & player, Uint8 r, Uint8 g, Uint8 b, Uint8 a) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -263,7 +263,7 @@ void CTextdraw::SetColorForEx(const Reference< CPlayer > & player, Uint8 r, Uint
}
// ------------------------------------------------------------------------------------------------
void CTextdraw::SetColorRange(SQInt32 first, SQInt32 last, const Color4 & col) const noexcept
void CTextdraw::SetColorRange(SQInt32 first, SQInt32 last, const Color4 & col) const
{
if (VALID_ENTITY(m_ID) && (last >= first))
{
@ -286,7 +286,7 @@ void CTextdraw::SetColorRange(SQInt32 first, SQInt32 last, const Color4 & col) c
}
// ------------------------------------------------------------------------------------------------
const SQChar * CTextdraw::GetText() const noexcept
const SQChar * CTextdraw::GetText() const
{
if (VALID_ENTITY(m_ID))
{
@ -304,7 +304,7 @@ const SQChar * CTextdraw::GetText() const noexcept
Reference< CTextdraw > CreateBaseTextdraw_ES(const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel) noexcept
bool rel)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, xp, yp, PACK_ARGB(a, r, g, b), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -314,7 +314,7 @@ Reference< CTextdraw > CreateBaseTextdraw_ES(const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, xp, yp, PACK_ARGB(a, r, g, b), rel,
header, payload);
@ -324,7 +324,7 @@ Reference< CTextdraw > CreateBaseTextdraw_ES(const SQChar * text,
Reference< CTextdraw > CreateBaseTextdraw_EF(SQInt32 index, const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel) noexcept
bool rel)
{
return _Core->NewTextdraw(index,text, xp, yp, PACK_ARGB(a, r, g, b), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -334,7 +334,7 @@ Reference< CTextdraw > CreateBaseTextdraw_EF(SQInt32 index, const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(index, text, xp, yp, PACK_ARGB(a, r, g, b), rel,
header, payload);
@ -342,7 +342,7 @@ Reference< CTextdraw > CreateBaseTextdraw_EF(SQInt32 index, const SQChar * text,
// ------------------------------------------------------------------------------------------------
Reference< CTextdraw > CreateBaseTextdraw_CS(const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel) noexcept
const Vector2i & pos, const Color4 & color, bool rel)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, pos.x, pos.y, color.GetARGB(), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -350,7 +350,7 @@ Reference< CTextdraw > CreateBaseTextdraw_CS(const SQChar * text,
Reference< CTextdraw > CreateBaseTextdraw_CS(const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, pos.x, pos.y, color.GetARGB(), rel,
header, payload);
@ -358,7 +358,7 @@ Reference< CTextdraw > CreateBaseTextdraw_CS(const SQChar * text,
// ------------------------------------------------------------------------------------------------
Reference< CTextdraw > CreateBaseTextdraw_CF(SQInt32 index, const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel) noexcept
const Vector2i & pos, const Color4 & color, bool rel)
{
return _Core->NewTextdraw(index, text, pos.x, pos.y, color.GetARGB(), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -366,7 +366,7 @@ Reference< CTextdraw > CreateBaseTextdraw_CF(SQInt32 index, const SQChar * text,
Reference< CTextdraw > CreateBaseTextdraw_CF(SQInt32 index, const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(index, text, pos.x, pos.y, color.GetARGB(), rel,
header, payload);
@ -376,7 +376,7 @@ Reference< CTextdraw > CreateBaseTextdraw_CF(SQInt32 index, const SQChar * text,
CTextdraw CreateTextdraw_ES(const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel) noexcept
bool rel)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, xp, yp, PACK_ARGB(a, r, g, b), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -386,7 +386,7 @@ CTextdraw CreateTextdraw_ES(const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, xp, yp, PACK_ARGB(a, r, g, b), rel,
header, payload);
@ -396,7 +396,7 @@ CTextdraw CreateTextdraw_ES(const SQChar * text,
CTextdraw CreateTextdraw_EF(SQInt32 index, const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel) noexcept
bool rel)
{
return _Core->NewTextdraw(index,text, xp, yp, PACK_ARGB(a, r, g, b), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -406,7 +406,7 @@ CTextdraw CreateTextdraw_EF(SQInt32 index, const SQChar * text,
SQInt32 xp, SQInt32 yp,
Uint8 r, Uint8 g, Uint8 b, Uint8 a,
bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(index, text, xp, yp, PACK_ARGB(a, r, g, b), rel,
header, payload);
@ -414,7 +414,7 @@ CTextdraw CreateTextdraw_EF(SQInt32 index, const SQChar * text,
// ------------------------------------------------------------------------------------------------
CTextdraw CreateTextdraw_CS(const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel) noexcept
const Vector2i & pos, const Color4 & color, bool rel)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, pos.x, pos.y, color.GetARGB(), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -422,7 +422,7 @@ CTextdraw CreateTextdraw_CS(const SQChar * text,
CTextdraw CreateTextdraw_CS(const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(SQMOD_UNKNOWN, text, pos.x, pos.y, color.GetARGB(), rel,
header, payload);
@ -430,7 +430,7 @@ CTextdraw CreateTextdraw_CS(const SQChar * text,
// ------------------------------------------------------------------------------------------------
CTextdraw CreateTextdraw_CF(SQInt32 index, const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel) noexcept
const Vector2i & pos, const Color4 & color, bool rel)
{
return _Core->NewTextdraw(index, text, pos.x, pos.y, color.GetARGB(), rel,
SQMOD_CREATE_DEFAULT, NullData());
@ -438,7 +438,7 @@ CTextdraw CreateTextdraw_CF(SQInt32 index, const SQChar * text,
CTextdraw CreateTextdraw_CF(SQInt32 index, const SQChar * text,
const Vector2i & pos, const Color4 & color, bool rel,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewTextdraw(index, text, pos.x, pos.y, color.GetARGB(), rel,
header, payload);

View File

@ -22,92 +22,92 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CTextdraw(const Reference< CTextdraw > & o) noexcept;
CTextdraw(const Reference< CTextdraw > & o);
/* --------------------------------------------------------------------------------------------
* Show the referenced textdraw instance to all players on the server.
*/
void ShowAll() const noexcept;
void ShowAll() const;
/* --------------------------------------------------------------------------------------------
* Show the referenced textdraw instance to the specified player instance.
*/
void ShowFor(const Reference< CPlayer > & player) const noexcept;
void ShowFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Show the referenced textdraw instance to all players in the specified range.
*/
void ShowRange(SQInt32 first, SQInt32 last) const noexcept;
void ShowRange(SQInt32 first, SQInt32 last) const;
/* --------------------------------------------------------------------------------------------
* Hide the referenced textdraw instance from all players on the server.
*/
void HideAll() const noexcept;
void HideAll() const;
/* --------------------------------------------------------------------------------------------
* Hide the referenced textdraw instance from the specified player instance.
*/
void HideFor(const Reference< CPlayer > & player) const noexcept;
void HideFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Hide the referenced textdraw instance from all players in the specified range.
*/
void HideRange(SQInt32 first, SQInt32 last) const noexcept;
void HideRange(SQInt32 first, SQInt32 last) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced textdraw instance for all players on the server.
*/
void SetPositionAll(const Vector2i & pos) const noexcept;
void SetPositionAll(const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced textdraw instance for all players on the server.
*/
void SetPositionAllEx(SQInt32 x, SQInt32 y) const noexcept;
void SetPositionAllEx(SQInt32 x, SQInt32 y) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced textdraw instance for the specified player instance.
*/
void SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const noexcept;
void SetPositionFor(const Reference< CPlayer > & player, const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced textdraw instance for the specified player instance.
*/
void SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const noexcept;
void SetPositionForEx(const Reference< CPlayer > & player, SQInt32 x, SQInt32 y) const;
/* --------------------------------------------------------------------------------------------
* Set the position of the referenced textdraw instance for all players in the specified range.
*/
void SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const noexcept;
void SetPositionRange(SQInt32 first, SQInt32 last, const Vector2i & pos) const;
/* --------------------------------------------------------------------------------------------
* Set the center of the referenced textdraw instance for all players on the server.
*/
void SetColorAll(const Color4 & col) const noexcept;
void SetColorAll(const Color4 & col) const;
/* --------------------------------------------------------------------------------------------
* Set the color of the referenced textdraw instance for all players on the server.
*/
void SetColorAllEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept;
void SetColorAllEx(Uint8 r, Uint8 g, Uint8 b, Uint8 a) const;
/* --------------------------------------------------------------------------------------------
* Set the color of the referenced textdraw instance for the specified player instance.
*/
void SetColorFor(const Reference< CPlayer > & player, const Color4 & col) const noexcept;
void SetColorFor(const Reference< CPlayer > & player, const Color4 & col) const;
/* --------------------------------------------------------------------------------------------
* Set the color of the referenced textdraw instance for the specified player instance.
*/
void SetColorForEx(const Reference< CPlayer > & player, Uint8 r, Uint8 g, Uint8 b, Uint8 a) const noexcept;
void SetColorForEx(const Reference< CPlayer > & player, Uint8 r, Uint8 g, Uint8 b, Uint8 a) const;
/* --------------------------------------------------------------------------------------------
* Set the color of the referenced textdraw instance for all players in the specified range.
*/
void SetColorRange(SQInt32 first, SQInt32 last, const Color4 & col) const noexcept;
void SetColorRange(SQInt32 first, SQInt32 last, const Color4 & col) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the text string used by the referenced textdraw instance.
*/
const SQChar * GetText() const noexcept;
const SQChar * GetText() const;
};
} // Namespace:: SqMod

View File

@ -17,14 +17,14 @@ Vector4 CVehicle::s_Vector4;
Quaternion CVehicle::s_Quaternion;
// ------------------------------------------------------------------------------------------------
CVehicle::CVehicle(const Reference< CVehicle > & o) noexcept
CVehicle::CVehicle(const Reference< CVehicle > & o)
: Reference(o)
{
/* ... */
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
bool CVehicle::IsStreamedFor(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -43,7 +43,7 @@ bool CVehicle::IsStreamedFor(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetSyncSource() const noexcept
SQInt32 CVehicle::GetSyncSource() const
{
if (VALID_ENTITY(m_ID))
{
@ -58,7 +58,7 @@ SQInt32 CVehicle::GetSyncSource() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetSyncType() const noexcept
SQInt32 CVehicle::GetSyncType() const
{
if (VALID_ENTITY(m_ID))
{
@ -73,7 +73,7 @@ SQInt32 CVehicle::GetSyncType() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetWorld() const noexcept
SQInt32 CVehicle::GetWorld() const
{
if (VALID_ENTITY(m_ID))
{
@ -88,7 +88,7 @@ SQInt32 CVehicle::GetWorld() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetWorld(SQInt32 world) const noexcept
void CVehicle::SetWorld(SQInt32 world) const
{
if (VALID_ENTITY(m_ID))
{
@ -101,7 +101,7 @@ void CVehicle::SetWorld(SQInt32 world) const noexcept
}
// ------------------------------------------------------------------------------------------------
const CAutomobile & CVehicle::GetModel() const noexcept
const CAutomobile & CVehicle::GetModel() const
{
// Clear any previous model
s_Automobile.SetID(SQMOD_UNKNOWN);
@ -119,7 +119,7 @@ const CAutomobile & CVehicle::GetModel() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetModelID() const noexcept
SQInt32 CVehicle::GetModelID() const
{
if (VALID_ENTITY(m_ID))
{
@ -134,7 +134,7 @@ SQInt32 CVehicle::GetModelID() const noexcept
}
// ------------------------------------------------------------------------------------------------
Reference< CPlayer > CVehicle::GetOccupant(SQInt32 slot) const noexcept
Reference< CPlayer > CVehicle::GetOccupant(SQInt32 slot) const
{
if (VALID_ENTITY(m_ID))
{
@ -149,7 +149,7 @@ Reference< CPlayer > CVehicle::GetOccupant(SQInt32 slot) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetOccupantID(SQInt32 slot) const noexcept
SQInt32 CVehicle::GetOccupantID(SQInt32 slot) const
{
if (VALID_ENTITY(m_ID))
{
@ -164,7 +164,7 @@ SQInt32 CVehicle::GetOccupantID(SQInt32 slot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::Respawn() const noexcept
void CVehicle::Respawn() const
{
if (VALID_ENTITY(m_ID))
{
@ -177,7 +177,7 @@ void CVehicle::Respawn() const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetImmunity() const noexcept
SQInt32 CVehicle::GetImmunity() const
{
if (VALID_ENTITY(m_ID))
{
@ -192,7 +192,7 @@ SQInt32 CVehicle::GetImmunity() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetImmunity(SQInt32 flags) const noexcept
void CVehicle::SetImmunity(SQInt32 flags) const
{
if (VALID_ENTITY(m_ID))
{
@ -205,7 +205,7 @@ void CVehicle::SetImmunity(SQInt32 flags) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::IsWrecked() const noexcept
bool CVehicle::IsWrecked() const
{
if (VALID_ENTITY(m_ID))
{
@ -220,7 +220,7 @@ bool CVehicle::IsWrecked() const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetPosition() const noexcept
const Vector3 & CVehicle::GetPosition() const
{
// Clear any previous position
s_Vector3.Clear();
@ -238,7 +238,7 @@ const Vector3 & CVehicle::GetPosition() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetPosition(const Vector3 & pos) const noexcept
void CVehicle::SetPosition(const Vector3 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -251,7 +251,7 @@ void CVehicle::SetPosition(const Vector3 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetPositionEx(const Vector3 & pos, bool empty) const noexcept
void CVehicle::SetPositionEx(const Vector3 & pos, bool empty) const
{
if (VALID_ENTITY(m_ID))
{
@ -264,7 +264,7 @@ void CVehicle::SetPositionEx(const Vector3 & pos, bool empty) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -277,7 +277,7 @@ void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z, bool empty) const noexcept
void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z, bool empty) const
{
if (VALID_ENTITY(m_ID))
{
@ -290,7 +290,7 @@ void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z, bool empty) const
}
// ------------------------------------------------------------------------------------------------
const Quaternion & CVehicle::GetRotation() const noexcept
const Quaternion & CVehicle::GetRotation() const
{
// Clear any previous rotation
s_Quaternion.Clear();
@ -308,7 +308,7 @@ const Quaternion & CVehicle::GetRotation() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRotation(const Quaternion & rot) const noexcept
void CVehicle::SetRotation(const Quaternion & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -321,7 +321,7 @@ void CVehicle::SetRotation(const Quaternion & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept
void CVehicle::SetRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
{
if (VALID_ENTITY(m_ID))
{
@ -334,7 +334,7 @@ void CVehicle::SetRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const n
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetRotationEuler() const noexcept
const Vector3 & CVehicle::GetRotationEuler() const
{
// Clear any previous rotation
s_Vector3.Clear();
@ -352,7 +352,7 @@ const Vector3 & CVehicle::GetRotationEuler() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRotationEuler(const Vector3 & rot) const noexcept
void CVehicle::SetRotationEuler(const Vector3 & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -365,7 +365,7 @@ void CVehicle::SetRotationEuler(const Vector3 & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -378,7 +378,7 @@ void CVehicle::SetRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcep
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetSpeed() const noexcept
const Vector3 & CVehicle::GetSpeed() const
{
// Clear any previous speed
s_Vector3.Clear();
@ -396,7 +396,7 @@ const Vector3 & CVehicle::GetSpeed() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpeed(const Vector3 & vel) const noexcept
void CVehicle::SetSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -409,7 +409,7 @@ void CVehicle::SetSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -422,7 +422,7 @@ void CVehicle::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddSpeed(const Vector3 & vel) const noexcept
void CVehicle::AddSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -435,7 +435,7 @@ void CVehicle::AddSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -448,7 +448,7 @@ void CVehicle::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetRelSpeed() const noexcept
const Vector3 & CVehicle::GetRelSpeed() const
{
// Clear any previous speed
s_Vector3.Clear();
@ -466,7 +466,7 @@ const Vector3 & CVehicle::GetRelSpeed() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRelSpeed(const Vector3 & vel) const noexcept
void CVehicle::SetRelSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -479,7 +479,7 @@ void CVehicle::SetRelSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -492,7 +492,7 @@ void CVehicle::SetRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddRelSpeed(const Vector3 & vel) const noexcept
void CVehicle::AddRelSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -505,7 +505,7 @@ void CVehicle::AddRelSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::AddRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -518,7 +518,7 @@ void CVehicle::AddRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetTurnSpeed() const noexcept
const Vector3 & CVehicle::GetTurnSpeed() const
{
// Clear any previous speed
s_Vector3.Clear();
@ -536,7 +536,7 @@ const Vector3 & CVehicle::GetTurnSpeed() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetTurnSpeed(const Vector3 & vel) const noexcept
void CVehicle::SetTurnSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -549,7 +549,7 @@ void CVehicle::SetTurnSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -562,7 +562,7 @@ void CVehicle::SetTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddTurnSpeed(const Vector3 & vel) const noexcept
void CVehicle::AddTurnSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -575,7 +575,7 @@ void CVehicle::AddTurnSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::AddTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -588,7 +588,7 @@ void CVehicle::AddTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetRelTurnSpeed() const noexcept
const Vector3 & CVehicle::GetRelTurnSpeed() const
{
// Clear any previous speed
s_Vector3.Clear();
@ -606,7 +606,7 @@ const Vector3 & CVehicle::GetRelTurnSpeed() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRelTurnSpeed(const Vector3 & vel) const noexcept
void CVehicle::SetRelTurnSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -619,7 +619,7 @@ void CVehicle::SetRelTurnSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -632,7 +632,7 @@ void CVehicle::SetRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddRelTurnSpeed(const Vector3 & vel) const noexcept
void CVehicle::AddRelTurnSpeed(const Vector3 & vel) const
{
if (VALID_ENTITY(m_ID))
{
@ -645,7 +645,7 @@ void CVehicle::AddRelTurnSpeed(const Vector3 & vel) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::AddRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::AddRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -658,7 +658,7 @@ void CVehicle::AddRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
}
// ------------------------------------------------------------------------------------------------
const Vector4 & CVehicle::GetSpawnPosition() const noexcept
const Vector4 & CVehicle::GetSpawnPosition() const
{
// Clear any previous position
s_Vector4.Clear();
@ -676,7 +676,7 @@ const Vector4 & CVehicle::GetSpawnPosition() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpawnPosition(const Vector4 & pos) const noexcept
void CVehicle::SetSpawnPosition(const Vector4 & pos) const
{
if (VALID_ENTITY(m_ID))
{
@ -689,7 +689,7 @@ void CVehicle::SetSpawnPosition(const Vector4 & pos) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpawnPositionEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept
void CVehicle::SetSpawnPositionEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
{
if (VALID_ENTITY(m_ID))
{
@ -702,7 +702,7 @@ void CVehicle::SetSpawnPositionEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) co
}
// ------------------------------------------------------------------------------------------------
const Quaternion & CVehicle::GetSpawnRotation() const noexcept
const Quaternion & CVehicle::GetSpawnRotation() const
{
// Clear any previous rotation
s_Quaternion.Clear();
@ -720,7 +720,7 @@ const Quaternion & CVehicle::GetSpawnRotation() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpawnRotation(const Quaternion & rot) const noexcept
void CVehicle::SetSpawnRotation(const Quaternion & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -733,7 +733,7 @@ void CVehicle::SetSpawnRotation(const Quaternion & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpawnRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept
void CVehicle::SetSpawnRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
{
if (VALID_ENTITY(m_ID))
{
@ -746,7 +746,7 @@ void CVehicle::SetSpawnRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) co
}
// ------------------------------------------------------------------------------------------------
const Vector3 & CVehicle::GetSpawnRotationEuler() const noexcept
const Vector3 & CVehicle::GetSpawnRotationEuler() const
{
// Clear any previous rotation
s_Vector3.Clear();
@ -764,7 +764,7 @@ const Vector3 & CVehicle::GetSpawnRotationEuler() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpawnRotationEuler(const Vector3 & rot) const noexcept
void CVehicle::SetSpawnRotationEuler(const Vector3 & rot) const
{
if (VALID_ENTITY(m_ID))
{
@ -777,7 +777,7 @@ void CVehicle::SetSpawnRotationEuler(const Vector3 & rot) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSpawnRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept
void CVehicle::SetSpawnRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const
{
if (VALID_ENTITY(m_ID))
{
@ -790,7 +790,7 @@ void CVehicle::SetSpawnRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const no
}
// ------------------------------------------------------------------------------------------------
SQUint32 CVehicle::GetRespawnTimer() const noexcept
SQUint32 CVehicle::GetRespawnTimer() const
{
if (VALID_ENTITY(m_ID))
{
@ -805,7 +805,7 @@ SQUint32 CVehicle::GetRespawnTimer() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRespawnTimer(SQUint32 timer) const noexcept
void CVehicle::SetRespawnTimer(SQUint32 timer) const
{
if (VALID_ENTITY(m_ID))
{
@ -818,7 +818,7 @@ void CVehicle::SetRespawnTimer(SQUint32 timer) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CVehicle::GetHealth() const noexcept
SQFloat CVehicle::GetHealth() const
{
if (VALID_ENTITY(m_ID))
{
@ -833,7 +833,7 @@ SQFloat CVehicle::GetHealth() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetHealth(SQFloat amount) const noexcept
void CVehicle::SetHealth(SQFloat amount) const
{
if (VALID_ENTITY(m_ID))
{
@ -846,7 +846,7 @@ void CVehicle::SetHealth(SQFloat amount) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetPrimaryColor() const noexcept
SQInt32 CVehicle::GetPrimaryColor() const
{
if (VALID_ENTITY(m_ID))
{
@ -863,7 +863,7 @@ SQInt32 CVehicle::GetPrimaryColor() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetPrimaryColor(SQInt32 col) const noexcept
void CVehicle::SetPrimaryColor(SQInt32 col) const
{
if (VALID_ENTITY(m_ID) && VALID_VEHCOL(col))
{
@ -882,7 +882,7 @@ void CVehicle::SetPrimaryColor(SQInt32 col) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetSecondaryColor() const noexcept
SQInt32 CVehicle::GetSecondaryColor() const
{
if (VALID_ENTITY(m_ID))
{
@ -899,7 +899,7 @@ SQInt32 CVehicle::GetSecondaryColor() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetSecondaryColor(SQInt32 col) const noexcept
void CVehicle::SetSecondaryColor(SQInt32 col) const
{
if (VALID_ENTITY(m_ID) && VALID_VEHCOL(col))
{
@ -918,7 +918,7 @@ void CVehicle::SetSecondaryColor(SQInt32 col) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetColors(SQInt32 primary, SQInt32 secondary) const noexcept
void CVehicle::SetColors(SQInt32 primary, SQInt32 secondary) const
{
if (VALID_ENTITY(m_ID) && VALID_VEHCOL(primary) && VALID_VEHCOL(secondary))
{
@ -935,7 +935,7 @@ void CVehicle::SetColors(SQInt32 primary, SQInt32 secondary) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::IsLocked() const noexcept
bool CVehicle::IsLocked() const
{
if (VALID_ENTITY(m_ID))
{
@ -950,7 +950,7 @@ bool CVehicle::IsLocked() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetLocked(bool toggle) const noexcept
void CVehicle::SetLocked(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -963,7 +963,7 @@ void CVehicle::SetLocked(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetPartStatus(SQInt32 part) const noexcept
SQInt32 CVehicle::GetPartStatus(SQInt32 part) const
{
if (VALID_ENTITY(m_ID))
{
@ -978,7 +978,7 @@ SQInt32 CVehicle::GetPartStatus(SQInt32 part) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetPartStatus(SQInt32 part, SQInt32 status) const noexcept
void CVehicle::SetPartStatus(SQInt32 part, SQInt32 status) const
{
if (VALID_ENTITY(m_ID))
{
@ -991,7 +991,7 @@ void CVehicle::SetPartStatus(SQInt32 part, SQInt32 status) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetTyreStatus(SQInt32 tyre) const noexcept
SQInt32 CVehicle::GetTyreStatus(SQInt32 tyre) const
{
if (VALID_ENTITY(m_ID))
{
@ -1006,7 +1006,7 @@ SQInt32 CVehicle::GetTyreStatus(SQInt32 tyre) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetTyreStatus(SQInt32 tyre, SQInt32 status) const noexcept
void CVehicle::SetTyreStatus(SQInt32 tyre, SQInt32 status) const
{
if (VALID_ENTITY(m_ID))
{
@ -1019,7 +1019,7 @@ void CVehicle::SetTyreStatus(SQInt32 tyre, SQInt32 status) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQUint32 CVehicle::GetDamageData() const noexcept
SQUint32 CVehicle::GetDamageData() const
{
if (VALID_ENTITY(m_ID))
{
@ -1034,7 +1034,7 @@ SQUint32 CVehicle::GetDamageData() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetDamageData(SQUint32 data) const noexcept
void CVehicle::SetDamageData(SQUint32 data) const
{
if (VALID_ENTITY(m_ID))
{
@ -1047,7 +1047,7 @@ void CVehicle::SetDamageData(SQUint32 data) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::HasAlarm() const noexcept
bool CVehicle::HasAlarm() const
{
if (VALID_ENTITY(m_ID))
{
@ -1062,7 +1062,7 @@ bool CVehicle::HasAlarm() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetAlarm(bool toggle) const noexcept
void CVehicle::SetAlarm(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1075,7 +1075,7 @@ void CVehicle::SetAlarm(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::HasLights() const noexcept
bool CVehicle::HasLights() const
{
if (VALID_ENTITY(m_ID))
{
@ -1090,7 +1090,7 @@ bool CVehicle::HasLights() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetLights(bool toggle) const noexcept
void CVehicle::SetLights(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1103,7 +1103,7 @@ void CVehicle::SetLights(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 CVehicle::GetRadio() const noexcept
SQInt32 CVehicle::GetRadio() const
{
if (VALID_ENTITY(m_ID))
{
@ -1118,7 +1118,7 @@ SQInt32 CVehicle::GetRadio() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRadio(SQInt32 radio) const noexcept
void CVehicle::SetRadio(SQInt32 radio) const
{
if (VALID_ENTITY(m_ID) && VALID_ENTITY(radio))
{
@ -1135,7 +1135,7 @@ void CVehicle::SetRadio(SQInt32 radio) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::IsRadioLocked() const noexcept
bool CVehicle::IsRadioLocked() const
{
if (VALID_ENTITY(m_ID))
{
@ -1150,7 +1150,7 @@ bool CVehicle::IsRadioLocked() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetRadioLocked(bool toggle) const noexcept
void CVehicle::SetRadioLocked(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1163,7 +1163,7 @@ void CVehicle::SetRadioLocked(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::IsGhostState() const noexcept
bool CVehicle::IsGhostState() const
{
if (VALID_ENTITY(m_ID))
{
@ -1178,7 +1178,7 @@ bool CVehicle::IsGhostState() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetGhostState(bool toggle) const noexcept
void CVehicle::SetGhostState(bool toggle) const
{
if (VALID_ENTITY(m_ID))
{
@ -1191,7 +1191,7 @@ void CVehicle::SetGhostState(bool toggle) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::ResetHandling() const noexcept
void CVehicle::ResetHandling() const
{
if (VALID_ENTITY(m_ID))
{
@ -1204,7 +1204,7 @@ void CVehicle::ResetHandling() const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::ResetHandling(SQInt32 rule) const noexcept
void CVehicle::ResetHandling(SQInt32 rule) const
{
if (VALID_ENTITY(m_ID))
{
@ -1217,7 +1217,7 @@ void CVehicle::ResetHandling(SQInt32 rule) const noexcept
}
// ------------------------------------------------------------------------------------------------
bool CVehicle::ExistsHandling(SQInt32 rule) const noexcept
bool CVehicle::ExistsHandling(SQInt32 rule) const
{
if (VALID_ENTITY(m_ID))
{
@ -1232,7 +1232,7 @@ bool CVehicle::ExistsHandling(SQInt32 rule) const noexcept
}
// ------------------------------------------------------------------------------------------------
SQFloat CVehicle::GetHandlingData(SQInt32 rule) const noexcept
SQFloat CVehicle::GetHandlingData(SQInt32 rule) const
{
if (VALID_ENTITY(m_ID))
{
@ -1247,7 +1247,7 @@ SQFloat CVehicle::GetHandlingData(SQInt32 rule) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetHandlingData(SQInt32 rule, SQFloat data) const noexcept
void CVehicle::SetHandlingData(SQInt32 rule, SQFloat data) const
{
if (VALID_ENTITY(m_ID))
{
@ -1260,7 +1260,7 @@ void CVehicle::SetHandlingData(SQInt32 rule, SQFloat data) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::Embark(const Reference< CPlayer > & player) const noexcept
void CVehicle::Embark(const Reference< CPlayer > & player) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -1277,7 +1277,7 @@ void CVehicle::Embark(const Reference< CPlayer > & player) const noexcept
}
// ------------------------------------------------------------------------------------------------
void CVehicle::Embark(const Reference< CPlayer > & player, SQInt32 slot, bool allocate, bool warp) const noexcept
void CVehicle::Embark(const Reference< CPlayer > & player, SQInt32 slot, bool allocate, bool warp) const
{
if (VALID_ENTITY(m_ID) && player)
{
@ -1296,7 +1296,7 @@ void CVehicle::Embark(const Reference< CPlayer > & player, SQInt32 slot, bool al
// ------------------------------------------------------------------------------------------------
Reference< CVehicle > CreateBaseVehicle_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary) noexcept
SQFloat angle, SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1305,7 +1305,7 @@ Reference< CVehicle > CreateBaseVehicle_PEF(SQInt32 model, SQInt32 world,
Reference< CVehicle > CreateBaseVehicle_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
header, payload);
@ -1313,7 +1313,7 @@ Reference< CVehicle > CreateBaseVehicle_PEF(SQInt32 model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
Reference< CVehicle > CreateBaseVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
SQFloat angle, SQInt32 primary, SQInt32 secondary) noexcept
SQFloat angle, SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1321,7 +1321,7 @@ Reference< CVehicle > CreateBaseVehicle_PCF(SQInt32 model, SQInt32 world, const
Reference< CVehicle > CreateBaseVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
header, payload);
@ -1330,7 +1330,7 @@ Reference< CVehicle > CreateBaseVehicle_PCF(SQInt32 model, SQInt32 world, const
// ------------------------------------------------------------------------------------------------
Reference< CVehicle > CreateBaseVehicle_EF(const CAutomobile & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary) noexcept
SQFloat angle, SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1339,7 +1339,7 @@ Reference< CVehicle > CreateBaseVehicle_EF(const CAutomobile & model, SQInt32 wo
Reference< CVehicle > CreateBaseVehicle_EF(const CAutomobile & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
header, payload);
@ -1348,7 +1348,7 @@ Reference< CVehicle > CreateBaseVehicle_EF(const CAutomobile & model, SQInt32 wo
// ------------------------------------------------------------------------------------------------
Reference< CVehicle > CreateBaseVehicle_CF(const CAutomobile & model, SQInt32 world,
const Vector3 & pos, SQFloat angle,
SQInt32 primary, SQInt32 secondary) noexcept
SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1356,7 +1356,7 @@ Reference< CVehicle > CreateBaseVehicle_CF(const CAutomobile & model, SQInt32 wo
Reference< CVehicle > CreateBaseVehicle_CF(const CAutomobile & model, SQInt32 world,
const Vector3 & pos, SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
header, payload);
@ -1365,7 +1365,7 @@ Reference< CVehicle > CreateBaseVehicle_CF(const CAutomobile & model, SQInt32 wo
// ------------------------------------------------------------------------------------------------
CVehicle CreateVehicle_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary) noexcept
SQFloat angle, SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1374,7 +1374,7 @@ CVehicle CreateVehicle_PEF(SQInt32 model, SQInt32 world,
CVehicle CreateVehicle_PEF(SQInt32 model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
header, payload);
@ -1382,7 +1382,7 @@ CVehicle CreateVehicle_PEF(SQInt32 model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CVehicle CreateVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
SQFloat angle, SQInt32 primary, SQInt32 secondary) noexcept
SQFloat angle, SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1390,7 +1390,7 @@ CVehicle CreateVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
CVehicle CreateVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
header, payload);
@ -1399,7 +1399,7 @@ CVehicle CreateVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
// ------------------------------------------------------------------------------------------------
CVehicle CreateVehicle_EF(const CAutomobile & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary) noexcept
SQFloat angle, SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1408,7 +1408,7 @@ CVehicle CreateVehicle_EF(const CAutomobile & model, SQInt32 world,
CVehicle CreateVehicle_EF(const CAutomobile & model, SQInt32 world,
SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
header, payload);
@ -1417,7 +1417,7 @@ CVehicle CreateVehicle_EF(const CAutomobile & model, SQInt32 world,
// ------------------------------------------------------------------------------------------------
CVehicle CreateVehicle_CF(const CAutomobile & model, SQInt32 world,
const Vector3 & pos, SQFloat angle,
SQInt32 primary, SQInt32 secondary) noexcept
SQInt32 primary, SQInt32 secondary)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
SQMOD_CREATE_DEFAULT, NullData());
@ -1425,7 +1425,7 @@ CVehicle CreateVehicle_CF(const CAutomobile & model, SQInt32 world,
CVehicle CreateVehicle_CF(const CAutomobile & model, SQInt32 world,
const Vector3 & pos, SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload) noexcept
SQInt32 header, SqObj & payload)
{
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
header, payload);

View File

@ -30,442 +30,442 @@ public:
/* --------------------------------------------------------------------------------------------
* Construct a reference from a base reference.
*/
CVehicle(const Reference< CVehicle > & o) noexcept;
CVehicle(const Reference< CVehicle > & o);
/* --------------------------------------------------------------------------------------------
* See if the referenced vehicle instance is streamed for the specified player.
*/
bool IsStreamedFor(const Reference< CPlayer > & player) const noexcept;
bool IsStreamedFor(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the synchronization source of the referenced vehicle instance.
*/
SQInt32 GetSyncSource() const noexcept;
SQInt32 GetSyncSource() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the synchronization type of the referenced vehicle instance.
*/
SQInt32 GetSyncType() const noexcept;
SQInt32 GetSyncType() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the world in which the referenced vehicle instance exists.
*/
SQInt32 GetWorld() const noexcept;
SQInt32 GetWorld() const;
/* --------------------------------------------------------------------------------------------
* Change the world in which the referenced vehicle instance exists.
*/
void SetWorld(SQInt32 world) const noexcept;
void SetWorld(SQInt32 world) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the vehicle model of the referenced vehicle instance.
*/
const CAutomobile & GetModel() const noexcept;
const CAutomobile & GetModel() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the vehicle model id of the referenced vehicle instance.
*/
SQInt32 GetModelID() const noexcept;
SQInt32 GetModelID() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the slot occupant from the referenced vehicle instance.
*/
Reference< CPlayer > GetOccupant(SQInt32 slot) const noexcept;
Reference< CPlayer > GetOccupant(SQInt32 slot) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the slot occupant identifier from the referenced vehicle instance.
*/
SQInt32 GetOccupantID(SQInt32 slot) const noexcept;
SQInt32 GetOccupantID(SQInt32 slot) const;
/* --------------------------------------------------------------------------------------------
* Respawn the referenced vehicle instance.
*/
void Respawn() const noexcept;
void Respawn() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the immunity flags of the referenced vehicle instance.
*/
SQInt32 GetImmunity() const noexcept;
SQInt32 GetImmunity() const;
/* --------------------------------------------------------------------------------------------
* Change the immunity flags of the referenced vehicle instance.
*/
void SetImmunity(SQInt32 flags) const noexcept;
void SetImmunity(SQInt32 flags) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced vehicle instance is wrecked.
*/
bool IsWrecked() const noexcept;
bool IsWrecked() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the position of the referenced vehicle instance.
*/
const Vector3 & GetPosition() const noexcept;
const Vector3 & GetPosition() const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced vehicle instance.
*/
void SetPosition(const Vector3 & pos) const noexcept;
void SetPosition(const Vector3 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced vehicle instance.
*/
void SetPositionEx(const Vector3 & pos, bool empty) const noexcept;
void SetPositionEx(const Vector3 & pos, bool empty) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced vehicle instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Change the position of the referenced vehicle instance.
*/
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z, bool empty) const noexcept;
void SetPositionEx(SQFloat x, SQFloat y, SQFloat z, bool empty) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the rotation of the referenced vehicle instance.
*/
const Quaternion & GetRotation() const noexcept;
const Quaternion & GetRotation() const;
/* --------------------------------------------------------------------------------------------
* Change the rotation of the referenced vehicle instance.
*/
void SetRotation(const Quaternion & rot) const noexcept;
void SetRotation(const Quaternion & rot) const;
/* --------------------------------------------------------------------------------------------
* Change the rotation of the referenced vehicle instance.
*/
void SetRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept;
void SetRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the euler rotation of the referenced vehicle instance.
*/
const Vector3 & GetRotationEuler() const noexcept;
const Vector3 & GetRotationEuler() const;
/* --------------------------------------------------------------------------------------------
* Change the euler rotation of the referenced vehicle instance.
*/
void SetRotationEuler(const Vector3 & rot) const noexcept;
void SetRotationEuler(const Vector3 & rot) const;
/* --------------------------------------------------------------------------------------------
* Change the euler rotation of the referenced vehicle instance.
*/
void SetRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the speed of the referenced vehicle instance.
*/
const Vector3 & GetSpeed() const noexcept;
const Vector3 & GetSpeed() const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced vehicle instance.
*/
void SetSpeed(const Vector3 & vel) const noexcept;
void SetSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced vehicle instance.
*/
void SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced vehicle instance.
*/
void AddSpeed(const Vector3 & vel) const noexcept;
void AddSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the speed of the referenced vehicle instance.
*/
void AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the relative speed of the referenced vehicle instance.
*/
const Vector3 & GetRelSpeed() const noexcept;
const Vector3 & GetRelSpeed() const;
/* --------------------------------------------------------------------------------------------
* Change the relative speed of the referenced vehicle instance.
*/
void SetRelSpeed(const Vector3 & vel) const noexcept;
void SetRelSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the relative speed of the referenced vehicle instance.
*/
void SetRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Change the relative speed of the referenced vehicle instance.
*/
void AddRelSpeed(const Vector3 & vel) const noexcept;
void AddRelSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the relative speed of the referenced vehicle instance.
*/
void AddRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void AddRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the turn speed of the referenced vehicle instance.
*/
const Vector3 & GetTurnSpeed() const noexcept;
const Vector3 & GetTurnSpeed() const;
/* --------------------------------------------------------------------------------------------
* Change the turn speed of the referenced vehicle instance.
*/
void SetTurnSpeed(const Vector3 & vel) const noexcept;
void SetTurnSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the turn speed of the referenced vehicle instance.
*/
void SetTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Change the turn speed of the referenced vehicle instance.
*/
void AddTurnSpeed(const Vector3 & vel) const noexcept;
void AddTurnSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the turn speed of the referenced vehicle instance.
*/
void AddTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void AddTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the relative turn speed of the referenced vehicle instance.
*/
const Vector3 & GetRelTurnSpeed() const noexcept;
const Vector3 & GetRelTurnSpeed() const;
/* --------------------------------------------------------------------------------------------
* Change the relative turn speed of the referenced vehicle instance.
*/
void SetRelTurnSpeed(const Vector3 & vel) const noexcept;
void SetRelTurnSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the relative turn speed of the referenced vehicle instance.
*/
void SetRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Change the relative turn speed of the referenced vehicle instance.
*/
void AddRelTurnSpeed(const Vector3 & vel) const noexcept;
void AddRelTurnSpeed(const Vector3 & vel) const;
/* --------------------------------------------------------------------------------------------
* Change the relative turn speed of the referenced vehicle instance.
*/
void AddRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void AddRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the spawn position of the referenced vehicle instance.
*/
const Vector4 & GetSpawnPosition() const noexcept;
const Vector4 & GetSpawnPosition() const;
/* --------------------------------------------------------------------------------------------
* Change the spawn position of the referenced vehicle instance.
*/
void SetSpawnPosition(const Vector4 & pos) const noexcept;
void SetSpawnPosition(const Vector4 & pos) const;
/* --------------------------------------------------------------------------------------------
* Change the spawn position of the referenced vehicle instance.
*/
void SetSpawnPositionEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept;
void SetSpawnPositionEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the spawn rotation of the referenced vehicle instance.
*/
const Quaternion & GetSpawnRotation() const noexcept;
const Quaternion & GetSpawnRotation() const;
/* --------------------------------------------------------------------------------------------
* Change the spawn rotation of the referenced vehicle instance.
*/
void SetSpawnRotation(const Quaternion & rot) const noexcept;
void SetSpawnRotation(const Quaternion & rot) const;
/* --------------------------------------------------------------------------------------------
* Change the spawn rotation of the referenced vehicle instance.
*/
void SetSpawnRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const noexcept;
void SetSpawnRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the euler spawn rotation of the referenced vehicle instance.
*/
const Vector3 & GetSpawnRotationEuler() const noexcept;
const Vector3 & GetSpawnRotationEuler() const;
/* --------------------------------------------------------------------------------------------
* Change the euler spawn rotation of the referenced vehicle instance.
*/
void SetSpawnRotationEuler(const Vector3 & rot) const noexcept;
void SetSpawnRotationEuler(const Vector3 & rot) const;
/* --------------------------------------------------------------------------------------------
* Change the euler spawn rotation of the referenced vehicle instance.
*/
void SetSpawnRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const noexcept;
void SetSpawnRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the respawn timer of the referenced vehicle instance.
*/
SQUint32 GetRespawnTimer() const noexcept;
SQUint32 GetRespawnTimer() const;
/* --------------------------------------------------------------------------------------------
* Change the respawn timer of the referenced vehicle instance.
*/
void SetRespawnTimer(SQUint32 timer) const noexcept;
void SetRespawnTimer(SQUint32 timer) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the health of the referenced vehicle instance.
*/
SQFloat GetHealth() const noexcept;
SQFloat GetHealth() const;
/* --------------------------------------------------------------------------------------------
* Change the health of the referenced vehicle instance.
*/
void SetHealth(SQFloat amount) const noexcept;
void SetHealth(SQFloat amount) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the primary color of the referenced vehicle instance.
*/
SQInt32 GetPrimaryColor() const noexcept;
SQInt32 GetPrimaryColor() const;
/* --------------------------------------------------------------------------------------------
* Change the primary color of the referenced vehicle instance.
*/
void SetPrimaryColor(SQInt32 col) const noexcept;
void SetPrimaryColor(SQInt32 col) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the secondary color of the referenced vehicle instance.
*/
SQInt32 GetSecondaryColor() const noexcept;
SQInt32 GetSecondaryColor() const;
/* --------------------------------------------------------------------------------------------
* Change the secondary color of the referenced vehicle instance.
*/
void SetSecondaryColor(SQInt32 col) const noexcept;
void SetSecondaryColor(SQInt32 col) const;
/* --------------------------------------------------------------------------------------------
* Change the primary and secondary colors of the referenced vehicle instance.
*/
void SetColors(SQInt32 primary, SQInt32 secondary) const noexcept;
void SetColors(SQInt32 primary, SQInt32 secondary) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced vehicle instance is locked.
*/
bool IsLocked() const noexcept;
bool IsLocked() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced vehicle instance is locked.
*/
void SetLocked(bool toggle) const noexcept;
void SetLocked(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the part status of the referenced vehicle instance.
*/
SQInt32 GetPartStatus(SQInt32 part) const noexcept;
SQInt32 GetPartStatus(SQInt32 part) const;
/* --------------------------------------------------------------------------------------------
* Change the part status of the referenced vehicle instance.
*/
void SetPartStatus(SQInt32 part, SQInt32 status) const noexcept;
void SetPartStatus(SQInt32 part, SQInt32 status) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the tyre status of the referenced vehicle instance.
*/
SQInt32 GetTyreStatus(SQInt32 tyre) const noexcept;
SQInt32 GetTyreStatus(SQInt32 tyre) const;
/* --------------------------------------------------------------------------------------------
* Change the tyre status of the referenced vehicle instance.
*/
void SetTyreStatus(SQInt32 tyre, SQInt32 status) const noexcept;
void SetTyreStatus(SQInt32 tyre, SQInt32 status) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the damage data of the referenced vehicle instance.
*/
SQUint32 GetDamageData() const noexcept;
SQUint32 GetDamageData() const;
/* --------------------------------------------------------------------------------------------
* Change the damage data of the referenced vehicle instance.
*/
void SetDamageData(SQUint32 data) const noexcept;
void SetDamageData(SQUint32 data) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced vehicle instance has alarm.
*/
bool HasAlarm() const noexcept;
bool HasAlarm() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced vehicle instance has alarm.
*/
void SetAlarm(bool toggle) const noexcept;
void SetAlarm(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced vehicle instance has lights.
*/
bool HasLights() const noexcept;
bool HasLights() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced vehicle instance has lights.
*/
void SetLights(bool toggle) const noexcept;
void SetLights(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the radio of the referenced vehicle instance.
*/
SQInt32 GetRadio() const noexcept;
SQInt32 GetRadio() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the radio of the referenced vehicle instance.
*/
void SetRadio(SQInt32 radio) const noexcept;
void SetRadio(SQInt32 radio) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced vehicle instance has radio locked.
*/
bool IsRadioLocked() const noexcept;
bool IsRadioLocked() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced vehicle instance has radio locked.
*/
void SetRadioLocked(bool toggle) const noexcept;
void SetRadioLocked(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* See whether the referenced vehicle instance is in ghost state.
*/
bool IsGhostState() const noexcept;
bool IsGhostState() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced vehicle instance is in ghost state.
*/
void SetGhostState(bool toggle) const noexcept;
void SetGhostState(bool toggle) const;
/* --------------------------------------------------------------------------------------------
* Reset all the handling rules for the referenced vehicle instance.
*/
void ResetHandling() const noexcept;
void ResetHandling() const;
/* --------------------------------------------------------------------------------------------
* Reset the specified handling rule for the referenced vehicle instance.
*/
void ResetHandling(SQInt32 rule) const noexcept;
void ResetHandling(SQInt32 rule) const;
/* --------------------------------------------------------------------------------------------
* See whether the specified handling ruleexists in the referenced vehicle instance.
*/
bool ExistsHandling(SQInt32 rule) const noexcept;
bool ExistsHandling(SQInt32 rule) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the handling data of the referenced vehicle instance.
*/
SQFloat GetHandlingData(SQInt32 rule) const noexcept;
SQFloat GetHandlingData(SQInt32 rule) const;
/* --------------------------------------------------------------------------------------------
* Change the handling data of the referenced vehicle instance.
*/
void SetHandlingData(SQInt32 rule, SQFloat data) const noexcept;
void SetHandlingData(SQInt32 rule, SQFloat data) const;
/* --------------------------------------------------------------------------------------------
* Embark the specified player instance into the referenced vehicle instance.
*/
void Embark(const Reference< CPlayer > & player) const noexcept;
void Embark(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Embark the specified player instance into the referenced vehicle instance.
*/
void Embark(const Reference< CPlayer > & player, SQInt32 slot, bool allocate, bool warp) const noexcept;
void Embark(const Reference< CPlayer > & player, SQInt32 slot, bool allocate, bool warp) const;
};
} // Namespace:: SqMod

File diff suppressed because it is too large Load Diff

View File

@ -26,17 +26,17 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
BasicEvent() noexcept;
BasicEvent();
/* --------------------------------------------------------------------------------------------
* ...
*/
BasicEvent(SQInt32 type) noexcept;
BasicEvent(SQInt32 type);
/* --------------------------------------------------------------------------------------------
* ...
*/
BasicEvent(SQInt32 type, bool suspended) noexcept;
BasicEvent(SQInt32 type, bool suspended);
/* --------------------------------------------------------------------------------------------
* ...
@ -66,37 +66,37 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator == (const BasicEvent & o) const noexcept;
bool operator == (const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator != (const BasicEvent & o) const noexcept;
bool operator != (const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator < (const BasicEvent & o) const noexcept;
bool operator < (const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator > (const BasicEvent & o) const noexcept;
bool operator > (const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator <= (const BasicEvent & o) const noexcept;
bool operator <= (const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator >= (const BasicEvent & o) const noexcept;
bool operator >= (const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator SQInt32 () const noexcept
operator SQInt32 () const
{
return m_Type;
}
@ -104,7 +104,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
operator bool () const noexcept
operator bool () const
{
return (m_Type != EVT_UNKNOWN && m_Type < EVT_COUNT);
}
@ -112,7 +112,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
operator ! () const noexcept
operator ! () const
{
return (m_Type == EVT_UNKNOWN || m_Type >= EVT_COUNT);
}
@ -120,669 +120,669 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
void VMClose() noexcept;
void VMClose();
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Cmp(const BasicEvent & o) const noexcept;
SQInt32 Cmp(const BasicEvent & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
const SQChar * GetName() const noexcept;
const SQChar * GetName() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
const SQChar * GetTag() const noexcept;
const SQChar * GetTag() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetTag(const SQChar * tag) noexcept;
void SetTag(const SQChar * tag);
/* --------------------------------------------------------------------------------------------
* ...
*/
SqObj & GetData() noexcept;
SqObj & GetData();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetData(SqObj & data) noexcept;
void SetData(SqObj & data);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetType() const noexcept;
SQInt32 GetType() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetType(SQInt32 type) noexcept;
void SetType(SQInt32 type);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger GetIdle() const noexcept;
SQInteger GetIdle() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetIdle(SQInteger millis) noexcept;
void SetIdle(SQInteger millis);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool IsIdle() const noexcept;
bool IsIdle() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetStride() const noexcept;
SQInt32 GetStride() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetStride(SQInt32 stride) noexcept;
void SetStride(SQInt32 stride);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetIgnore() const noexcept;
SQInt32 GetIgnore() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetIgnore(SQInt32 ignore) noexcept;
void SetIgnore(SQInt32 ignore);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetPrimary() const noexcept;
SQInt32 GetPrimary() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetPrimary(SQInt32 subset) noexcept;
void SetPrimary(SQInt32 subset);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetSecondary() const noexcept;
SQInt32 GetSecondary() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetSecondary(SQInt32 subset) noexcept;
void SetSecondary(SQInt32 subset);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool GetSuspended() const noexcept;
bool GetSuspended() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetSuspended(bool toggle) noexcept;
void SetSuspended(bool toggle);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnTrigger() const noexcept;
Function GetOnTrigger() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnTrigger(Function & func) noexcept;
void SetOnTrigger(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnTrigger_Env(SqObj & env, Function & func) noexcept;
void SetOnTrigger_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool Compatible(SQInt32 type) const noexcept;
bool Compatible(SQInt32 type) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void BlipCreated(SQInt32 blip, SQInt32 header, Object & payload) noexcept;
void BlipCreated(SQInt32 blip, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void CheckpointCreated(SQInt32 checkpoint, SQInt32 header, Object & payload) noexcept;
void CheckpointCreated(SQInt32 checkpoint, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void KeybindCreated(SQInt32 keybind, SQInt32 header, Object & payload) noexcept;
void KeybindCreated(SQInt32 keybind, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ObjectCreated(SQInt32 object, SQInt32 header, Object & payload) noexcept;
void ObjectCreated(SQInt32 object, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PickupCreated(SQInt32 pickup, SQInt32 header, Object & payload) noexcept;
void PickupCreated(SQInt32 pickup, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerCreated(SQInt32 player, SQInt32 header, Object & payload) noexcept;
void PlayerCreated(SQInt32 player, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SphereCreated(SQInt32 sphere, SQInt32 header, Object & payload) noexcept;
void SphereCreated(SQInt32 sphere, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SpriteCreated(SQInt32 sprite, SQInt32 header, Object & payload) noexcept;
void SpriteCreated(SQInt32 sprite, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void TextdrawCreated(SQInt32 textdraw, SQInt32 header, Object & payload) noexcept;
void TextdrawCreated(SQInt32 textdraw, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleCreated(SQInt32 vehicle, SQInt32 header, Object & payload) noexcept;
void VehicleCreated(SQInt32 vehicle, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void BlipDestroyed(SQInt32 blip, SQInt32 header, Object & payload) noexcept;
void BlipDestroyed(SQInt32 blip, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void CheckpointDestroyed(SQInt32 checkpoint, SQInt32 header, Object & payload) noexcept;
void CheckpointDestroyed(SQInt32 checkpoint, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void KeybindDestroyed(SQInt32 keybind, SQInt32 header, Object & payload) noexcept;
void KeybindDestroyed(SQInt32 keybind, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ObjectDestroyed(SQInt32 object, SQInt32 header, Object & payload) noexcept;
void ObjectDestroyed(SQInt32 object, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PickupDestroyed(SQInt32 pickup, SQInt32 header, Object & payload) noexcept;
void PickupDestroyed(SQInt32 pickup, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerDestroyed(SQInt32 player, SQInt32 header, Object & payload) noexcept;
void PlayerDestroyed(SQInt32 player, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SphereDestroyed(SQInt32 sphere, SQInt32 header, Object & payload) noexcept;
void SphereDestroyed(SQInt32 sphere, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SpriteDestroyed(SQInt32 sprite, SQInt32 header, Object & payload) noexcept;
void SpriteDestroyed(SQInt32 sprite, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void TextdrawDestroyed(SQInt32 textdraw, SQInt32 header, Object & payload) noexcept;
void TextdrawDestroyed(SQInt32 textdraw, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleDestroyed(SQInt32 vehicle, SQInt32 header, Object & payload) noexcept;
void VehicleDestroyed(SQInt32 vehicle, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void BlipCustom(SQInt32 blip, SQInt32 header, Object & payload) noexcept;
void BlipCustom(SQInt32 blip, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void CheckpointCustom(SQInt32 checkpoint, SQInt32 header, Object & payload) noexcept;
void CheckpointCustom(SQInt32 checkpoint, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void KeybindCustom(SQInt32 keybind, SQInt32 header, Object & payload) noexcept;
void KeybindCustom(SQInt32 keybind, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ObjectCustom(SQInt32 object, SQInt32 header, Object & payload) noexcept;
void ObjectCustom(SQInt32 object, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PickupCustom(SQInt32 pickup, SQInt32 header, Object & payload) noexcept;
void PickupCustom(SQInt32 pickup, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerCustom(SQInt32 player, SQInt32 header, Object & payload) noexcept;
void PlayerCustom(SQInt32 player, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SphereCustom(SQInt32 sphere, SQInt32 header, Object & payload) noexcept;
void SphereCustom(SQInt32 sphere, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SpriteCustom(SQInt32 sprite, SQInt32 header, Object & payload) noexcept;
void SpriteCustom(SQInt32 sprite, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void TextdrawCustom(SQInt32 textdraw, SQInt32 header, Object & payload) noexcept;
void TextdrawCustom(SQInt32 textdraw, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleCustom(SQInt32 vehicle, SQInt32 header, Object & payload) noexcept;
void VehicleCustom(SQInt32 vehicle, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerAway(SQInt32 player, bool status) noexcept;
void PlayerAway(SQInt32 player, bool status);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerGameKeys(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void PlayerGameKeys(SQInt32 player, SQInt32 previous, SQInt32 current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerRename(SQInt32 player, const SQChar * previous, const SQChar * current) noexcept;
void PlayerRename(SQInt32 player, const SQChar * previous, const SQChar * current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerRequestClass(SQInt32 player, SQInt32 offset) noexcept;
void PlayerRequestClass(SQInt32 player, SQInt32 offset);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerRequestSpawn(SQInt32 player) noexcept;
void PlayerRequestSpawn(SQInt32 player);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerSpawn(SQInt32 player) noexcept;
void PlayerSpawn(SQInt32 player);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerStartTyping(SQInt32 player) noexcept;
void PlayerStartTyping(SQInt32 player);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerStopTyping(SQInt32 player) noexcept;
void PlayerStopTyping(SQInt32 player);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerChat(SQInt32 player, const SQChar * message) noexcept;
void PlayerChat(SQInt32 player, const SQChar * message);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerCommand(SQInt32 player, const SQChar * command) noexcept;
void PlayerCommand(SQInt32 player, const SQChar * command);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerMessage(SQInt32 player, SQInt32 receiver, const SQChar * message) noexcept;
void PlayerMessage(SQInt32 player, SQInt32 receiver, const SQChar * message);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerHealth(SQInt32 player, SQFloat previous, SQFloat current) noexcept;
void PlayerHealth(SQInt32 player, SQFloat previous, SQFloat current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerArmour(SQInt32 player, SQFloat previous, SQFloat current) noexcept;
void PlayerArmour(SQInt32 player, SQFloat previous, SQFloat current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerWeapon(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void PlayerWeapon(SQInt32 player, SQInt32 previous, SQInt32 current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerMove(SQInt32 player, const Vector3 & previous, const Vector3 & current) noexcept;
void PlayerMove(SQInt32 player, const Vector3 & previous, const Vector3 & current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerWasted(SQInt32 player, SQInt32 reason) noexcept;
void PlayerWasted(SQInt32 player, SQInt32 reason);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerKilled(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part) noexcept;
void PlayerKilled(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerTeamKill(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part) noexcept;
void PlayerTeamKill(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerSpectate(SQInt32 player, SQInt32 target) noexcept;
void PlayerSpectate(SQInt32 player, SQInt32 target);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerCrashreport(SQInt32 player, const SQChar * report) noexcept;
void PlayerCrashreport(SQInt32 player, const SQChar * report);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerBurning(SQInt32 player, bool state) noexcept;
void PlayerBurning(SQInt32 player, bool state);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerCrouching(SQInt32 player, bool state) noexcept;
void PlayerCrouching(SQInt32 player, bool state);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerState(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void PlayerState(SQInt32 player, SQInt32 previous, SQInt32 current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PlayerAction(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
void PlayerAction(SQInt32 player, SQInt32 previous, SQInt32 current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateNone(SQInt32 player, SQInt32 previous) noexcept;
void StateNone(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateNormal(SQInt32 player, SQInt32 previous) noexcept;
void StateNormal(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateShooting(SQInt32 player, SQInt32 previous) noexcept;
void StateShooting(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateDriver(SQInt32 player, SQInt32 previous) noexcept;
void StateDriver(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StatePassenger(SQInt32 player, SQInt32 previous) noexcept;
void StatePassenger(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateEnterDriver(SQInt32 player, SQInt32 previous) noexcept;
void StateEnterDriver(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateEnterPassenger(SQInt32 player, SQInt32 previous) noexcept;
void StateEnterPassenger(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateExitVehicle(SQInt32 player, SQInt32 previous) noexcept;
void StateExitVehicle(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void StateUnspawned(SQInt32 player, SQInt32 previous) noexcept;
void StateUnspawned(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionNone(SQInt32 player, SQInt32 previous) noexcept;
void ActionNone(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionNormal(SQInt32 player, SQInt32 previous) noexcept;
void ActionNormal(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionAiming(SQInt32 player, SQInt32 previous) noexcept;
void ActionAiming(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionShooting(SQInt32 player, SQInt32 previous) noexcept;
void ActionShooting(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionJumping(SQInt32 player, SQInt32 previous) noexcept;
void ActionJumping(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionLieDown(SQInt32 player, SQInt32 previous) noexcept;
void ActionLieDown(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionGettingUp(SQInt32 player, SQInt32 previous) noexcept;
void ActionGettingUp(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionJumpVehicle(SQInt32 player, SQInt32 previous) noexcept;
void ActionJumpVehicle(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionDriving(SQInt32 player, SQInt32 previous) noexcept;
void ActionDriving(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionDying(SQInt32 player, SQInt32 previous) noexcept;
void ActionDying(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionWasted(SQInt32 player, SQInt32 previous) noexcept;
void ActionWasted(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionEmbarking(SQInt32 player, SQInt32 previous) noexcept;
void ActionEmbarking(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ActionDisembarking(SQInt32 player, SQInt32 previous) noexcept;
void ActionDisembarking(SQInt32 player, SQInt32 previous);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleRespawn(SQInt32 vehicle) noexcept;
void VehicleRespawn(SQInt32 vehicle);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleExplode(SQInt32 vehicle) noexcept;
void VehicleExplode(SQInt32 vehicle);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleHealth(SQInt32 vehicle, SQFloat previous, SQFloat current) noexcept;
void VehicleHealth(SQInt32 vehicle, SQFloat previous, SQFloat current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleMove(SQInt32 vehicle, const Vector3 & previous, const Vector3 &current) noexcept;
void VehicleMove(SQInt32 vehicle, const Vector3 & previous, const Vector3 &current);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PickupRespawn(SQInt32 pickup) noexcept;
void PickupRespawn(SQInt32 pickup);
/* --------------------------------------------------------------------------------------------
* ...
*/
void KeybindKeyPress(SQInt32 player, SQInt32 keybind) noexcept;
void KeybindKeyPress(SQInt32 player, SQInt32 keybind);
/* --------------------------------------------------------------------------------------------
* ...
*/
void KeybindKeyRelease(SQInt32 player, SQInt32 keybind) noexcept;
void KeybindKeyRelease(SQInt32 player, SQInt32 keybind);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleEmbarking(SQInt32 player, SQInt32 vehicle, SQInt32 slot) noexcept;
void VehicleEmbarking(SQInt32 player, SQInt32 vehicle, SQInt32 slot);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleEmbarked(SQInt32 player, SQInt32 vehicle, SQInt32 slot) noexcept;
void VehicleEmbarked(SQInt32 player, SQInt32 vehicle, SQInt32 slot);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VehicleDisembark(SQInt32 player, SQInt32 vehicle) noexcept;
void VehicleDisembark(SQInt32 player, SQInt32 vehicle);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PickupClaimed(SQInt32 player, SQInt32 pickup) noexcept;
void PickupClaimed(SQInt32 player, SQInt32 pickup);
/* --------------------------------------------------------------------------------------------
* ...
*/
void PickupCollected(SQInt32 player, SQInt32 pickup) noexcept;
void PickupCollected(SQInt32 player, SQInt32 pickup);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ObjectShot(SQInt32 player, SQInt32 object, SQInt32 weapon) noexcept;
void ObjectShot(SQInt32 player, SQInt32 object, SQInt32 weapon);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ObjectBump(SQInt32 player, SQInt32 object) noexcept;
void ObjectBump(SQInt32 player, SQInt32 object);
/* --------------------------------------------------------------------------------------------
* ...
*/
void CheckpointEntered(SQInt32 player, SQInt32 checkpoint) noexcept;
void CheckpointEntered(SQInt32 player, SQInt32 checkpoint);
/* --------------------------------------------------------------------------------------------
* ...
*/
void CheckpointExited(SQInt32 player, SQInt32 checkpoint) noexcept;
void CheckpointExited(SQInt32 player, SQInt32 checkpoint);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SphereEntered(SQInt32 player, SQInt32 sphere) noexcept;
void SphereEntered(SQInt32 player, SQInt32 sphere);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SphereExited(SQInt32 player, SQInt32 sphere) noexcept;
void SphereExited(SQInt32 player, SQInt32 sphere);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ServerFrame(SQFloat delta) noexcept;
void ServerFrame(SQFloat delta);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ServerStartup() noexcept;
void ServerStartup();
/* --------------------------------------------------------------------------------------------
* ...
*/
void ServerShutdown() noexcept;
void ServerShutdown();
/* --------------------------------------------------------------------------------------------
* ...
*/
void InternalCommand(SQInt32 type, const SQChar * text) noexcept;
void InternalCommand(SQInt32 type, const SQChar * text);
/* --------------------------------------------------------------------------------------------
* ...
*/
void LoginAttempt(const SQChar * name, const SQChar * pass, const SQChar * addr) noexcept;
void LoginAttempt(const SQChar * name, const SQChar * pass, const SQChar * addr);
/* --------------------------------------------------------------------------------------------
* ...
*/
void CustomEvent(SQInt32 group, SQInt32 header, Object & payload) noexcept;
void CustomEvent(SQInt32 group, SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void WorldOption(SQInt32 option, Object & value) noexcept;
void WorldOption(SQInt32 option, Object & value);
/* --------------------------------------------------------------------------------------------
* ...
*/
void WorldToggle(SQInt32 option, bool value) noexcept;
void WorldToggle(SQInt32 option, bool value);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ScriptReload(SQInt32 header, Object & payload) noexcept;
void ScriptReload(SQInt32 header, Object & payload);
/* --------------------------------------------------------------------------------------------
* ...
*/
void LogMessage(SQInt32 type, const SQChar * message) noexcept;
void LogMessage(SQInt32 type, const SQChar * message);
protected:
/* --------------------------------------------------------------------------------------------
* ...
*/
bool Trigger() noexcept;
bool Trigger();
/* --------------------------------------------------------------------------------------------
* ...
*/
void Attach() noexcept;
void Attach();
/* --------------------------------------------------------------------------------------------
* ...
*/
void Detach() noexcept;
void Detach();
private:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
const SQChar * GetEventName(SQInt32 type) noexcept
const SQChar * GetEventName(SQInt32 type)
{
switch (type)
{
@ -121,7 +121,7 @@ const SQChar * GetEventName(SQInt32 type) noexcept
}
// ------------------------------------------------------------------------------------------------
bool IsEntityEvent(SQInt32 type) noexcept
bool IsEntityEvent(SQInt32 type)
{
switch (type)
{
@ -226,7 +226,7 @@ bool IsEntityEvent(SQInt32 type) noexcept
}
// ------------------------------------------------------------------------------------------------
bool IsCreateEvent(SQInt32 type) noexcept
bool IsCreateEvent(SQInt32 type)
{
switch (type)
{
@ -247,7 +247,7 @@ bool IsCreateEvent(SQInt32 type) noexcept
}
// ------------------------------------------------------------------------------------------------
bool IsDestroyEvent(SQInt32 type) noexcept
bool IsDestroyEvent(SQInt32 type)
{
switch (type)
{
@ -268,7 +268,7 @@ bool IsDestroyEvent(SQInt32 type) noexcept
}
// ------------------------------------------------------------------------------------------------
bool IsCustomEvent(SQInt32 type) noexcept
bool IsCustomEvent(SQInt32 type)
{
switch (type)
{
@ -289,7 +289,7 @@ bool IsCustomEvent(SQInt32 type) noexcept
}
// ------------------------------------------------------------------------------------------------
bool CanBeInversed(SQInt32 type) noexcept
bool CanBeInversed(SQInt32 type)
{
switch (type)
{

View File

@ -10,32 +10,32 @@ namespace SqMod {
/* ------------------------------------------------------------------------------------------------
* ...
*/
const SQChar * GetEventName(SQInt32 type) noexcept;
const SQChar * GetEventName(SQInt32 type);
/* ------------------------------------------------------------------------------------------------
* ...
*/
bool IsEntityEvent(SQInt32 type) noexcept;
bool IsEntityEvent(SQInt32 type);
/* ------------------------------------------------------------------------------------------------
* ...
*/
bool IsCreateEvent(SQInt32 type) noexcept;
bool IsCreateEvent(SQInt32 type);
/* ------------------------------------------------------------------------------------------------
* ...
*/
bool IsDestroyEvent(SQInt32 type) noexcept;
bool IsDestroyEvent(SQInt32 type);
/* ------------------------------------------------------------------------------------------------
* ...
*/
bool IsCustomEvent(SQInt32 type) noexcept;
bool IsCustomEvent(SQInt32 type);
/* ------------------------------------------------------------------------------------------------
* ...
*/
bool CanBeInversed(SQInt32 type) noexcept;
bool CanBeInversed(SQInt32 type);
} // Namespace:: SqMod

View File

@ -10,7 +10,7 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
static const SQChar * GetTypeName(SQObjectType type_id) noexcept
static const SQChar * GetTypeName(SQObjectType type_id)
{
switch (type_id)
{
@ -52,7 +52,7 @@ static const SQChar * GetTypeName(SQObjectType type_id) noexcept
}
// ------------------------------------------------------------------------------------------------
String GetFormatStr(HSQUIRRELVM vm, SQInteger arg, SQInteger args) noexcept
String GetFormatStr(HSQUIRRELVM vm, SQInteger arg, SQInteger args)
{
if (sq_gettype(vm, arg) == OT_STRING)
{
@ -68,7 +68,7 @@ String GetFormatStr(HSQUIRRELVM vm, SQInteger arg, SQInteger args) noexcept
}
// ------------------------------------------------------------------------------------------------
String GetFormatStr(HSQUIRRELVM vm, const String & fstr, SQInteger arg, SQInteger args) noexcept
String GetFormatStr(HSQUIRRELVM vm, const String & fstr, SQInteger arg, SQInteger args)
{
using namespace fmt::internal;

View File

@ -8,8 +8,8 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
String GetFormatStr(HSQUIRRELVM vm, SQInteger arg, SQInteger args) noexcept;
String GetFormatStr(HSQUIRRELVM vm, const String & fstr, SQInteger arg, SQInteger args) noexcept;
String GetFormatStr(HSQUIRRELVM vm, SQInteger arg, SQInteger args);
String GetFormatStr(HSQUIRRELVM vm, const String & fstr, SQInteger arg, SQInteger args);
} // Namespace:: SqMod

View File

@ -21,37 +21,37 @@ static SHA256 g_EncodeSHA256;
static SHA3 g_EncodeSHA3;
// ------------------------------------------------------------------------------------------------
String HashCRC32(const String & str) noexcept
String HashCRC32(const String & str)
{
return g_EncodeCRC32(str);
}
// ------------------------------------------------------------------------------------------------
String HashKeccak(const String & str) noexcept
String HashKeccak(const String & str)
{
return g_EncodeKeccak(str);
}
// ------------------------------------------------------------------------------------------------
String HashMD5(const String & str) noexcept
String HashMD5(const String & str)
{
return g_EncodeMD5(str);
}
// ------------------------------------------------------------------------------------------------
String HashSHA1(const String & str) noexcept
String HashSHA1(const String & str)
{
return g_EncodeSHA1(str);
}
// ------------------------------------------------------------------------------------------------
String HashSHA256(const String & str) noexcept
String HashSHA256(const String & str)
{
return g_EncodeSHA256(str);
}
// ------------------------------------------------------------------------------------------------
String HashSHA3(const String & str) noexcept
String HashSHA3(const String & str)
{
return g_EncodeSHA3(str);
}

View File

@ -47,7 +47,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
String ToString() noexcept
String ToString()
{
return m_Encoder.getHash();
}
@ -55,7 +55,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
void Reset() noexcept
void Reset()
{
m_Encoder.reset();
}
@ -63,7 +63,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
String Compute(const String & str) noexcept
String Compute(const String & str)
{
return m_Encoder(str);
}
@ -71,7 +71,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
String GetHash() noexcept
String GetHash()
{
return m_Encoder.getHash();
}
@ -79,7 +79,7 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
void AddStr(const String & str) noexcept
void AddStr(const String & str)
{
m_Encoder.add(str.data(), str.length() * sizeof(String::value_type));
}

View File

@ -16,7 +16,7 @@ irc_callbacks_t Session::s_Callbacks;
bool Session::s_Initialized = false;
// ------------------------------------------------------------------------------------------------
Session::Session() noexcept
Session::Session()
: m_Session(irc_create_session(GetCallbacks()))
{
if (!m_Session)
@ -53,7 +53,7 @@ Session::~Session()
}
// ------------------------------------------------------------------------------------------------
void Session::Process(SQFloat delta) noexcept
void Session::Process(SQFloat delta)
{
SQMOD_UNUSED_VAR(delta);
// Make sure that the IRC session is connected
@ -90,7 +90,7 @@ void Session::Process(SQFloat delta) noexcept
}
// ------------------------------------------------------------------------------------------------
void Session::VMClose() noexcept
void Session::VMClose()
{
// Release the reference to the specified callback
m_OnConnect.Release2();
@ -119,7 +119,7 @@ void Session::VMClose() noexcept
}
// ------------------------------------------------------------------------------------------------
irc_callbacks_t * Session::GetCallbacks() noexcept
irc_callbacks_t * Session::GetCallbacks()
{
// See if the callbacks structure was initialized before
if (!s_Initialized)
@ -154,7 +154,7 @@ irc_callbacks_t * Session::GetCallbacks() noexcept
}
// ------------------------------------------------------------------------------------------------
void Session::ForwardEvent(Function & listener, const char * event, const char * origin, const char ** params, unsigned int count) noexcept
void Session::ForwardEvent(Function & listener, const char * event, const char * origin, const char ** params, unsigned int count)
{
if (listener.IsNull())
{
@ -175,7 +175,7 @@ void Session::ForwardEvent(Function & listener, const char * event, const char *
}
// ------------------------------------------------------------------------------------------------
void Session::ForwardEvent(Function & listener, unsigned int event, const char * origin, const char ** params, unsigned int count) noexcept
void Session::ForwardEvent(Function & listener, unsigned int event, const char * origin, const char ** params, unsigned int count)
{
if (listener.IsNull())
{
@ -196,7 +196,7 @@ void Session::ForwardEvent(Function & listener, unsigned int event, const char *
}
// ------------------------------------------------------------------------------------------------
void Session::ForwardEvent(Function & listener, const char * nick, const char * addr, irc_dcc_t dccid) noexcept
void Session::ForwardEvent(Function & listener, const char * nick, const char * addr, irc_dcc_t dccid)
{
SQMOD_UNUSED_VAR(listener);
SQMOD_UNUSED_VAR(nick);
@ -206,7 +206,7 @@ void Session::ForwardEvent(Function & listener, const char * nick, const char *
}
// ------------------------------------------------------------------------------------------------
void Session::ForwardEvent(Function & listener, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid) noexcept
void Session::ForwardEvent(Function & listener, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid)
{
SQMOD_UNUSED_VAR(listener);
SQMOD_UNUSED_VAR(nick);
@ -218,7 +218,7 @@ void Session::ForwardEvent(Function & listener, const char * nick, const char *
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Cmp(const Session & o) const noexcept
SQInt32 Session::Cmp(const Session & o) const
{
if (m_Session == o.m_Session)
{
@ -235,421 +235,421 @@ SQInt32 Session::Cmp(const Session & o) const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * Session::ToString() const noexcept
const SQChar * Session::ToString() const
{
return _SC("");
}
// ------------------------------------------------------------------------------------------------
const SQChar * Session::GetTag() const noexcept
const SQChar * Session::GetTag() const
{
return m_Tag.c_str();
}
// ------------------------------------------------------------------------------------------------
void Session::SetTag(const SQChar * tag) noexcept
void Session::SetTag(const SQChar * tag)
{
m_Tag.assign(tag);
}
// ------------------------------------------------------------------------------------------------
SqObj & Session::GetData() noexcept
SqObj & Session::GetData()
{
return m_Data;
}
// ------------------------------------------------------------------------------------------------
void Session::SetData(SqObj & data) noexcept
void Session::SetData(SqObj & data)
{
m_Data = data;
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnConnect() noexcept
Function Session::GetOnConnect()
{
return m_OnConnect;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnConnect(Function & func) noexcept
void Session::SetOnConnect(Function & func)
{
m_OnConnect = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnConnect_Env(SqObj & env, Function & func) noexcept
void Session::SetOnConnect_Env(SqObj & env, Function & func)
{
m_OnConnect = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnNick() noexcept
Function Session::GetOnNick()
{
return m_OnNick;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnNick(Function & func) noexcept
void Session::SetOnNick(Function & func)
{
m_OnNick = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnNick_Env(SqObj & env, Function & func) noexcept
void Session::SetOnNick_Env(SqObj & env, Function & func)
{
m_OnNick = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnQuit() noexcept
Function Session::GetOnQuit()
{
return m_OnQuit;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnQuit(Function & func) noexcept
void Session::SetOnQuit(Function & func)
{
m_OnQuit = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnQuit_Env(SqObj & env, Function & func) noexcept
void Session::SetOnQuit_Env(SqObj & env, Function & func)
{
m_OnQuit = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnJoin() noexcept
Function Session::GetOnJoin()
{
return m_OnJoin;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnJoin(Function & func) noexcept
void Session::SetOnJoin(Function & func)
{
m_OnJoin = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnJoin_Env(SqObj & env, Function & func) noexcept
void Session::SetOnJoin_Env(SqObj & env, Function & func)
{
m_OnJoin = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnPart() noexcept
Function Session::GetOnPart()
{
return m_OnPart;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnPart(Function & func) noexcept
void Session::SetOnPart(Function & func)
{
m_OnPart = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnPart_Env(SqObj & env, Function & func) noexcept
void Session::SetOnPart_Env(SqObj & env, Function & func)
{
m_OnPart = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnMode() noexcept
Function Session::GetOnMode()
{
return m_OnMode;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnMode(Function & func) noexcept
void Session::SetOnMode(Function & func)
{
m_OnMode = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnMode_Env(SqObj & env, Function & func) noexcept
void Session::SetOnMode_Env(SqObj & env, Function & func)
{
m_OnMode = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnUmode() noexcept
Function Session::GetOnUmode()
{
return m_OnUmode;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnUmode(Function & func) noexcept
void Session::SetOnUmode(Function & func)
{
m_OnUmode = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnUmode_Env(SqObj & env, Function & func) noexcept
void Session::SetOnUmode_Env(SqObj & env, Function & func)
{
m_OnUmode = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnTopic() noexcept
Function Session::GetOnTopic()
{
return m_OnTopic;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnTopic(Function & func) noexcept
void Session::SetOnTopic(Function & func)
{
m_OnTopic = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnTopic_Env(SqObj & env, Function & func) noexcept
void Session::SetOnTopic_Env(SqObj & env, Function & func)
{
m_OnTopic = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnKick() noexcept
Function Session::GetOnKick()
{
return m_OnKick;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnKick(Function & func) noexcept
void Session::SetOnKick(Function & func)
{
m_OnKick = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnKick_Env(SqObj & env, Function & func) noexcept
void Session::SetOnKick_Env(SqObj & env, Function & func)
{
m_OnKick = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnChannel() noexcept
Function Session::GetOnChannel()
{
return m_OnChannel;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnChannel(Function & func) noexcept
void Session::SetOnChannel(Function & func)
{
m_OnChannel = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnChannel_Env(SqObj & env, Function & func) noexcept
void Session::SetOnChannel_Env(SqObj & env, Function & func)
{
m_OnChannel = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnPrivMSG() noexcept
Function Session::GetOnPrivMSG()
{
return m_OnPrivMSG;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnPrivMSG(Function & func) noexcept
void Session::SetOnPrivMSG(Function & func)
{
m_OnPrivMSG = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnPrivMSG_Env(SqObj & env, Function & func) noexcept
void Session::SetOnPrivMSG_Env(SqObj & env, Function & func)
{
m_OnPrivMSG = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnNotice() noexcept
Function Session::GetOnNotice()
{
return m_OnNotice;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnNotice(Function & func) noexcept
void Session::SetOnNotice(Function & func)
{
m_OnNotice = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnNotice_Env(SqObj & env, Function & func) noexcept
void Session::SetOnNotice_Env(SqObj & env, Function & func)
{
m_OnNotice = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnChannel_Notice() noexcept
Function Session::GetOnChannel_Notice()
{
return m_OnChannel_Notice;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnChannel_Notice(Function & func) noexcept
void Session::SetOnChannel_Notice(Function & func)
{
m_OnChannel_Notice = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnChannel_Notice_Env(SqObj & env, Function & func) noexcept
void Session::SetOnChannel_Notice_Env(SqObj & env, Function & func)
{
m_OnChannel_Notice = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnInvite() noexcept
Function Session::GetOnInvite()
{
return m_OnInvite;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnInvite(Function & func) noexcept
void Session::SetOnInvite(Function & func)
{
m_OnInvite = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnInvite_Env(SqObj & env, Function & func) noexcept
void Session::SetOnInvite_Env(SqObj & env, Function & func)
{
m_OnInvite = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnCTCP_Req() noexcept
Function Session::GetOnCTCP_Req()
{
return m_OnCTCP_Req;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnCTCP_Req(Function & func) noexcept
void Session::SetOnCTCP_Req(Function & func)
{
m_OnCTCP_Req = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnCTCP_Req_Env(SqObj & env, Function & func) noexcept
void Session::SetOnCTCP_Req_Env(SqObj & env, Function & func)
{
m_OnCTCP_Req = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnCTCP_Rep() noexcept
Function Session::GetOnCTCP_Rep()
{
return m_OnCTCP_Rep;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnCTCP_Rep(Function & func) noexcept
void Session::SetOnCTCP_Rep(Function & func)
{
m_OnCTCP_Rep = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnCTCP_Rep_Env(SqObj & env, Function & func) noexcept
void Session::SetOnCTCP_Rep_Env(SqObj & env, Function & func)
{
m_OnCTCP_Rep = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnCTCP_Action() noexcept
Function Session::GetOnCTCP_Action()
{
return m_OnCTCP_Action;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnCTCP_Action(Function & func) noexcept
void Session::SetOnCTCP_Action(Function & func)
{
m_OnCTCP_Action = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnCTCP_Action_Env(SqObj & env, Function & func) noexcept
void Session::SetOnCTCP_Action_Env(SqObj & env, Function & func)
{
m_OnCTCP_Action = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnUnknown() noexcept
Function Session::GetOnUnknown()
{
return m_OnUnknown;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnUnknown(Function & func) noexcept
void Session::SetOnUnknown(Function & func)
{
m_OnUnknown = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnUnknown_Env(SqObj & env, Function & func) noexcept
void Session::SetOnUnknown_Env(SqObj & env, Function & func)
{
m_OnUnknown = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnNumeric() noexcept
Function Session::GetOnNumeric()
{
return m_OnNumeric;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnNumeric(Function & func) noexcept
void Session::SetOnNumeric(Function & func)
{
m_OnNumeric = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnNumeric_Env(SqObj & env, Function & func) noexcept
void Session::SetOnNumeric_Env(SqObj & env, Function & func)
{
m_OnNumeric = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnDcc_Chat_Req() noexcept
Function Session::GetOnDcc_Chat_Req()
{
return m_OnDcc_Chat_Req;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnDcc_Chat_Req(Function & func) noexcept
void Session::SetOnDcc_Chat_Req(Function & func)
{
m_OnDcc_Chat_Req = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnDcc_Chat_Req_Env(SqObj & env, Function & func) noexcept
void Session::SetOnDcc_Chat_Req_Env(SqObj & env, Function & func)
{
m_OnDcc_Chat_Req = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
Function Session::GetOnDcc_Send_Req() noexcept
Function Session::GetOnDcc_Send_Req()
{
return m_OnDcc_Send_Req;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnDcc_Send_Req(Function & func) noexcept
void Session::SetOnDcc_Send_Req(Function & func)
{
m_OnDcc_Send_Req = func;
}
// ------------------------------------------------------------------------------------------------
void Session::SetOnDcc_Send_Req_Env(SqObj & env, Function & func) noexcept
void Session::SetOnDcc_Send_Req_Env(SqObj & env, Function & func)
{
m_OnDcc_Send_Req = Function(env.GetVM(), env, func.GetFunc());
}
// ------------------------------------------------------------------------------------------------
bool Session::IsValid() const noexcept
bool Session::IsValid() const
{
return (m_Session != nullptr);
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * nick) noexcept
SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * nick)
{
if (m_Session != nullptr)
{
@ -664,7 +664,7 @@ SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * ni
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd) noexcept
SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd)
{
if (m_Session != nullptr)
{
@ -680,7 +680,7 @@ SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * ni
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username) noexcept
const SQChar * username)
{
if (m_Session != nullptr)
{
@ -696,7 +696,7 @@ SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * ni
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username, const SQChar * realname) noexcept
const SQChar * username, const SQChar * realname)
{
if (m_Session != nullptr)
{
@ -711,7 +711,7 @@ SQInt32 Session::Connect(const SQChar * server, SQUint32 port, const SQChar * ni
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * nick) noexcept
SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * nick)
{
if (m_Session != nullptr)
{
@ -726,7 +726,7 @@ SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * n
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd) noexcept
SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd)
{
if (m_Session != nullptr)
{
@ -742,7 +742,7 @@ SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * n
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username) noexcept
const SQChar * username)
{
if (m_Session != nullptr)
{
@ -758,7 +758,7 @@ SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * n
// ------------------------------------------------------------------------------------------------
SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username, const SQChar * realname) noexcept
const SQChar * username, const SQChar * realname)
{
if (m_Session != nullptr)
{
@ -773,7 +773,7 @@ SQInt32 Session::Connect6(const SQChar * server, SQUint32 port, const SQChar * n
}
// ------------------------------------------------------------------------------------------------
void Session::Disconnect() noexcept
void Session::Disconnect()
{
if (m_Session != nullptr)
{
@ -786,7 +786,7 @@ void Session::Disconnect() noexcept
}
// ------------------------------------------------------------------------------------------------
bool Session::IsConnected() noexcept
bool Session::IsConnected()
{
if (m_Session != nullptr)
{
@ -801,7 +801,7 @@ bool Session::IsConnected() noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdJoin(const SQChar * channel) noexcept
SQInt32 Session::CmdJoin(const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -816,7 +816,7 @@ SQInt32 Session::CmdJoin(const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdJoin(const SQChar * channel, const SQChar * key) noexcept
SQInt32 Session::CmdJoin(const SQChar * channel, const SQChar * key)
{
if (m_Session != nullptr)
{
@ -831,7 +831,7 @@ SQInt32 Session::CmdJoin(const SQChar * channel, const SQChar * key) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdPart(const SQChar * channel) noexcept
SQInt32 Session::CmdPart(const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -846,7 +846,7 @@ SQInt32 Session::CmdPart(const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdInvite(const SQChar * nick, const SQChar * channel) noexcept
SQInt32 Session::CmdInvite(const SQChar * nick, const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -861,7 +861,7 @@ SQInt32 Session::CmdInvite(const SQChar * nick, const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdNames(const SQChar * channel) noexcept
SQInt32 Session::CmdNames(const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -876,7 +876,7 @@ SQInt32 Session::CmdNames(const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdList() noexcept
SQInt32 Session::CmdList()
{
if (m_Session != nullptr)
{
@ -891,7 +891,7 @@ SQInt32 Session::CmdList() noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdList(const SQChar * channel) noexcept
SQInt32 Session::CmdList(const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -906,7 +906,7 @@ SQInt32 Session::CmdList(const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdTopic(const SQChar * channel) noexcept
SQInt32 Session::CmdTopic(const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -921,7 +921,7 @@ SQInt32 Session::CmdTopic(const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdTopic(const SQChar * channel, const SQChar * topic) noexcept
SQInt32 Session::CmdTopic(const SQChar * channel, const SQChar * topic)
{
if (m_Session != nullptr)
{
@ -936,7 +936,7 @@ SQInt32 Session::CmdTopic(const SQChar * channel, const SQChar * topic) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdChannelMode(const SQChar * channel) noexcept
SQInt32 Session::CmdChannelMode(const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -951,7 +951,7 @@ SQInt32 Session::CmdChannelMode(const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdChannelMode(const SQChar * channel, const SQChar * mode) noexcept
SQInt32 Session::CmdChannelMode(const SQChar * channel, const SQChar * mode)
{
if (m_Session != nullptr)
{
@ -966,7 +966,7 @@ SQInt32 Session::CmdChannelMode(const SQChar * channel, const SQChar * mode) noe
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdUserMode() noexcept
SQInt32 Session::CmdUserMode()
{
if (m_Session != nullptr)
{
@ -981,7 +981,7 @@ SQInt32 Session::CmdUserMode() noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdUserMode(const SQChar * mode) noexcept
SQInt32 Session::CmdUserMode(const SQChar * mode)
{
if (m_Session != nullptr)
{
@ -996,7 +996,7 @@ SQInt32 Session::CmdUserMode(const SQChar * mode) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdKick(const SQChar * nick, const SQChar * channel) noexcept
SQInt32 Session::CmdKick(const SQChar * nick, const SQChar * channel)
{
if (m_Session != nullptr)
{
@ -1011,7 +1011,7 @@ SQInt32 Session::CmdKick(const SQChar * nick, const SQChar * channel) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdKick(const SQChar * nick, const SQChar * channel, const SQChar * reason) noexcept
SQInt32 Session::CmdKick(const SQChar * nick, const SQChar * channel, const SQChar * reason)
{
if (m_Session != nullptr)
{
@ -1026,7 +1026,7 @@ SQInt32 Session::CmdKick(const SQChar * nick, const SQChar * channel, const SQCh
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdMsg(const SQChar * nch, const SQChar * text) noexcept
SQInt32 Session::CmdMsg(const SQChar * nch, const SQChar * text)
{
if (m_Session != nullptr)
{
@ -1041,7 +1041,7 @@ SQInt32 Session::CmdMsg(const SQChar * nch, const SQChar * text) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdMe(const SQChar * nch, const SQChar * text) noexcept
SQInt32 Session::CmdMe(const SQChar * nch, const SQChar * text)
{
if (m_Session != nullptr)
{
@ -1056,7 +1056,7 @@ SQInt32 Session::CmdMe(const SQChar * nch, const SQChar * text) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdNotice(const SQChar * nch, const SQChar * text) noexcept
SQInt32 Session::CmdNotice(const SQChar * nch, const SQChar * text)
{
if (m_Session != nullptr)
{
@ -1071,7 +1071,7 @@ SQInt32 Session::CmdNotice(const SQChar * nch, const SQChar * text) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdCtcpRequest(const SQChar * nick, const SQChar * request) noexcept
SQInt32 Session::CmdCtcpRequest(const SQChar * nick, const SQChar * request)
{
if (m_Session != nullptr)
{
@ -1086,7 +1086,7 @@ SQInt32 Session::CmdCtcpRequest(const SQChar * nick, const SQChar * request) noe
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdCtcpReply(const SQChar * nick, const SQChar * reply) noexcept
SQInt32 Session::CmdCtcpReply(const SQChar * nick, const SQChar * reply)
{
if (m_Session != nullptr)
{
@ -1101,7 +1101,7 @@ SQInt32 Session::CmdCtcpReply(const SQChar * nick, const SQChar * reply) noexcep
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdNick(const SQChar * nick) noexcept
SQInt32 Session::CmdNick(const SQChar * nick)
{
if (m_Session != nullptr)
{
@ -1116,7 +1116,7 @@ SQInt32 Session::CmdNick(const SQChar * nick) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdWhois(const SQChar * nick) noexcept
SQInt32 Session::CmdWhois(const SQChar * nick)
{
if (m_Session != nullptr)
{
@ -1131,7 +1131,7 @@ SQInt32 Session::CmdWhois(const SQChar * nick) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdQuit() noexcept
SQInt32 Session::CmdQuit()
{
if (m_Session != nullptr)
{
@ -1146,7 +1146,7 @@ SQInt32 Session::CmdQuit() noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::CmdQuit(const SQChar * reason) noexcept
SQInt32 Session::CmdQuit(const SQChar * reason)
{
if (m_Session != nullptr)
{
@ -1161,7 +1161,7 @@ SQInt32 Session::CmdQuit(const SQChar * reason) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::SendRaw(const SQChar * str) noexcept
SQInt32 Session::SendRaw(const SQChar * str)
{
if (m_Session != nullptr)
{
@ -1176,7 +1176,7 @@ SQInt32 Session::SendRaw(const SQChar * str) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::DestroyDcc(SQUint32 dccid) noexcept
SQInt32 Session::DestroyDcc(SQUint32 dccid)
{
if (m_Session != nullptr)
{
@ -1191,7 +1191,7 @@ SQInt32 Session::DestroyDcc(SQUint32 dccid) noexcept
}
// ------------------------------------------------------------------------------------------------
void Session::SetCtcpVersion(const SQChar * version) noexcept
void Session::SetCtcpVersion(const SQChar * version)
{
if (m_Session != nullptr)
{
@ -1204,7 +1204,7 @@ void Session::SetCtcpVersion(const SQChar * version) noexcept
}
// ------------------------------------------------------------------------------------------------
SQInt32 Session::GetErrNo() noexcept
SQInt32 Session::GetErrNo()
{
if (m_Session != nullptr)
{
@ -1218,7 +1218,7 @@ SQInt32 Session::GetErrNo() noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * Session::GetErrStr() noexcept
const SQChar * Session::GetErrStr()
{
if (m_Session != nullptr)
{
@ -1232,7 +1232,7 @@ const SQChar * Session::GetErrStr() noexcept
}
// ------------------------------------------------------------------------------------------------
void Session::SetOption(SQUint32 option) noexcept
void Session::SetOption(SQUint32 option)
{
if (m_Session != nullptr)
{
@ -1245,7 +1245,7 @@ void Session::SetOption(SQUint32 option) noexcept
}
// ------------------------------------------------------------------------------------------------
void Session::ResetOption(SQUint32 option) noexcept
void Session::ResetOption(SQUint32 option)
{
if (m_Session != nullptr)
{
@ -1573,7 +1573,7 @@ void Session::OnDcc_Send_Req(irc_session_t * session, const char * nick, const c
}
// ------------------------------------------------------------------------------------------------
const SQChar * GetNick(const SQChar * origin) noexcept
const SQChar * GetNick(const SQChar * origin)
{
// Attempt to retrieve the nickname
irc_target_get_nick(origin, g_Buffer, std::extent< decltype(g_Buffer) >::value * sizeof(SQChar));
@ -1582,7 +1582,7 @@ const SQChar * GetNick(const SQChar * origin) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * GetHost(const SQChar * target) noexcept
const SQChar * GetHost(const SQChar * target)
{
// Attempt to retrieve the nickname
irc_target_get_host(target, g_Buffer, std::extent< decltype(g_Buffer) >::value * sizeof(SQChar));

View File

@ -32,34 +32,34 @@ protected:
/* --------------------------------------------------------------------------------------------
* ...
*/
static irc_callbacks_t * GetCallbacks() noexcept;
static irc_callbacks_t * GetCallbacks();
/* --------------------------------------------------------------------------------------------
* ...
*/
static void ForwardEvent(Function & listener, const char * event, const char * origin, const char ** params, unsigned int count) noexcept;
static void ForwardEvent(Function & listener, const char * event, const char * origin, const char ** params, unsigned int count);
/* --------------------------------------------------------------------------------------------
* ...
*/
static void ForwardEvent(Function & listener, unsigned int event, const char * origin, const char ** params, unsigned int count) noexcept;
static void ForwardEvent(Function & listener, unsigned int event, const char * origin, const char ** params, unsigned int count);
/* --------------------------------------------------------------------------------------------
* ...
*/
static void ForwardEvent(Function & listener, const char * nick, const char * addr, irc_dcc_t dccid) noexcept;
static void ForwardEvent(Function & listener, const char * nick, const char * addr, irc_dcc_t dccid);
/* --------------------------------------------------------------------------------------------
* ...
*/
static void ForwardEvent(Function & listener, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid) noexcept;
static void ForwardEvent(Function & listener, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid);
public:
/* --------------------------------------------------------------------------------------------
* ...
*/
Session() noexcept;
Session();
/* --------------------------------------------------------------------------------------------
* ...
@ -89,571 +89,571 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
void Process(SQFloat delta) noexcept;
void Process(SQFloat delta);
/* --------------------------------------------------------------------------------------------
* ...
*/
void VMClose() noexcept;
void VMClose();
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Cmp(const Session & o) const noexcept;
SQInt32 Cmp(const Session & o) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the local tag.
*/
const SQChar * GetTag() const noexcept;
const SQChar * GetTag() const;
/* --------------------------------------------------------------------------------------------
* Change the local tag.
*/
void SetTag(const SQChar * tag) noexcept;
void SetTag(const SQChar * tag);
/* --------------------------------------------------------------------------------------------
* Retrieve the local data.
*/
SqObj & GetData() noexcept;
SqObj & GetData();
/* --------------------------------------------------------------------------------------------
* Change the local data.
*/
void SetData(SqObj & data) noexcept;
void SetData(SqObj & data);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnConnect() noexcept;
Function GetOnConnect();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnConnect(Function & func) noexcept;
void SetOnConnect(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnConnect_Env(SqObj & env, Function & func) noexcept;
void SetOnConnect_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnNick() noexcept;
Function GetOnNick();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnNick(Function & func) noexcept;
void SetOnNick(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnNick_Env(SqObj & env, Function & func) noexcept;
void SetOnNick_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnQuit() noexcept;
Function GetOnQuit();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnQuit(Function & func) noexcept;
void SetOnQuit(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnQuit_Env(SqObj & env, Function & func) noexcept;
void SetOnQuit_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnJoin() noexcept;
Function GetOnJoin();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnJoin(Function & func) noexcept;
void SetOnJoin(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnJoin_Env(SqObj & env, Function & func) noexcept;
void SetOnJoin_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnPart() noexcept;
Function GetOnPart();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnPart(Function & func) noexcept;
void SetOnPart(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnPart_Env(SqObj & env, Function & func) noexcept;
void SetOnPart_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnMode() noexcept;
Function GetOnMode();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnMode(Function & func) noexcept;
void SetOnMode(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnMode_Env(SqObj & env, Function & func) noexcept;
void SetOnMode_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnUmode() noexcept;
Function GetOnUmode();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnUmode(Function & func) noexcept;
void SetOnUmode(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnUmode_Env(SqObj & env, Function & func) noexcept;
void SetOnUmode_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnTopic() noexcept;
Function GetOnTopic();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnTopic(Function & func) noexcept;
void SetOnTopic(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnTopic_Env(SqObj & env, Function & func) noexcept;
void SetOnTopic_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnKick() noexcept;
Function GetOnKick();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnKick(Function & func) noexcept;
void SetOnKick(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnKick_Env(SqObj & env, Function & func) noexcept;
void SetOnKick_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnChannel() noexcept;
Function GetOnChannel();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnChannel(Function & func) noexcept;
void SetOnChannel(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnChannel_Env(SqObj & env, Function & func) noexcept;
void SetOnChannel_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnPrivMSG() noexcept;
Function GetOnPrivMSG();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnPrivMSG(Function & func) noexcept;
void SetOnPrivMSG(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnPrivMSG_Env(SqObj & env, Function & func) noexcept;
void SetOnPrivMSG_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnNotice() noexcept;
Function GetOnNotice();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnNotice(Function & func) noexcept;
void SetOnNotice(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnNotice_Env(SqObj & env, Function & func) noexcept;
void SetOnNotice_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnChannel_Notice() noexcept;
Function GetOnChannel_Notice();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnChannel_Notice(Function & func) noexcept;
void SetOnChannel_Notice(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnChannel_Notice_Env(SqObj & env, Function & func) noexcept;
void SetOnChannel_Notice_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnInvite() noexcept;
Function GetOnInvite();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnInvite(Function & func) noexcept;
void SetOnInvite(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnInvite_Env(SqObj & env, Function & func) noexcept;
void SetOnInvite_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnCTCP_Req() noexcept;
Function GetOnCTCP_Req();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnCTCP_Req(Function & func) noexcept;
void SetOnCTCP_Req(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnCTCP_Req_Env(SqObj & env, Function & func) noexcept;
void SetOnCTCP_Req_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnCTCP_Rep() noexcept;
Function GetOnCTCP_Rep();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnCTCP_Rep(Function & func) noexcept;
void SetOnCTCP_Rep(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnCTCP_Rep_Env(SqObj & env, Function & func) noexcept;
void SetOnCTCP_Rep_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnCTCP_Action() noexcept;
Function GetOnCTCP_Action();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnCTCP_Action(Function & func) noexcept;
void SetOnCTCP_Action(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnCTCP_Action_Env(SqObj & env, Function & func) noexcept;
void SetOnCTCP_Action_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnUnknown() noexcept;
Function GetOnUnknown();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnUnknown(Function & func) noexcept;
void SetOnUnknown(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnUnknown_Env(SqObj & env, Function & func) noexcept;
void SetOnUnknown_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnNumeric() noexcept;
Function GetOnNumeric();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnNumeric(Function & func) noexcept;
void SetOnNumeric(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnNumeric_Env(SqObj & env, Function & func) noexcept;
void SetOnNumeric_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnDcc_Chat_Req() noexcept;
Function GetOnDcc_Chat_Req();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnDcc_Chat_Req(Function & func) noexcept;
void SetOnDcc_Chat_Req(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnDcc_Chat_Req_Env(SqObj & env, Function & func) noexcept;
void SetOnDcc_Chat_Req_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
Function GetOnDcc_Send_Req() noexcept;
Function GetOnDcc_Send_Req();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnDcc_Send_Req(Function & func) noexcept;
void SetOnDcc_Send_Req(Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOnDcc_Send_Req_Env(SqObj & env, Function & func) noexcept;
void SetOnDcc_Send_Req_Env(SqObj & env, Function & func);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool IsValid() const noexcept;
bool IsValid() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect(const SQChar * server, SQUint32 port, const SQChar * nick) noexcept;
SQInt32 Connect(const SQChar * server, SQUint32 port, const SQChar * nick);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd) noexcept;
SQInt32 Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username) noexcept;
const SQChar * username);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username, const SQChar * realname) noexcept;
const SQChar * username, const SQChar * realname);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect6(const SQChar * server, SQUint32 port, const SQChar * nick) noexcept;
SQInt32 Connect6(const SQChar * server, SQUint32 port, const SQChar * nick);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd) noexcept;
SQInt32 Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username) noexcept;
const SQChar * username);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 Connect6(const SQChar * server, SQUint32 port, const SQChar * nick, const SQChar * passwd,
const SQChar * username, const SQChar * realname) noexcept;
const SQChar * username, const SQChar * realname);
/* --------------------------------------------------------------------------------------------
* ...
*/
void Disconnect() noexcept;
void Disconnect();
/* --------------------------------------------------------------------------------------------
* ...
*/
bool IsConnected() noexcept;
bool IsConnected();
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdJoin(const SQChar * channel) noexcept;
SQInt32 CmdJoin(const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdJoin(const SQChar * channel, const SQChar * key) noexcept;
SQInt32 CmdJoin(const SQChar * channel, const SQChar * key);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdPart(const SQChar * channel) noexcept;
SQInt32 CmdPart(const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdInvite(const SQChar * nick, const SQChar * channel) noexcept;
SQInt32 CmdInvite(const SQChar * nick, const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdNames(const SQChar * channel) noexcept;
SQInt32 CmdNames(const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdList() noexcept;
SQInt32 CmdList();
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdList(const SQChar * channel) noexcept;
SQInt32 CmdList(const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdTopic(const SQChar * channel) noexcept;
SQInt32 CmdTopic(const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdTopic(const SQChar * channel, const SQChar * topic) noexcept;
SQInt32 CmdTopic(const SQChar * channel, const SQChar * topic);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdChannelMode(const SQChar * channel) noexcept;
SQInt32 CmdChannelMode(const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdChannelMode(const SQChar * channel, const SQChar * mode) noexcept;
SQInt32 CmdChannelMode(const SQChar * channel, const SQChar * mode);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdUserMode() noexcept;
SQInt32 CmdUserMode();
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdUserMode(const SQChar * mode) noexcept;
SQInt32 CmdUserMode(const SQChar * mode);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdKick(const SQChar * nick, const SQChar * channel) noexcept;
SQInt32 CmdKick(const SQChar * nick, const SQChar * channel);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdKick(const SQChar * nick, const SQChar * channel, const SQChar * reason) noexcept;
SQInt32 CmdKick(const SQChar * nick, const SQChar * channel, const SQChar * reason);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdMsg(const SQChar * nch, const SQChar * text) noexcept;
SQInt32 CmdMsg(const SQChar * nch, const SQChar * text);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdMe(const SQChar * nch, const SQChar * text) noexcept;
SQInt32 CmdMe(const SQChar * nch, const SQChar * text);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdNotice(const SQChar * nch, const SQChar * text) noexcept;
SQInt32 CmdNotice(const SQChar * nch, const SQChar * text);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdCtcpRequest(const SQChar * nick, const SQChar * request) noexcept;
SQInt32 CmdCtcpRequest(const SQChar * nick, const SQChar * request);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdCtcpReply(const SQChar * nick, const SQChar * reply) noexcept;
SQInt32 CmdCtcpReply(const SQChar * nick, const SQChar * reply);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdNick(const SQChar * nick) noexcept;
SQInt32 CmdNick(const SQChar * nick);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdWhois(const SQChar * nick) noexcept;
SQInt32 CmdWhois(const SQChar * nick);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdQuit() noexcept;
SQInt32 CmdQuit();
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 CmdQuit(const SQChar * reason) noexcept;
SQInt32 CmdQuit(const SQChar * reason);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 SendRaw(const SQChar * str) noexcept;
SQInt32 SendRaw(const SQChar * str);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 DestroyDcc(SQUint32 dccid) noexcept;
SQInt32 DestroyDcc(SQUint32 dccid);
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetCtcpVersion(const SQChar * version) noexcept;
void SetCtcpVersion(const SQChar * version);
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetErrNo() noexcept;
SQInt32 GetErrNo();
/* --------------------------------------------------------------------------------------------
* ...
*/
const SQChar * GetErrStr() noexcept;
const SQChar * GetErrStr();
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetOption(SQUint32 option) noexcept;
void SetOption(SQUint32 option);
/* --------------------------------------------------------------------------------------------
* ...
*/
void ResetOption(SQUint32 option) noexcept;
void ResetOption(SQUint32 option);
private:

View File

@ -21,37 +21,37 @@ public:
typedef T Value;
// --------------------------------------------------------------------------------------------
LongInt() noexcept
LongInt()
: m_Data(0), m_Text()
{
}
template <typename U>
LongInt(U data) noexcept
LongInt(U data)
{
*this = data;
}
// --------------------------------------------------------------------------------------------
LongInt(const SQChar * text) noexcept
LongInt(const SQChar * text)
{
*this = text;
}
LongInt(const SQChar * text, SQInteger overload = 0) noexcept
LongInt(const SQChar * text, SQInteger overload = 0)
{
*this = text;
}
// --------------------------------------------------------------------------------------------
LongInt(const LongInt<T> & i) noexcept
LongInt(const LongInt<T> & i)
: m_Data(i.m_Data), m_Text(i.m_Text)
{
}
LongInt(LongInt<T> && i) noexcept
LongInt(LongInt<T> && i)
: m_Data(i.m_Data), m_Text(std::move(i.m_Text))
{
@ -64,7 +64,7 @@ public:
}
// --------------------------------------------------------------------------------------------
LongInt & operator = (const LongInt<T> & i) noexcept
LongInt & operator = (const LongInt<T> & i)
{
m_Data = i.m_Data;
m_Text = i.m_Text;
@ -72,7 +72,7 @@ public:
return *this;
}
LongInt & operator = (LongInt<T> && i) noexcept
LongInt & operator = (LongInt<T> && i)
{
m_Data = i.m_Data;
m_Text = std::move(i.m_Text);
@ -82,14 +82,14 @@ public:
// --------------------------------------------------------------------------------------------
template <typename U, typename std::enable_if<std::is_integral<U>::value>::type* = nullptr>
LongInt & operator = (U data) noexcept
LongInt & operator = (U data)
{
m_Data = static_cast<Value>(data);
m_Text = std::to_string(m_Data);
return *this;
}
LongInt & operator = (const SQChar * text) noexcept
LongInt & operator = (const SQChar * text)
{
m_Text = text;
try
@ -104,125 +104,125 @@ public:
}
// --------------------------------------------------------------------------------------------
bool operator == (const LongInt<T> & x) const noexcept
bool operator == (const LongInt<T> & x) const
{
return (m_Data == x.m_Data);
}
bool operator != (const LongInt<T> & x) const noexcept
bool operator != (const LongInt<T> & x) const
{
return (m_Data != x.m_Data);
}
bool operator < (const LongInt<T> & x) const noexcept
bool operator < (const LongInt<T> & x) const
{
return (m_Data < x.m_Data);
}
bool operator > (const LongInt<T> & x) const noexcept
bool operator > (const LongInt<T> & x) const
{
return (m_Data > x.m_Data);
}
bool operator <= (const LongInt<T> & x) const noexcept
bool operator <= (const LongInt<T> & x) const
{
return (m_Data <= x.m_Data);
}
bool operator >= (const LongInt<T> & x) const noexcept
bool operator >= (const LongInt<T> & x) const
{
return (m_Data >= x.m_Data);
}
// --------------------------------------------------------------------------------------------
inline operator T () const noexcept
inline operator T () const
{
return m_Data;
}
// --------------------------------------------------------------------------------------------
LongInt<T> operator + (const LongInt<T> & x) const noexcept
LongInt<T> operator + (const LongInt<T> & x) const
{
return LongInt<T>(m_Data + x.m_Data);
}
LongInt<T> operator - (const LongInt<T> & x) const noexcept
LongInt<T> operator - (const LongInt<T> & x) const
{
return LongInt<T>(m_Data - x.m_Data);
}
LongInt<T> operator * (const LongInt<T> & x) const noexcept
LongInt<T> operator * (const LongInt<T> & x) const
{
return LongInt<T>(m_Data * x.m_Data);
}
LongInt<T> operator / (const LongInt<T> & x) const noexcept
LongInt<T> operator / (const LongInt<T> & x) const
{
return LongInt<T>(m_Data / x.m_Data);
}
LongInt<T> operator % (const LongInt<T> & x) const noexcept
LongInt<T> operator % (const LongInt<T> & x) const
{
return LongInt<T>(m_Data % x.m_Data);
}
// --------------------------------------------------------------------------------------------
LongInt<T> operator - () const noexcept
LongInt<T> operator - () const
{
return LongInt<T>(-m_Data);
}
// --------------------------------------------------------------------------------------------
SQInteger Cmp(const LongInt<T> & x) const noexcept
SQInteger Cmp(const LongInt<T> & x) const
{
return m_Data == x.m_Data ? 0 : (m_Data > x.m_Data ? 1 : -1);
}
const SQChar * ToString() const noexcept
const SQChar * ToString() const
{
return m_Text.c_str();
}
// --------------------------------------------------------------------------------------------
void SetNum(T data) noexcept
void SetNum(T data)
{
*this = data;
}
T GetNum() const noexcept
T GetNum() const
{
return m_Data;
}
SQInteger GetSNum() const noexcept
SQInteger GetSNum() const
{
return static_cast<SQInteger>(m_Data);
}
// --------------------------------------------------------------------------------------------
void SetStr(const SQChar * text) noexcept
void SetStr(const SQChar * text)
{
*this = text;
}
const String & GetStr() const noexcept
const String & GetStr() const
{
return m_Text;
}
const SQChar * GetCStr() const noexcept
const SQChar * GetCStr() const
{
return m_Text.c_str();
}
// --------------------------------------------------------------------------------------------
void Random() noexcept
void Random()
{
m_Data = RandomVal<T>::Get();
m_Text = std::to_string(m_Data);
}
void Random(T min, T max) noexcept
void Random(T min, T max)
{
m_Data = RandomVal<T>::Get(min, max);
m_Text = std::to_string(m_Data);

View File

@ -52,7 +52,7 @@ namespace SqMod {
const Logger::Pointer _Log = Logger::Inst();
// ------------------------------------------------------------------------------------------------
inline const char * GetLevelTag(Uint8 type) noexcept
inline const char * GetLevelTag(Uint8 type)
{
switch (type)
{
@ -70,7 +70,7 @@ inline const char * GetLevelTag(Uint8 type) noexcept
#ifdef SQMOD_OS_WINDOWS
// ------------------------------------------------------------------------------------------------
inline Uint16 GetLevelColor(Uint8 type) noexcept
inline Uint16 GetLevelColor(Uint8 type)
{
switch (type)
{
@ -87,7 +87,7 @@ inline Uint16 GetLevelColor(Uint8 type) noexcept
#else
// ------------------------------------------------------------------------------------------------
inline const char * GetLevelColor(Uint8 type) noexcept
inline const char * GetLevelColor(Uint8 type)
{
return "";
}
@ -95,7 +95,7 @@ inline const char * GetLevelColor(Uint8 type) noexcept
#endif // SQMOD_OS_WINDOWS
// ------------------------------------------------------------------------------------------------
Logger::Logger() noexcept
Logger::Logger()
: m_ConsoleTime(false), m_FileTime(true)
, m_ConsoleLevels(Logger::LEVEL_ANY), m_FileLevels(Logger::LEVEL_ANY)
, m_LogPath("./logs/"), m_DebugLevel(SQMOD_DEBUG_LEVEL), m_Verbosity(0)
@ -110,13 +110,13 @@ Logger::~Logger()
}
// ------------------------------------------------------------------------------------------------
void Logger::_Finalizer(Logger * ptr) noexcept
void Logger::_Finalizer(Logger * ptr)
{
if (ptr) delete ptr;
}
// ------------------------------------------------------------------------------------------------
Logger::Pointer Logger::Inst() noexcept
Logger::Pointer Logger::Inst()
{
if (!_Log) return Pointer(new Logger(), &Logger::_Finalizer);
return Pointer(nullptr, &Logger::_Finalizer);
@ -153,95 +153,95 @@ void Logger::Terminate()
}
// ------------------------------------------------------------------------------------------------
void Logger::ToggleConsoleTime(bool enabled) noexcept
void Logger::ToggleConsoleTime(bool enabled)
{
m_ConsoleTime = enabled;
}
void Logger::ToggleFileTime(bool enabled) noexcept
void Logger::ToggleFileTime(bool enabled)
{
m_FileTime = enabled;
}
// ------------------------------------------------------------------------------------------------
bool Logger::HasConsoleTime() const noexcept
bool Logger::HasConsoleTime() const
{
return m_ConsoleTime;
}
bool Logger::HasFileTime()const noexcept
bool Logger::HasFileTime()const
{
return m_FileTime;
}
// ------------------------------------------------------------------------------------------------
void Logger::SetConsoleLevels(Uint8 levels) noexcept
void Logger::SetConsoleLevels(Uint8 levels)
{
m_ConsoleLevels = levels;
}
void Logger::SetFileLevels(Uint8 levels) noexcept
void Logger::SetFileLevels(Uint8 levels)
{
m_FileLevels = levels;
}
// ------------------------------------------------------------------------------------------------
Uint8 Logger::GetConsoleLevels() const noexcept
Uint8 Logger::GetConsoleLevels() const
{
return m_ConsoleLevels;
}
Uint8 Logger::GetFileLevels() const noexcept
Uint8 Logger::GetFileLevels() const
{
return m_FileLevels;
}
// ------------------------------------------------------------------------------------------------
void Logger::EnableConsoleLevel(Uint8 level) noexcept
void Logger::EnableConsoleLevel(Uint8 level)
{
m_ConsoleLevels |= level;
}
void Logger::EnableFileLevel(Uint8 level) noexcept
void Logger::EnableFileLevel(Uint8 level)
{
m_FileLevels |= level;
}
// ------------------------------------------------------------------------------------------------
void Logger::DisableConsoleLevel(Uint8 level) noexcept
void Logger::DisableConsoleLevel(Uint8 level)
{
if (m_ConsoleLevels & level) m_ConsoleLevels ^= level;
}
void Logger::DisableFileLevel(Uint8 level) noexcept
void Logger::DisableFileLevel(Uint8 level)
{
if (m_FileLevels & level) m_FileLevels ^= level;
}
// ------------------------------------------------------------------------------------------------
Uint8 Logger::GetDebugLevel() const noexcept
Uint8 Logger::GetDebugLevel() const
{
return m_DebugLevel;
}
void Logger::SetDebugLevel(Uint8 level) noexcept
void Logger::SetDebugLevel(Uint8 level)
{
m_DebugLevel = level;
}
// ------------------------------------------------------------------------------------------------
SQInt32 Logger::GetVerbosity() const noexcept
SQInt32 Logger::GetVerbosity() const
{
return m_Verbosity;
}
void Logger::SetVerbosity(SQInt32 level) noexcept
void Logger::SetVerbosity(SQInt32 level)
{
m_Verbosity = level;
}
// ------------------------------------------------------------------------------------------------
void Logger::Send(Uint8 type, bool sub, const char * fmt, va_list args) noexcept
void Logger::Send(Uint8 type, bool sub, const char * fmt, va_list args)
{
// Verify that this level is allowed to be streamed
if (!(m_ConsoleLevels & type) && !(m_FileLevels & type)) return;
@ -318,7 +318,7 @@ void Logger::Send(Uint8 type, bool sub, const char * fmt, va_list args) noexcep
// ------------------------------------------------------------------------------------------------
#define SQMOD_LOG(N_, L_, S_) /*
*/ void Logger::N_(const char * fmt, ...) noexcept /*
*/ void Logger::N_(const char * fmt, ...) /*
*/ { /*
*/ va_list args; /*
*/ va_start(args, fmt); /*
@ -347,7 +347,7 @@ SQMOD_LOG(SFtl, LEVEL_FTL, true)
// ------------------------------------------------------------------------------------------------
#define SQMOD_CLOG(N_, L_, S_) /*
*/bool Logger::N_(bool c, const char * fmt, ...) noexcept /*
*/bool Logger::N_(bool c, const char * fmt, ...) /*
*/ { /*
*/ if (c) /*
*/ { /*

View File

@ -27,13 +27,13 @@ private:
friend class std::unique_ptr<Logger, void(*)(Logger *)>;
// --------------------------------------------------------------------------------------------
Logger() noexcept;
Logger();
// --------------------------------------------------------------------------------------------
~Logger();
// --------------------------------------------------------------------------------------------
static void _Finalizer(Logger * ptr) noexcept;
static void _Finalizer(Logger * ptr);
// --------------------------------------------------------------------------------------------
public:
@ -41,7 +41,7 @@ public:
typedef std::unique_ptr<Logger, void(*)(Logger *)> Pointer;
// --------------------------------------------------------------------------------------------
static Pointer Inst() noexcept;
static Pointer Inst();
// --------------------------------------------------------------------------------------------
bool Init();
@ -55,70 +55,70 @@ public:
void Terminate();
// --------------------------------------------------------------------------------------------
void ToggleConsoleTime(bool enabled) noexcept;
void ToggleFileTime(bool enabled) noexcept;
bool HasConsoleTime() const noexcept;
bool HasFileTime() const noexcept;
void ToggleConsoleTime(bool enabled);
void ToggleFileTime(bool enabled);
bool HasConsoleTime() const;
bool HasFileTime() const;
// --------------------------------------------------------------------------------------------
void SetConsoleLevels(Uint8 levels) noexcept;
void SetFileLevels(Uint8 levels) noexcept;
Uint8 GetConsoleLevels() const noexcept;
Uint8 GetFileLevels() const noexcept;
void SetConsoleLevels(Uint8 levels);
void SetFileLevels(Uint8 levels);
Uint8 GetConsoleLevels() const;
Uint8 GetFileLevels() const;
// --------------------------------------------------------------------------------------------
void EnableConsoleLevel(Uint8 level) noexcept;
void EnableFileLevel(Uint8 level) noexcept;
void DisableConsoleLevel(Uint8 level) noexcept;
void DisableFileLevel(Uint8 level) noexcept;
void EnableConsoleLevel(Uint8 level);
void EnableFileLevel(Uint8 level);
void DisableConsoleLevel(Uint8 level);
void DisableFileLevel(Uint8 level);
// --------------------------------------------------------------------------------------------
Uint8 GetDebugLevel() const noexcept;
void SetDebugLevel(Uint8 level) noexcept;
Uint8 GetDebugLevel() const;
void SetDebugLevel(Uint8 level);
// --------------------------------------------------------------------------------------------
SQInt32 GetVerbosity() const noexcept;
void SetVerbosity(SQInt32 level) noexcept;
SQInt32 GetVerbosity() const;
void SetVerbosity(SQInt32 level);
public:
// --------------------------------------------------------------------------------------------
void Send(Uint8 type, bool sub, const char * fmt, va_list args) noexcept;
void Send(Uint8 type, bool sub, const char * fmt, va_list args);
// --------------------------------------------------------------------------------------------
void Dbg(const char * fmt, ...) noexcept;
void Msg(const char * fmt, ...) noexcept;
void Scs(const char * fmt, ...) noexcept;
void Inf(const char * fmt, ...) noexcept;
void Wrn(const char * fmt, ...) noexcept;
void Err(const char * fmt, ...) noexcept;
void Ftl(const char * fmt, ...) noexcept;
void Dbg(const char * fmt, ...);
void Msg(const char * fmt, ...);
void Scs(const char * fmt, ...);
void Inf(const char * fmt, ...);
void Wrn(const char * fmt, ...);
void Err(const char * fmt, ...);
void Ftl(const char * fmt, ...);
// --------------------------------------------------------------------------------------------
void SDbg(const char * fmt, ...) noexcept;
void SMsg(const char * fmt, ...) noexcept;
void SScs(const char * fmt, ...) noexcept;
void SInf(const char * fmt, ...) noexcept;
void SWrn(const char * fmt, ...) noexcept;
void SErr(const char * fmt, ...) noexcept;
void SFtl(const char * fmt, ...) noexcept;
void SDbg(const char * fmt, ...);
void SMsg(const char * fmt, ...);
void SScs(const char * fmt, ...);
void SInf(const char * fmt, ...);
void SWrn(const char * fmt, ...);
void SErr(const char * fmt, ...);
void SFtl(const char * fmt, ...);
// --------------------------------------------------------------------------------------------
bool cDbg(bool cond, const char * fmt, ...) noexcept;
bool cMsg(bool cond, const char * fmt, ...) noexcept;
bool cScs(bool cond, const char * fmt, ...) noexcept;
bool cInf(bool cond, const char * fmt, ...) noexcept;
bool cWrn(bool cond, const char * fmt, ...) noexcept;
bool cErr(bool cond, const char * fmt, ...) noexcept;
bool cFtl(bool cond, const char * fmt, ...) noexcept;
bool cDbg(bool cond, const char * fmt, ...);
bool cMsg(bool cond, const char * fmt, ...);
bool cScs(bool cond, const char * fmt, ...);
bool cInf(bool cond, const char * fmt, ...);
bool cWrn(bool cond, const char * fmt, ...);
bool cErr(bool cond, const char * fmt, ...);
bool cFtl(bool cond, const char * fmt, ...);
// --------------------------------------------------------------------------------------------
bool cSDbg(bool cond, const char * fmt, ...) noexcept;
bool cSMsg(bool cond, const char * fmt, ...) noexcept;
bool cSScs(bool cond, const char * fmt, ...) noexcept;
bool cSInf(bool cond, const char * fmt, ...) noexcept;
bool cSWrn(bool cond, const char * fmt, ...) noexcept;
bool cSErr(bool cond, const char * fmt, ...) noexcept;
bool cSFtl(bool cond, const char * fmt, ...) noexcept;
bool cSDbg(bool cond, const char * fmt, ...);
bool cSMsg(bool cond, const char * fmt, ...);
bool cSScs(bool cond, const char * fmt, ...);
bool cSInf(bool cond, const char * fmt, ...);
bool cSWrn(bool cond, const char * fmt, ...);
bool cSErr(bool cond, const char * fmt, ...);
bool cSFtl(bool cond, const char * fmt, ...);
private:
// --------------------------------------------------------------------------------------------

View File

@ -12,19 +12,19 @@ namespace SqMod {
const CAutomobile CAutomobile::NIL;
// ------------------------------------------------------------------------------------------------
CAutomobile::CAutomobile() noexcept
CAutomobile::CAutomobile()
: m_ID(SQMOD_UNKNOWN)
{
}
CAutomobile::CAutomobile(SQInt32 id) noexcept
CAutomobile::CAutomobile(SQInt32 id)
: m_ID(VALID_ENTITYGETEX(id, Max))
{
}
CAutomobile::CAutomobile(const SQChar * name, SQInt32 id) noexcept
CAutomobile::CAutomobile(const SQChar * name, SQInt32 id)
: m_ID(GetAutomobileID(name))
{
if (VALID_ENTITYEX(m_ID, Max))
@ -34,7 +34,7 @@ CAutomobile::CAutomobile(const SQChar * name, SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
CAutomobile::CAutomobile(const CAutomobile & a) noexcept
CAutomobile::CAutomobile(const CAutomobile & a)
: m_ID(a.m_ID)
, m_Tag(a.m_Tag)
, m_Data(a.m_Data)
@ -42,7 +42,7 @@ CAutomobile::CAutomobile(const CAutomobile & a) noexcept
}
CAutomobile::CAutomobile(CAutomobile && a) noexcept
CAutomobile::CAutomobile(CAutomobile && a)
: m_ID(a.m_ID)
, m_Tag(a.m_Tag)
, m_Data(a.m_Data)
@ -57,7 +57,7 @@ CAutomobile::~CAutomobile()
}
// ------------------------------------------------------------------------------------------------
CAutomobile & CAutomobile::operator = (const CAutomobile & a) noexcept
CAutomobile & CAutomobile::operator = (const CAutomobile & a)
{
m_ID = a.m_ID;
m_Tag = a.m_Tag;
@ -66,7 +66,7 @@ CAutomobile & CAutomobile::operator = (const CAutomobile & a) noexcept
return *this;
}
CAutomobile & CAutomobile::operator = (CAutomobile && a) noexcept
CAutomobile & CAutomobile::operator = (CAutomobile && a)
{
m_ID = a.m_ID;
m_Tag = a.m_Tag;
@ -76,7 +76,7 @@ CAutomobile & CAutomobile::operator = (CAutomobile && a) noexcept
}
// ------------------------------------------------------------------------------------------------
CAutomobile & CAutomobile::operator = (SQInt32 id) noexcept
CAutomobile & CAutomobile::operator = (SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -84,38 +84,38 @@ CAutomobile & CAutomobile::operator = (SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
bool CAutomobile::operator == (const CAutomobile & a) const noexcept
bool CAutomobile::operator == (const CAutomobile & a) const
{
return (m_ID == a.m_ID);
}
bool CAutomobile::operator != (const CAutomobile & a) const noexcept
bool CAutomobile::operator != (const CAutomobile & a) const
{
return (m_ID != a.m_ID);
}
bool CAutomobile::operator < (const CAutomobile & a) const noexcept
bool CAutomobile::operator < (const CAutomobile & a) const
{
return (m_ID < a.m_ID);
}
bool CAutomobile::operator > (const CAutomobile & a) const noexcept
bool CAutomobile::operator > (const CAutomobile & a) const
{
return (m_ID < a.m_ID);
}
bool CAutomobile::operator <= (const CAutomobile & a) const noexcept
bool CAutomobile::operator <= (const CAutomobile & a) const
{
return (m_ID <= a.m_ID);
}
bool CAutomobile::operator >= (const CAutomobile & a) const noexcept
bool CAutomobile::operator >= (const CAutomobile & a) const
{
return (m_ID >= a.m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CAutomobile::Cmp(const CAutomobile & a) const noexcept
SQInteger CAutomobile::Cmp(const CAutomobile & a) const
{
if (m_ID == a.m_ID)
{
@ -132,24 +132,24 @@ SQInteger CAutomobile::Cmp(const CAutomobile & a) const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CAutomobile::ToString() const noexcept
const SQChar * CAutomobile::ToString() const
{
return GetAutomobileName(m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CAutomobile::GetID() const noexcept
SQInteger CAutomobile::GetID() const
{
return m_ID;
}
void CAutomobile::SetID(SQInt32 id) noexcept
void CAutomobile::SetID(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
}
// ------------------------------------------------------------------------------------------------
CAutomobile & CAutomobile::SetnGet(SQInt32 id) noexcept
CAutomobile & CAutomobile::SetnGet(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -157,63 +157,63 @@ CAutomobile & CAutomobile::SetnGet(SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CAutomobile::GetGlobalTag() const noexcept
const SQChar * CAutomobile::GetGlobalTag() const
{
return GlobalTag(m_ID);
}
void CAutomobile::SetGlobalTag(const SQChar * tag) const noexcept
void CAutomobile::SetGlobalTag(const SQChar * tag) const
{
GlobalTag(m_ID, tag);
}
// ------------------------------------------------------------------------------------------------
SqObj & CAutomobile::GetGlobalData() const noexcept
SqObj & CAutomobile::GetGlobalData() const
{
return GlobalData(m_ID);
}
void CAutomobile::SetGlobalData(SqObj & data) const noexcept
void CAutomobile::SetGlobalData(SqObj & data) const
{
GlobalData(m_ID, data);
}
// ------------------------------------------------------------------------------------------------
const SQChar * CAutomobile::GetLocalTag() const noexcept
const SQChar * CAutomobile::GetLocalTag() const
{
return m_Tag.c_str();
}
void CAutomobile::SetLocalTag(const SQChar * tag) noexcept
void CAutomobile::SetLocalTag(const SQChar * tag)
{
m_Tag = tag;
}
// ------------------------------------------------------------------------------------------------
SqObj & CAutomobile::GetLocalData() noexcept
SqObj & CAutomobile::GetLocalData()
{
return m_Data;
}
void CAutomobile::SetLocalData(SqObj & data) noexcept
void CAutomobile::SetLocalData(SqObj & data)
{
m_Data = data;
}
// ------------------------------------------------------------------------------------------------
bool CAutomobile::IsValid() const noexcept
bool CAutomobile::IsValid() const
{
return (VALID_ENTITYEX(m_ID, Max));
}
// ------------------------------------------------------------------------------------------------
const SQChar * CAutomobile::GetName() const noexcept
const SQChar * CAutomobile::GetName() const
{
return GetAutomobileName(m_ID);
}
// ------------------------------------------------------------------------------------------------
void CAutomobile::SetName(const SQChar * name) noexcept
void CAutomobile::SetName(const SQChar * name)
{
m_ID = GetAutomobileID(name);
m_ID = VALID_ENTITYGETEX(m_ID, Max);
@ -221,27 +221,27 @@ void CAutomobile::SetName(const SQChar * name) noexcept
// ------------------------------------------------------------------------------------------------
Reference< CVehicle > CAutomobile::Create(SQInt32 world, const Vector3 & pos, SQFloat angle,
SQInt32 header, SqObj & payload) const noexcept
SQInt32 header, SqObj & payload) const
{
return _Core->NewVehicle(m_ID, world, pos.x, pos.z, pos.y, angle, SQMOD_UNKNOWN, SQMOD_UNKNOWN, header, payload);
}
Reference< CVehicle > CAutomobile::Create(SQInt32 world, const Vector3 & pos, SQFloat angle,
SQInt32 primary, SQInt32 secondary, SQInt32 header,
SqObj & payload) const noexcept
SqObj & payload) const
{
return _Core->NewVehicle(*this, world, pos.x, pos.z, pos.y, angle, primary, secondary, header, payload);
}
Reference< CVehicle > CAutomobile::Create(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQFloat angle,
SQInt32 header, SqObj & payload) const noexcept
SQInt32 header, SqObj & payload) const
{
return _Core->NewVehicle(*this, world, x, y, z, angle, SQMOD_UNKNOWN, SQMOD_UNKNOWN, header, payload);
}
Reference< CVehicle > CAutomobile::Create(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQFloat angle,
SQInt32 primary, SQInt32 secondary, SQInt32 header,
SqObj & payload) const noexcept
SqObj & payload) const
{
return _Core->NewVehicle(*this, world, x, y, z, angle, primary, secondary, header, payload);
}

View File

@ -22,27 +22,27 @@ public:
/* --------------------------------------------------------------------------------------------
* Default constructor.
*/
CAutomobile() noexcept;
CAutomobile();
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model specified.
*/
CAutomobile(SQInt32 id) noexcept;
CAutomobile(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model extracted from the specified name.
*/
CAutomobile(const SQChar * name, SQInt32 id) noexcept;
CAutomobile(const SQChar * name, SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Copy constructor.
*/
CAutomobile(const CAutomobile & a) noexcept;
CAutomobile(const CAutomobile & a);
/* --------------------------------------------------------------------------------------------
* Move constructor.
*/
CAutomobile(CAutomobile && a) noexcept;
CAutomobile(CAutomobile && a);
/* --------------------------------------------------------------------------------------------
* Destructor.
@ -52,52 +52,52 @@ public:
/* --------------------------------------------------------------------------------------------
* Copy assignment operator.
*/
CAutomobile & operator = (const CAutomobile & a) noexcept;
CAutomobile & operator = (const CAutomobile & a);
/* --------------------------------------------------------------------------------------------
* Move assignment operator.
*/
CAutomobile & operator = (CAutomobile && a) noexcept;
CAutomobile & operator = (CAutomobile && a);
/* --------------------------------------------------------------------------------------------
* Model identifier assignment operator.
*/
CAutomobile & operator = (SQInt32 id) noexcept;
CAutomobile & operator = (SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Equality comparison operator.
*/
bool operator == (const CAutomobile & a) const noexcept;
bool operator == (const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Inequality comparison operator.
*/
bool operator != (const CAutomobile & a) const noexcept;
bool operator != (const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Less than comparison operator.
*/
bool operator < (const CAutomobile & a) const noexcept;
bool operator < (const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Greater than comparison operator.
*/
bool operator > (const CAutomobile & a) const noexcept;
bool operator > (const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Less than or equal comparison operator.
*/
bool operator <= (const CAutomobile & a) const noexcept;
bool operator <= (const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Greater than or equal comparison operator.
*/
bool operator >= (const CAutomobile & a) const noexcept;
bool operator >= (const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
*/
operator SQInt32 () const noexcept
operator SQInt32 () const
{
return m_ID;
}
@ -105,7 +105,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
*/
operator Int64 () const noexcept
operator Int64 () const
{
return _SCI64(m_ID);
}
@ -113,7 +113,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/
operator bool () const noexcept
operator bool () const
{
return IsAutomobileValid(m_ID);
}
@ -121,7 +121,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Negation operator.
*/
bool operator ! () const noexcept
bool operator ! () const
{
return !IsAutomobileValid(m_ID);
}
@ -129,109 +129,109 @@ public:
/* --------------------------------------------------------------------------------------------
* Used by the script to compare two instances of this type.
*/
SQInteger Cmp(const CAutomobile & a) const noexcept;
SQInteger Cmp(const CAutomobile & a) const;
/* --------------------------------------------------------------------------------------------
* Convert this type to a string.
*/
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the identifier referenced by this instance.
*/
SQInteger GetID() const noexcept;
SQInteger GetID() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier referenced by this instance.
*/
void SetID(SQInt32 id) noexcept;
void SetID(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Set the identifier that this insance should reference and
* get a reference to the instance to chain operations.
*/
CAutomobile & SetnGet(SQInt32 id) noexcept;
CAutomobile & SetnGet(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Retrieve the global tag.
*/
const SQChar * GetGlobalTag() const noexcept;
const SQChar * GetGlobalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the global tag.
*/
void SetGlobalTag(const SQChar * tag) const noexcept;
void SetGlobalTag(const SQChar * tag) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the global data.
*/
SqObj & GetGlobalData() const noexcept;
SqObj & GetGlobalData() const;
/* --------------------------------------------------------------------------------------------
* Change the global data.
*/
void SetGlobalData(SqObj & data) const noexcept;
void SetGlobalData(SqObj & data) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the local tag.
*/
const SQChar * GetLocalTag() const noexcept;
const SQChar * GetLocalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the local tag.
*/
void SetLocalTag(const SQChar * tag) noexcept;
void SetLocalTag(const SQChar * tag);
/* --------------------------------------------------------------------------------------------
* Retrieve the local data.
*/
SqObj & GetLocalData() noexcept;
SqObj & GetLocalData();
/* --------------------------------------------------------------------------------------------
* Change the local data.
*/
void SetLocalData(SqObj & data) noexcept;
void SetLocalData(SqObj & data);
/* --------------------------------------------------------------------------------------------
* See whether the referenced model identifier is valid.
*/
bool IsValid() const noexcept;
bool IsValid() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the name of the referenced model.
*/
const SQChar * GetName() const noexcept;
const SQChar * GetName() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier of the referenced model.
*/
void SetName(const SQChar * name) noexcept;
void SetName(const SQChar * name);
/* --------------------------------------------------------------------------------------------
* Create a vehicle instance using the referenced model.
*/
Reference < CVehicle > Create(SQInt32 world, const Vector3 & pos, SQFloat angle,
SQInt32 header, SqObj & payload) const noexcept;
SQInt32 header, SqObj & payload) const;
/* --------------------------------------------------------------------------------------------
* Create a vehicle instance using the referenced model.
*/
Reference < CVehicle > Create(SQInt32 world, const Vector3 & pos, SQFloat angle,
SQInt32 primary, SQInt32 secondary, SQInt32 header,
SqObj & payload) const noexcept;
SqObj & payload) const;
/* --------------------------------------------------------------------------------------------
* Create a vehicle instance using the referenced model.
*/
Reference < CVehicle > Create(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQFloat angle,
SQInt32 header, SqObj & payload) const noexcept;
SQInt32 header, SqObj & payload) const;
/* --------------------------------------------------------------------------------------------
* Create a vehicle instance using the referenced model.
*/
Reference < CVehicle > Create(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQFloat angle,
SQInt32 primary, SQInt32 secondary, SQInt32 header,
SqObj & payload) const noexcept;
SqObj & payload) const;
private:

View File

@ -11,19 +11,19 @@ namespace SqMod {
const CModel CModel::NIL;
// ------------------------------------------------------------------------------------------------
CModel::CModel() noexcept
CModel::CModel()
: m_ID(SQMOD_UNKNOWN)
{
}
CModel::CModel(SQInt32 id) noexcept
CModel::CModel(SQInt32 id)
: m_ID(VALID_ENTITYGETEX(id, Max))
{
}
CModel::CModel(const SQChar * name, SQInt32 id) noexcept
CModel::CModel(const SQChar * name, SQInt32 id)
: m_ID(GetWeaponID(name))
{
if (VALID_ENTITYGETEX(m_ID, Max))
@ -33,7 +33,7 @@ CModel::CModel(const SQChar * name, SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
CModel::CModel(const CModel & m) noexcept
CModel::CModel(const CModel & m)
: m_ID(m.m_ID)
, m_Tag(m.m_Tag)
, m_Data(m.m_Data)
@ -41,7 +41,7 @@ CModel::CModel(const CModel & m) noexcept
}
CModel::CModel(CModel && m) noexcept
CModel::CModel(CModel && m)
: m_ID(m.m_ID)
, m_Tag(m.m_Tag)
, m_Data(m.m_Data)
@ -56,7 +56,7 @@ CModel::~CModel()
}
// ------------------------------------------------------------------------------------------------
CModel & CModel::operator = (const CModel & m) noexcept
CModel & CModel::operator = (const CModel & m)
{
m_ID = m.m_ID;
m_Tag = m.m_Tag;
@ -65,7 +65,7 @@ CModel & CModel::operator = (const CModel & m) noexcept
return *this;
}
CModel & CModel::operator = (CModel && m) noexcept
CModel & CModel::operator = (CModel && m)
{
m_ID = m.m_ID;
m_Tag = m.m_Tag;
@ -75,7 +75,7 @@ CModel & CModel::operator = (CModel && m) noexcept
}
// ------------------------------------------------------------------------------------------------
CModel & CModel::operator = (SQInt32 id) noexcept
CModel & CModel::operator = (SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -83,38 +83,38 @@ CModel & CModel::operator = (SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
bool CModel::operator == (const CModel & m) const noexcept
bool CModel::operator == (const CModel & m) const
{
return (m_ID == m.m_ID);
}
bool CModel::operator != (const CModel & m) const noexcept
bool CModel::operator != (const CModel & m) const
{
return (m_ID != m.m_ID);
}
bool CModel::operator < (const CModel & m) const noexcept
bool CModel::operator < (const CModel & m) const
{
return (m_ID < m.m_ID);
}
bool CModel::operator > (const CModel & m) const noexcept
bool CModel::operator > (const CModel & m) const
{
return (m_ID < m.m_ID);
}
bool CModel::operator <= (const CModel & m) const noexcept
bool CModel::operator <= (const CModel & m) const
{
return (m_ID <= m.m_ID);
}
bool CModel::operator >= (const CModel & m) const noexcept
bool CModel::operator >= (const CModel & m) const
{
return (m_ID >= m.m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CModel::Cmp(const CModel & m) const noexcept
SQInteger CModel::Cmp(const CModel & m) const
{
if (m_ID == m.m_ID)
{
@ -131,24 +131,24 @@ SQInteger CModel::Cmp(const CModel & m) const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CModel::ToString() const noexcept
const SQChar * CModel::ToString() const
{
return GetModelName(m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CModel::GetID() const noexcept
SQInteger CModel::GetID() const
{
return m_ID;
}
void CModel::SetID(SQInt32 id) noexcept
void CModel::SetID(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
}
// ------------------------------------------------------------------------------------------------
CModel & CModel::SetnGet(SQInt32 id) noexcept
CModel & CModel::SetnGet(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -156,101 +156,101 @@ CModel & CModel::SetnGet(SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CModel::GetGlobalTag() const noexcept
const SQChar * CModel::GetGlobalTag() const
{
return GlobalTag(m_ID);
}
void CModel::SetGlobalTag(const SQChar * tag) const noexcept
void CModel::SetGlobalTag(const SQChar * tag) const
{
GlobalTag(m_ID, tag);
}
// ------------------------------------------------------------------------------------------------
SqObj & CModel::GetGlobalData() const noexcept
SqObj & CModel::GetGlobalData() const
{
return GlobalData(m_ID);
}
void CModel::SetGlobalData(SqObj & data) const noexcept
void CModel::SetGlobalData(SqObj & data) const
{
GlobalData(m_ID, data);
}
// ------------------------------------------------------------------------------------------------
const SQChar * CModel::GetLocalTag() const noexcept
const SQChar * CModel::GetLocalTag() const
{
return m_Tag.c_str();
}
void CModel::SetLocalTag(const SQChar * tag) noexcept
void CModel::SetLocalTag(const SQChar * tag)
{
m_Tag = tag;
}
// ------------------------------------------------------------------------------------------------
SqObj & CModel::GetLocalData() noexcept
SqObj & CModel::GetLocalData()
{
return m_Data;
}
void CModel::SetLocalData(SqObj & data) noexcept
void CModel::SetLocalData(SqObj & data)
{
m_Data = data;
}
// ------------------------------------------------------------------------------------------------
bool CModel::IsValid() const noexcept
bool CModel::IsValid() const
{
return (VALID_ENTITYEX(m_ID, Max));
}
// ------------------------------------------------------------------------------------------------
const SQChar * CModel::GetName() const noexcept
const SQChar * CModel::GetName() const
{
return GetModelName(m_ID);
}
// ------------------------------------------------------------------------------------------------
void CModel::SetName(const SQChar * name) noexcept
void CModel::SetName(const SQChar * name)
{
SQMOD_UNUSED_VAR(name);
m_ID = -1; /* @TODO Implement! */
}
// ------------------------------------------------------------------------------------------------
bool CModel::IsWeapon() const noexcept
bool CModel::IsWeapon() const
{
return IsModelWeapon(m_ID);
}
bool CModel::IsActuallyWeapon() const noexcept
bool CModel::IsActuallyWeapon() const
{
return IsModelActuallyWeapon(m_ID);
}
// ------------------------------------------------------------------------------------------------
Reference< CObject > CModel::Object(SQInt32 world, const Vector3 & pos, SQInt32 alpha, SQInt32 header, \
SqObj & payload) const noexcept
SqObj & payload) const
{
return _Core->NewObject(m_ID, world, pos.x, pos.y, pos.z, alpha, header, payload);
}
Reference< CObject > CModel::Object(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, \
SQInt32 header, SqObj & payload) const noexcept
SQInt32 header, SqObj & payload) const
{
return _Core->NewObject(m_ID, world, x, y, z, alpha, header, payload);
}
// ------------------------------------------------------------------------------------------------
Reference< CPickup > CModel::Pickup(SQInt32 world, SQInt32 quantity, const Vector3 & pos, SQInt32 alpha, \
bool automatic, SQInt32 header, SqObj & payload) const noexcept
bool automatic, SQInt32 header, SqObj & payload) const
{
return _Core->NewPickup(m_ID, world, quantity, pos.x, pos.y, pos.z, alpha, automatic, header, payload);
}
Reference< CPickup > CModel::Pickup(SQInt32 world, SQInt32 quantity, SQFloat x, SQFloat y, SQFloat z, \
SQInt32 alpha, bool automatic, SQInt32 header, SqObj & payload) const noexcept
SQInt32 alpha, bool automatic, SQInt32 header, SqObj & payload) const
{
return _Core->NewPickup(m_ID, world, quantity, x, y, z, alpha, automatic, header, payload);
}

View File

@ -22,27 +22,27 @@ public:
/* --------------------------------------------------------------------------------------------
* Default constructor.
*/
CModel() noexcept;
CModel();
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model specified.
*/
CModel(SQInt32 id) noexcept;
CModel(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model extracted from the specified name.
*/
CModel(const SQChar * name, SQInt32 id) noexcept;
CModel(const SQChar * name, SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Copy constructor.
*/
CModel(const CModel & m) noexcept;
CModel(const CModel & m);
/* --------------------------------------------------------------------------------------------
* Move constructor.
*/
CModel(CModel && m) noexcept;
CModel(CModel && m);
/* --------------------------------------------------------------------------------------------
* Destructor.
@ -52,52 +52,52 @@ public:
/* --------------------------------------------------------------------------------------------
* Copy assignment operator.
*/
CModel & operator = (const CModel & m) noexcept;
CModel & operator = (const CModel & m);
/* --------------------------------------------------------------------------------------------
* Move assignment operator.
*/
CModel & operator = (CModel && m) noexcept;
CModel & operator = (CModel && m);
/* --------------------------------------------------------------------------------------------
* Model identifier assignment operator.
*/
CModel & operator = (SQInt32 id) noexcept;
CModel & operator = (SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Equality comparison operator.
*/
bool operator == (const CModel & m) const noexcept;
bool operator == (const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Inequality comparison operator.
*/
bool operator != (const CModel & m) const noexcept;
bool operator != (const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Less than comparison operator.
*/
bool operator < (const CModel & m) const noexcept;
bool operator < (const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Greater than comparison operator.
*/
bool operator > (const CModel & m) const noexcept;
bool operator > (const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Less than or equal comparison operator.
*/
bool operator <= (const CModel & m) const noexcept;
bool operator <= (const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Greater than or equal comparison operator.
*/
bool operator >= (const CModel & m) const noexcept;
bool operator >= (const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
*/
operator SQInt32 () const noexcept
operator SQInt32 () const
{
return m_ID;
}
@ -105,7 +105,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
*/
operator Int64 () const noexcept
operator Int64 () const
{
return _SCI64(m_ID);
}
@ -113,7 +113,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/
operator bool () const noexcept
operator bool () const
{
return IsModelValid(m_ID);
}
@ -121,7 +121,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Negation operator.
*/
bool operator ! () const noexcept
bool operator ! () const
{
return !IsModelValid(m_ID);
}
@ -129,118 +129,118 @@ public:
/* --------------------------------------------------------------------------------------------
* Used by the script to compare two instances of this type.
*/
SQInteger Cmp(const CModel & m) const noexcept;
SQInteger Cmp(const CModel & m) const;
/* --------------------------------------------------------------------------------------------
* Convert this type to a string.
*/
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the identifier referenced by this instance.
*/
SQInteger GetID() const noexcept;
SQInteger GetID() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier referenced by this instance.
*/
void SetID(SQInt32 id) noexcept;
void SetID(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Set the identifier that this insance should reference and
* get a reference to the instance to chain operations.
*/
CModel & SetnGet(SQInt32 id) noexcept;
CModel & SetnGet(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Retrieve the global tag.
*/
const SQChar * GetGlobalTag() const noexcept;
const SQChar * GetGlobalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the global tag.
*/
void SetGlobalTag(const SQChar * tag) const noexcept;
void SetGlobalTag(const SQChar * tag) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the global data.
*/
SqObj & GetGlobalData() const noexcept;
SqObj & GetGlobalData() const;
/* --------------------------------------------------------------------------------------------
* Change the global data.
*/
void SetGlobalData(SqObj & data) const noexcept;
void SetGlobalData(SqObj & data) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the local tag.
*/
const SQChar * GetLocalTag() const noexcept;
const SQChar * GetLocalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the local tag.
*/
void SetLocalTag(const SQChar * tag) noexcept;
void SetLocalTag(const SQChar * tag);
/* --------------------------------------------------------------------------------------------
* Retrieve the local data.
*/
SqObj & GetLocalData() noexcept;
SqObj & GetLocalData();
/* --------------------------------------------------------------------------------------------
* Change the local data.
*/
void SetLocalData(SqObj & data) noexcept;
void SetLocalData(SqObj & data);
/* --------------------------------------------------------------------------------------------
* See whether the referenced model identifier is valid.
*/
bool IsValid() const noexcept;
bool IsValid() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the name of the referenced model.
*/
const SQChar * GetName() const noexcept;
const SQChar * GetName() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier of the referenced model.
*/
void SetName(const SQChar * name) noexcept;
void SetName(const SQChar * name);
/* --------------------------------------------------------------------------------------------
* See if the referenced model identifier is a weapon model.
*/
bool IsWeapon() const noexcept;
bool IsWeapon() const;
/* --------------------------------------------------------------------------------------------
* See if the referenced model identifier is truly a weapon model
* and not something like a camera.
*/
bool IsActuallyWeapon() const noexcept;
bool IsActuallyWeapon() const;
/* --------------------------------------------------------------------------------------------
* Create an object instance using the referenced model.
*/
Reference< CObject > Object(SQInt32 world, const Vector3 & pos, SQInt32 alpha, SQInt32 header,
SqObj & payload) const noexcept;
SqObj & payload) const;
/* --------------------------------------------------------------------------------------------
* Create an object instance using the referenced model.
*/
Reference< CObject > Object(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha,
SQInt32 header, SqObj & payload) const noexcept;
SQInt32 header, SqObj & payload) const;
/* --------------------------------------------------------------------------------------------
* Create a pickup instance using the referenced model.
*/
Reference< CPickup > Pickup(SQInt32 world, SQInt32 quantity, const Vector3 & pos, SQInt32 alpha,
bool automatic, SQInt32 header, SqObj & payload) const noexcept;
bool automatic, SQInt32 header, SqObj & payload) const;
/* --------------------------------------------------------------------------------------------
* Create a pickup instance using the referenced model.
*/
Reference< CPickup > Pickup(SQInt32 world, SQInt32 quantity, SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha, bool automatic, SQInt32 header, SqObj & payload) const noexcept;
SQInt32 alpha, bool automatic, SQInt32 header, SqObj & payload) const;
private:

View File

@ -15,22 +15,22 @@ struct CPlayerImmunity
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity() noexcept;
CPlayerImmunity();
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity(SQInt32 flags) noexcept;
CPlayerImmunity(SQInt32 flags);
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity(const CPlayerImmunity & x) noexcept;
CPlayerImmunity(const CPlayerImmunity & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity(CPlayerImmunity && x) noexcept;
CPlayerImmunity(CPlayerImmunity && x);
/* --------------------------------------------------------------------------------------------
* ...
@ -40,137 +40,137 @@ struct CPlayerImmunity
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity & operator = (const CPlayerImmunity & x) noexcept;
CPlayerImmunity & operator = (const CPlayerImmunity & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity & operator = (CPlayerImmunity && x) noexcept;
CPlayerImmunity & operator = (CPlayerImmunity && x);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator == (const CPlayerImmunity & x) const noexcept;
bool operator == (const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator != (const CPlayerImmunity & x) const noexcept;
bool operator != (const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator < (const CPlayerImmunity & x) const noexcept;
bool operator < (const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator > (const CPlayerImmunity & x) const noexcept;
bool operator > (const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator <= (const CPlayerImmunity & x) const noexcept;
bool operator <= (const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator >= (const CPlayerImmunity & x) const noexcept;
bool operator >= (const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger Cmp(const CPlayerImmunity & x) const noexcept;
SQInteger Cmp(const CPlayerImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator SQInt32 () const noexcept;
operator SQInt32 () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator bool () const noexcept;
operator bool () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetFlags() const noexcept;
SQInt32 GetFlags() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetFlags(SQInt32 flags) noexcept;
void SetFlags(SQInt32 flags);
/* --------------------------------------------------------------------------------------------
* ...
*/
CPlayerImmunity & SetnGet(SQInt32 flags) noexcept;
CPlayerImmunity & SetnGet(SQInt32 flags);
/* --------------------------------------------------------------------------------------------
* ...
*/
void Apply(const CPlayer & player) const noexcept;
void Apply(const CPlayer & player) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool GetBullet() const noexcept;
bool GetBullet() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetBullet(bool toggle) noexcept;
void SetBullet(bool toggle);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool GetFire() const noexcept;
bool GetFire() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetFire(bool toggle) noexcept;
void SetFire(bool toggle);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool GetExplosion() const noexcept;
bool GetExplosion() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetExplosion(bool toggle) noexcept;
void SetExplosion(bool toggle);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool GetCollision() const noexcept;
bool GetCollision() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetCollision(bool toggle) noexcept;
void SetCollision(bool toggle);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool GetMelee() const noexcept;
bool GetMelee() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetMelee(bool toggle) noexcept;
void SetMelee(bool toggle);
/* --------------------------------------------------------------------------------------------
* ...
*/
void EnableAll() noexcept;
void EnableAll();
/* --------------------------------------------------------------------------------------------
* ...
*/
void DisableAll() noexcept;
void DisableAll();
protected:

View File

@ -17,22 +17,22 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio() noexcept;
CRadio();
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio(SQInt32 id) noexcept;
CRadio(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio(const CRadio & x) noexcept;
CRadio(const CRadio & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio(CRadio && x) noexcept;
CRadio(CRadio && x);
/* --------------------------------------------------------------------------------------------
* ...
@ -42,97 +42,97 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio & operator= (const CRadio & x) noexcept;
CRadio & operator= (const CRadio & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio & operator= (CRadio && x) noexcept;
CRadio & operator= (CRadio && x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio operator+ (const CRadio & x) const noexcept;
CRadio operator+ (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio operator- (const CRadio & x) const noexcept;
CRadio operator- (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio operator* (const CRadio & x) const noexcept;
CRadio operator* (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio operator/ (const CRadio & x) const noexcept;
CRadio operator/ (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator == (const CRadio & x) const noexcept;
bool operator == (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator != (const CRadio & x) const noexcept;
bool operator != (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator < (const CRadio & x) const noexcept;
bool operator < (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator > (const CRadio & x) const noexcept;
bool operator > (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator <= (const CRadio & x) const noexcept;
bool operator <= (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator >= (const CRadio & x) const noexcept;
bool operator >= (const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger Cmp(const CRadio & x) const noexcept;
SQInteger Cmp(const CRadio & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator SQInt32 () const noexcept;
operator SQInt32 () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator bool () const noexcept;
operator bool () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetID() const noexcept;
SQInt32 GetID() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetID(SQInt32 id) noexcept;
void SetID(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* ...
*/
CRadio & SetnGet(SQInt32 id) noexcept;
CRadio & SetnGet(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* ...
*/
void Apply(const CVehicle & vehicle) const noexcept;
void Apply(const CVehicle & vehicle) const;
protected:

View File

@ -115,7 +115,7 @@ protected:
/* --------------------------------------------------------------------------------------------
* Retrieve the global tag.
*/
static const SQChar * GlobalTag(SQUint32 id) noexcept
static const SQChar * GlobalTag(SQUint32 id)
{
if (id < N)
{
@ -128,7 +128,7 @@ protected:
/* --------------------------------------------------------------------------------------------
* Change the global tag.
*/
static void GlobalTag(SQUint32 id, const SQChar * tag) noexcept
static void GlobalTag(SQUint32 id, const SQChar * tag)
{
if (id < N)
{
@ -143,7 +143,7 @@ protected:
/* --------------------------------------------------------------------------------------------
* Retrieve the global data.
*/
static SqObj & GlobalData(SQUint32 id) noexcept
static SqObj & GlobalData(SQUint32 id)
{
if (id < N)
{
@ -155,7 +155,7 @@ protected:
/* --------------------------------------------------------------------------------------------
* Change the global data.
*/
static void GlobalData(SQUint32 id, SqObj & data) noexcept
static void GlobalData(SQUint32 id, SqObj & data)
{
if (id < N)
{
@ -172,7 +172,7 @@ public:
/* --------------------------------------------------------------------------------------------
* See if the specified identifier is valid and in bounds.
*/
static bool Valid(SQInt32 id) noexcept
static bool Valid(SQInt32 id)
{
return VALID_ENTITYGETEX(id, Max);
}

View File

@ -9,19 +9,19 @@ namespace SqMod {
const CSkin CSkin::NIL = CSkin();
// ------------------------------------------------------------------------------------------------
CSkin::CSkin() noexcept
CSkin::CSkin()
: m_ID(SQMOD_UNKNOWN)
{
}
CSkin::CSkin(SQInt32 id) noexcept
CSkin::CSkin(SQInt32 id)
: m_ID(VALID_ENTITYGETEX(id, Max))
{
}
CSkin::CSkin(const SQChar * name, SQInt32 id) noexcept
CSkin::CSkin(const SQChar * name, SQInt32 id)
: m_ID(GetSkinID(name))
{
if (VALID_ENTITYEX(m_ID, Max))
@ -31,7 +31,7 @@ CSkin::CSkin(const SQChar * name, SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
CSkin::CSkin(const CSkin & s) noexcept
CSkin::CSkin(const CSkin & s)
: m_ID(s.m_ID)
, m_Tag(s.m_Tag)
, m_Data(s.m_Data)
@ -39,7 +39,7 @@ CSkin::CSkin(const CSkin & s) noexcept
}
CSkin::CSkin(CSkin && s) noexcept
CSkin::CSkin(CSkin && s)
: m_ID(s.m_ID)
, m_Tag(s.m_Tag)
, m_Data(s.m_Data)
@ -54,7 +54,7 @@ CSkin::~CSkin()
}
// ------------------------------------------------------------------------------------------------
CSkin & CSkin::operator = (const CSkin & s) noexcept
CSkin & CSkin::operator = (const CSkin & s)
{
m_ID = s.m_ID;
m_Tag = s.m_Tag;
@ -63,7 +63,7 @@ CSkin & CSkin::operator = (const CSkin & s) noexcept
return *this;
}
CSkin & CSkin::operator = (CSkin && s) noexcept
CSkin & CSkin::operator = (CSkin && s)
{
m_ID = s.m_ID;
m_Tag = s.m_Tag;
@ -73,7 +73,7 @@ CSkin & CSkin::operator = (CSkin && s) noexcept
}
// ------------------------------------------------------------------------------------------------
CSkin & CSkin::operator = (SQInt32 id) noexcept
CSkin & CSkin::operator = (SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -81,38 +81,38 @@ CSkin & CSkin::operator = (SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
bool CSkin::operator == (const CSkin & s) const noexcept
bool CSkin::operator == (const CSkin & s) const
{
return (m_ID == s.m_ID);
}
bool CSkin::operator != (const CSkin & s) const noexcept
bool CSkin::operator != (const CSkin & s) const
{
return (m_ID != s.m_ID);
}
bool CSkin::operator < (const CSkin & s) const noexcept
bool CSkin::operator < (const CSkin & s) const
{
return (m_ID < s.m_ID);
}
bool CSkin::operator > (const CSkin & s) const noexcept
bool CSkin::operator > (const CSkin & s) const
{
return (m_ID < s.m_ID);
}
bool CSkin::operator <= (const CSkin & s) const noexcept
bool CSkin::operator <= (const CSkin & s) const
{
return (m_ID <= s.m_ID);
}
bool CSkin::operator >= (const CSkin & s) const noexcept
bool CSkin::operator >= (const CSkin & s) const
{
return (m_ID >= s.m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CSkin::Cmp(const CSkin & s) const noexcept
SQInteger CSkin::Cmp(const CSkin & s) const
{
if (m_ID == s.m_ID)
{
@ -129,24 +129,24 @@ SQInteger CSkin::Cmp(const CSkin & s) const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CSkin::ToString() const noexcept
const SQChar * CSkin::ToString() const
{
return GetSkinName(m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CSkin::GetID() const noexcept
SQInteger CSkin::GetID() const
{
return m_ID;
}
void CSkin::SetID(SQInt32 id) noexcept
void CSkin::SetID(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
}
// ------------------------------------------------------------------------------------------------
CSkin & CSkin::SetnGet(SQInt32 id) noexcept
CSkin & CSkin::SetnGet(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -154,70 +154,70 @@ CSkin & CSkin::SetnGet(SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CSkin::GetGlobalTag() const noexcept
const SQChar * CSkin::GetGlobalTag() const
{
return GlobalTag(m_ID);
}
void CSkin::SetGlobalTag(const SQChar * tag) const noexcept
void CSkin::SetGlobalTag(const SQChar * tag) const
{
GlobalTag(m_ID, tag);
}
// ------------------------------------------------------------------------------------------------
SqObj & CSkin::GetGlobalData() const noexcept
SqObj & CSkin::GetGlobalData() const
{
return GlobalData(m_ID);
}
void CSkin::SetGlobalData(SqObj & data) const noexcept
void CSkin::SetGlobalData(SqObj & data) const
{
GlobalData(m_ID, data);
}
// ------------------------------------------------------------------------------------------------
const SQChar * CSkin::GetLocalTag() const noexcept
const SQChar * CSkin::GetLocalTag() const
{
return m_Tag.c_str();
}
void CSkin::SetLocalTag(const SQChar * tag) noexcept
void CSkin::SetLocalTag(const SQChar * tag)
{
m_Tag = tag;
}
// ------------------------------------------------------------------------------------------------
SqObj & CSkin::GetLocalData() noexcept
SqObj & CSkin::GetLocalData()
{
return m_Data;
}
void CSkin::SetLocalData(SqObj & data) noexcept
void CSkin::SetLocalData(SqObj & data)
{
m_Data = data;
}
// ------------------------------------------------------------------------------------------------
bool CSkin::IsValid() const noexcept
bool CSkin::IsValid() const
{
return (m_ID > 0);
}
// ------------------------------------------------------------------------------------------------
const SQChar * CSkin::GetName() const noexcept
const SQChar * CSkin::GetName() const
{
return GetSkinName(m_ID);
}
// ------------------------------------------------------------------------------------------------
void CSkin::SetName(const SQChar * name) noexcept
void CSkin::SetName(const SQChar * name)
{
m_ID = GetSkinID(name);
m_ID = VALID_ENTITYGETEX(m_ID, Max);
}
// ------------------------------------------------------------------------------------------------
void CSkin::Apply(const Reference< CPlayer > & player) const noexcept
void CSkin::Apply(const Reference< CPlayer > & player) const
{
if (player)
{

View File

@ -22,82 +22,82 @@ public:
/* --------------------------------------------------------------------------------------------
* Default constructor.
*/
CSkin() noexcept;
CSkin();
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the specified skin.
*/
CSkin(SQInt32 id) noexcept;
CSkin(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the skin extracted from the specified name.
*/
CSkin(const SQChar * name, SQInt32 id) noexcept;
CSkin(const SQChar * name, SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Copy constructor.
*/
CSkin(const CSkin & s) noexcept;
CSkin(const CSkin & s);
/* --------------------------------------------------------------------------------------------
* Move constructor.
*/
CSkin(CSkin && s) noexcept;
CSkin(CSkin && s);
/* --------------------------------------------------------------------------------------------
* Destructor.
*/
~CSkin() noexcept;
~CSkin();
/* --------------------------------------------------------------------------------------------
* Copy assignment operator.
*/
CSkin & operator = (const CSkin & s) noexcept;
CSkin & operator = (const CSkin & s);
/* --------------------------------------------------------------------------------------------
* Move assignment operator.
*/
CSkin & operator = (CSkin && s) noexcept;
CSkin & operator = (CSkin && s);
/* --------------------------------------------------------------------------------------------
* Skin identifier assignment operator.
*/
CSkin & operator = (SQInt32 id) noexcept;
CSkin & operator = (SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Equality comparison operator.
*/
bool operator == (const CSkin & s) const noexcept;
bool operator == (const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Inequality comparison operator.
*/
bool operator != (const CSkin & s) const noexcept;
bool operator != (const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Less than comparison operator.
*/
bool operator < (const CSkin & s) const noexcept;
bool operator < (const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Greater than comparison operator.
*/
bool operator > (const CSkin & s) const noexcept;
bool operator > (const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Less than or equal comparison operator.
*/
bool operator <= (const CSkin & s) const noexcept;
bool operator <= (const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Greater than or equal comparison operator.
*/
bool operator >= (const CSkin & s) const noexcept;
bool operator >= (const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Implicit conversion to skin identifier.
*/
operator SQInt32 () const noexcept
operator SQInt32 () const
{
return m_ID;
}
@ -105,7 +105,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to skin identifier.
*/
operator Int64 () const noexcept
operator Int64 () const
{
return _SCI64(m_ID);
}
@ -113,7 +113,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/
operator bool () const noexcept
operator bool () const
{
return IsSkinValid(m_ID);
}
@ -121,7 +121,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Negation operator.
*/
bool operator ! () const noexcept
bool operator ! () const
{
return !IsSkinValid(m_ID);
}
@ -129,88 +129,88 @@ public:
/* --------------------------------------------------------------------------------------------
* Used by the script to compare two instances of this type.
*/
SQInteger Cmp(const CSkin & s) const noexcept;
SQInteger Cmp(const CSkin & s) const;
/* --------------------------------------------------------------------------------------------
* Convert this type to a string.
*/
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the identifier referenced by this instance.
*/
SQInteger GetID() const noexcept;
SQInteger GetID() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier referenced by this instance.
*/
void SetID(SQInt32 id) noexcept;
void SetID(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Set the identifier that this insance should reference and
* get a reference to the instance to chain operations.
*/
CSkin & SetnGet(SQInt32 id) noexcept;
CSkin & SetnGet(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Retrieve the global tag.
*/
const SQChar * GetGlobalTag() const noexcept;
const SQChar * GetGlobalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the global tag.
*/
void SetGlobalTag(const SQChar * tag) const noexcept;
void SetGlobalTag(const SQChar * tag) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the global data.
*/
SqObj & GetGlobalData() const noexcept;
SqObj & GetGlobalData() const;
/* --------------------------------------------------------------------------------------------
* Change the global data.
*/
void SetGlobalData(SqObj & data) const noexcept;
void SetGlobalData(SqObj & data) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the local tag.
*/
const SQChar * GetLocalTag() const noexcept;
const SQChar * GetLocalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the local tag.
*/
void SetLocalTag(const SQChar * tag) noexcept;
void SetLocalTag(const SQChar * tag);
/* --------------------------------------------------------------------------------------------
* Retrieve the local data.
*/
SqObj & GetLocalData() noexcept;
SqObj & GetLocalData();
/* --------------------------------------------------------------------------------------------
* Change the local data.
*/
void SetLocalData(SqObj & data) noexcept;
void SetLocalData(SqObj & data);
/* --------------------------------------------------------------------------------------------
* See whether the referenced skin identifier is valid.
*/
bool IsValid() const noexcept;
bool IsValid() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the name of the referenced skin.
*/
const SQChar * GetName() const noexcept;
const SQChar * GetName() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier of the referenced skin.
*/
void SetName(const SQChar * name) noexcept;
void SetName(const SQChar * name);
/* --------------------------------------------------------------------------------------------
* Apply the referenced skin identifier to the specified player instance.
*/
void Apply(const Reference< CPlayer > & player) const noexcept;
void Apply(const Reference< CPlayer > & player) const;
private:

View File

@ -17,22 +17,22 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound() noexcept;
CSound();
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound(SQInt32 id) noexcept;
CSound(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound(const CSound & x) noexcept;
CSound(const CSound & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound(CSound && x) noexcept;
CSound(CSound && x);
/* --------------------------------------------------------------------------------------------
* ...
@ -42,92 +42,92 @@ public:
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound & operator= (const CSound & x) noexcept;
CSound & operator= (const CSound & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound & operator= (CSound && x) noexcept;
CSound & operator= (CSound && x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound operator+ (const CSound & x) const noexcept;
CSound operator+ (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound operator- (const CSound & x) const noexcept;
CSound operator- (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound operator* (const CSound & x) const noexcept;
CSound operator* (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CSound operator/ (const CSound & x) const noexcept;
CSound operator/ (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator == (const CSound & x) const noexcept;
bool operator == (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator != (const CSound & x) const noexcept;
bool operator != (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator < (const CSound & x) const noexcept;
bool operator < (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator > (const CSound & x) const noexcept;
bool operator > (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator <= (const CSound & x) const noexcept;
bool operator <= (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator >= (const CSound & x) const noexcept;
bool operator >= (const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger Cmp(const CSound & x) const noexcept;
SQInteger Cmp(const CSound & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator SQInt32 () const noexcept;
operator SQInt32 () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator bool () const noexcept;
operator bool () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetID() const noexcept;
SQInt32 GetID() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetID(SQInt32 id) noexcept;
void SetID(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* ...
*/
void Play() const noexcept;
void Play() const;
protected:

View File

@ -16,22 +16,22 @@ struct CVehicleImmunity
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity() noexcept;
CVehicleImmunity();
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity(SQInt32 flags) noexcept;
CVehicleImmunity(SQInt32 flags);
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity(const CVehicleImmunity & x) noexcept;
CVehicleImmunity(const CVehicleImmunity & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity(CVehicleImmunity && x) noexcept;
CVehicleImmunity(CVehicleImmunity && x);
/* --------------------------------------------------------------------------------------------
* ...
@ -41,87 +41,87 @@ struct CVehicleImmunity
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity & operator= (const CVehicleImmunity & x) noexcept;
CVehicleImmunity & operator= (const CVehicleImmunity & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity & operator= (CVehicleImmunity && x) noexcept;
CVehicleImmunity & operator= (CVehicleImmunity && x);
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator == (const CVehicleImmunity & x) const noexcept;
bool operator == (const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator != (const CVehicleImmunity & x) const noexcept;
bool operator != (const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator < (const CVehicleImmunity & x) const noexcept;
bool operator < (const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator > (const CVehicleImmunity & x) const noexcept;
bool operator > (const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator <= (const CVehicleImmunity & x) const noexcept;
bool operator <= (const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator >= (const CVehicleImmunity & x) const noexcept;
bool operator >= (const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger Cmp(const CVehicleImmunity & x) const noexcept;
SQInteger Cmp(const CVehicleImmunity & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator SQInt32 () const noexcept;
operator SQInt32 () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
operator bool () const noexcept;
operator bool () const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInt32 GetFlags() const noexcept;
SQInt32 GetFlags() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void SetFlags(SQInt32 flags) noexcept;
void SetFlags(SQInt32 flags);
/* --------------------------------------------------------------------------------------------
* ...
*/
CVehicleImmunity & SetnGet(SQInt32 flags) noexcept;
CVehicleImmunity & SetnGet(SQInt32 flags);
/* --------------------------------------------------------------------------------------------
* ...
*/
void Apply(const CVehicle & vehicle) const noexcept;
void Apply(const CVehicle & vehicle) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void EnableAll() noexcept;
void EnableAll();
/* --------------------------------------------------------------------------------------------
* ...
*/
void DisableAll() noexcept;
void DisableAll();
protected:

View File

@ -31,22 +31,22 @@ struct CWastedSettings
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings() noexcept;
CWastedSettings();
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings(U32 dt, U32 ft, F32 fis, F32 fos, const Color3 & fc, U32 cfs, U32 cft) noexcept;
CWastedSettings(U32 dt, U32 ft, F32 fis, F32 fos, const Color3 & fc, U32 cfs, U32 cft);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings(const CWastedSettings & x) noexcept;
CWastedSettings(const CWastedSettings & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings(CWastedSettings && x) noexcept;
CWastedSettings(CWastedSettings && x);
/* --------------------------------------------------------------------------------------------
* ...
@ -56,57 +56,57 @@ struct CWastedSettings
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings & operator= (const CWastedSettings & x) noexcept;
CWastedSettings & operator= (const CWastedSettings & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings & operator= (CWastedSettings && x) noexcept;
CWastedSettings & operator= (CWastedSettings && x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings operator+ (const CWastedSettings & x) const noexcept;
CWastedSettings operator+ (const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings operator- (const CWastedSettings & x) const noexcept;
CWastedSettings operator- (const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings operator* (const CWastedSettings & x) const noexcept;
CWastedSettings operator* (const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CWastedSettings operator/ (const CWastedSettings & x) const noexcept;
CWastedSettings operator/ (const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator== (const CWastedSettings & x) const noexcept;
bool operator== (const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator!= (const CWastedSettings & x) const noexcept;
bool operator!= (const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger Cmp(const CWastedSettings & x) const noexcept;
SQInteger Cmp(const CWastedSettings & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void Set() const noexcept;
void Set() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void Get() const noexcept;
void Get() const;
};

View File

@ -10,25 +10,25 @@ namespace SqMod {
const CWeapon CWeapon::NIL = CWeapon();
// ------------------------------------------------------------------------------------------------
CWeapon::CWeapon() noexcept
CWeapon::CWeapon()
: m_ID(SQMOD_UNKNOWN), m_Ammo(0)
{
}
CWeapon::CWeapon(SQInt32 id) noexcept
CWeapon::CWeapon(SQInt32 id)
: CWeapon(id, 0)
{
}
CWeapon::CWeapon(SQInt32 id, SQInt32 ammo) noexcept
CWeapon::CWeapon(SQInt32 id, SQInt32 ammo)
: m_ID(VALID_ENTITYGETEX(id, Max)), m_Ammo(ammo)
{
}
CWeapon::CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo) noexcept
CWeapon::CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo)
: m_ID(GetWeaponID(name)), m_Ammo(ammo)
{
if (VALID_ENTITYEX(m_ID, Max))
@ -38,7 +38,7 @@ CWeapon::CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo) noexcept
}
// ------------------------------------------------------------------------------------------------
CWeapon::CWeapon(const CWeapon & w) noexcept
CWeapon::CWeapon(const CWeapon & w)
: m_ID(w.m_ID)
, m_Ammo(w.m_Ammo)
, m_Tag(w.m_Tag)
@ -47,7 +47,7 @@ CWeapon::CWeapon(const CWeapon & w) noexcept
}
CWeapon::CWeapon(CWeapon && w) noexcept
CWeapon::CWeapon(CWeapon && w)
: m_ID(w.m_ID)
, m_Ammo(w.m_Ammo)
, m_Tag(w.m_Tag)
@ -63,7 +63,7 @@ CWeapon::~CWeapon()
}
// ------------------------------------------------------------------------------------------------
CWeapon & CWeapon::operator = (const CWeapon & w) noexcept
CWeapon & CWeapon::operator = (const CWeapon & w)
{
m_ID = w.m_ID;
m_Ammo = w.m_Ammo;
@ -73,7 +73,7 @@ CWeapon & CWeapon::operator = (const CWeapon & w) noexcept
return *this;
}
CWeapon & CWeapon::operator = (CWeapon && w) noexcept
CWeapon & CWeapon::operator = (CWeapon && w)
{
m_ID = w.m_ID;
m_Ammo = w.m_Ammo;
@ -84,7 +84,7 @@ CWeapon & CWeapon::operator = (CWeapon && w) noexcept
}
// ------------------------------------------------------------------------------------------------
CWeapon & CWeapon::operator = (SQInt32 id) noexcept
CWeapon & CWeapon::operator = (SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -92,38 +92,38 @@ CWeapon & CWeapon::operator = (SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
bool CWeapon::operator == (const CWeapon & w) const noexcept
bool CWeapon::operator == (const CWeapon & w) const
{
return (m_ID == w.m_ID);
}
bool CWeapon::operator != (const CWeapon & w) const noexcept
bool CWeapon::operator != (const CWeapon & w) const
{
return (m_ID != w.m_ID);
}
bool CWeapon::operator < (const CWeapon & w) const noexcept
bool CWeapon::operator < (const CWeapon & w) const
{
return (m_ID < w.m_ID);
}
bool CWeapon::operator > (const CWeapon & w) const noexcept
bool CWeapon::operator > (const CWeapon & w) const
{
return (m_ID < w.m_ID);
}
bool CWeapon::operator <= (const CWeapon & w) const noexcept
bool CWeapon::operator <= (const CWeapon & w) const
{
return (m_ID <= w.m_ID);
}
bool CWeapon::operator >= (const CWeapon & w) const noexcept
bool CWeapon::operator >= (const CWeapon & w) const
{
return (m_ID >= w.m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CWeapon::Cmp(const CWeapon & w) const noexcept
SQInteger CWeapon::Cmp(const CWeapon & w) const
{
if (m_ID == w.m_ID)
{
@ -140,24 +140,24 @@ SQInteger CWeapon::Cmp(const CWeapon & w) const noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CWeapon::ToString() const noexcept
const SQChar * CWeapon::ToString() const
{
return GetWeaponName(m_ID);
}
// ------------------------------------------------------------------------------------------------
SQInteger CWeapon::GetID() const noexcept
SQInteger CWeapon::GetID() const
{
return m_ID;
}
void CWeapon::SetID(SQInt32 id) noexcept
void CWeapon::SetID(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
}
// ------------------------------------------------------------------------------------------------
CWeapon & CWeapon::SetnGet(SQInt32 id) noexcept
CWeapon & CWeapon::SetnGet(SQInt32 id)
{
m_ID = VALID_ENTITYGETEX(id, Max);
@ -165,115 +165,115 @@ CWeapon & CWeapon::SetnGet(SQInt32 id) noexcept
}
// ------------------------------------------------------------------------------------------------
const SQChar * CWeapon::GetGlobalTag() const noexcept
const SQChar * CWeapon::GetGlobalTag() const
{
return GlobalTag(m_ID);
}
void CWeapon::SetGlobalTag(const SQChar * tag) const noexcept
void CWeapon::SetGlobalTag(const SQChar * tag) const
{
GlobalTag(m_ID, tag);
}
// ------------------------------------------------------------------------------------------------
SqObj & CWeapon::GetGlobalData() const noexcept
SqObj & CWeapon::GetGlobalData() const
{
return GlobalData(m_ID);
}
void CWeapon::SetGlobalData(SqObj & data) const noexcept
void CWeapon::SetGlobalData(SqObj & data) const
{
GlobalData(m_ID, data);
}
// ------------------------------------------------------------------------------------------------
const SQChar * CWeapon::GetLocalTag() const noexcept
const SQChar * CWeapon::GetLocalTag() const
{
return m_Tag.c_str();
}
void CWeapon::SetLocalTag(const SQChar * tag) noexcept
void CWeapon::SetLocalTag(const SQChar * tag)
{
m_Tag = tag;
}
// ------------------------------------------------------------------------------------------------
SqObj & CWeapon::GetLocalData() noexcept
SqObj & CWeapon::GetLocalData()
{
return m_Data;
}
void CWeapon::SetLocalData(SqObj & data) noexcept
void CWeapon::SetLocalData(SqObj & data)
{
m_Data = data;
}
// ------------------------------------------------------------------------------------------------
bool CWeapon::IsValid() const noexcept
bool CWeapon::IsValid() const
{
return (VALID_ENTITYEX(m_ID, Max));
}
// ------------------------------------------------------------------------------------------------
const SQChar * CWeapon::GetName() const noexcept
const SQChar * CWeapon::GetName() const
{
return GetWeaponName(m_ID);
}
// ------------------------------------------------------------------------------------------------
void CWeapon::SetName(const SQChar * name) noexcept
void CWeapon::SetName(const SQChar * name)
{
m_ID = GetWeaponID(name);
m_ID = VALID_ENTITYGETEX(m_ID, Max);
}
// ------------------------------------------------------------------------------------------------
SQInteger CWeapon::GetAmmo() const noexcept
SQInteger CWeapon::GetAmmo() const
{
return m_Ammo;
}
void CWeapon::SetAmmo(SQInt32 amount) noexcept
void CWeapon::SetAmmo(SQInt32 amount)
{
m_Ammo = amount;
}
// ------------------------------------------------------------------------------------------------
bool CWeapon::IsNatural() const noexcept
bool CWeapon::IsNatural() const
{
return IsWeaponNatural(m_ID);
}
// ------------------------------------------------------------------------------------------------
SQFloat CWeapon::GetDataValue(SQInt32 field) const noexcept
SQFloat CWeapon::GetDataValue(SQInt32 field) const
{
return _Func->GetWeaponDataValue(m_ID, field);
}
void CWeapon::SetDataValue(SQInt32 field, SQFloat value) const noexcept
void CWeapon::SetDataValue(SQInt32 field, SQFloat value) const
{
_Func->SetWeaponDataValue(m_ID, field, value);
}
// ------------------------------------------------------------------------------------------------
void CWeapon::ResetData() const noexcept
void CWeapon::ResetData() const
{
_Func->ResetWeaponData(m_ID);
}
void CWeapon::ResetData(SQInt32 field) const noexcept
void CWeapon::ResetData(SQInt32 field) const
{
_Func->ResetWeaponDataValue(m_ID, field);
}
// ------------------------------------------------------------------------------------------------
bool CWeapon::IsDataModified(SQInt32 field) const noexcept
bool CWeapon::IsDataModified(SQInt32 field) const
{
return _Func->IsWeaponDataValueModified(m_ID, field);
}
// ------------------------------------------------------------------------------------------------
void CWeapon::SetOn(const Reference< CPlayer > & player) const noexcept
void CWeapon::SetOn(const Reference< CPlayer > & player) const
{
if (*this && player)
{
@ -289,7 +289,7 @@ void CWeapon::SetOn(const Reference< CPlayer > & player) const noexcept
}
}
void CWeapon::GiveTo(const Reference< CPlayer > & player) const noexcept
void CWeapon::GiveTo(const Reference< CPlayer > & player) const
{
if (*this && player)
{
@ -305,7 +305,7 @@ void CWeapon::GiveTo(const Reference< CPlayer > & player) const noexcept
}
}
void CWeapon::SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const noexcept
void CWeapon::SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const
{
if (*this && player)
{
@ -321,7 +321,7 @@ void CWeapon::SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const noe
}
}
void CWeapon::GiveTo(const Reference< CPlayer > & player, SQInt32 ammo) const noexcept
void CWeapon::GiveTo(const Reference< CPlayer > & player, SQInt32 ammo) const
{
if (*this && player)
{

View File

@ -22,87 +22,87 @@ public:
/* --------------------------------------------------------------------------------------------
* Default constructor.
*/
CWeapon() noexcept;
CWeapon();
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model specified.
*/
CWeapon(SQInt32 id) noexcept;
CWeapon(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model specified.
*/
CWeapon(SQInt32 id, SQInt32 ammo) noexcept;
CWeapon(SQInt32 id, SQInt32 ammo);
/* --------------------------------------------------------------------------------------------
* Construct an instance of this type and reference the model extracted from the specified name.
*/
CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo) noexcept;
CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo);
/* --------------------------------------------------------------------------------------------
* Copy constructor.
*/
CWeapon(const CWeapon & w) noexcept;
CWeapon(const CWeapon & w);
/* --------------------------------------------------------------------------------------------
* Move constructor.
*/
CWeapon(CWeapon && w) noexcept;
CWeapon(CWeapon && w);
/* --------------------------------------------------------------------------------------------
* Destructor.
*/
~CWeapon() noexcept;
~CWeapon();
/* --------------------------------------------------------------------------------------------
* Copy assignment operator.
*/
CWeapon & operator = (const CWeapon & w) noexcept;
CWeapon & operator = (const CWeapon & w);
/* --------------------------------------------------------------------------------------------
* Move assignment operator.
*/
CWeapon & operator = (CWeapon && w) noexcept;
CWeapon & operator = (CWeapon && w);
/* --------------------------------------------------------------------------------------------
* Model identifier assignment operator.
*/
CWeapon & operator = (SQInt32 id) noexcept;
CWeapon & operator = (SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Equality comparison operator.
*/
bool operator == (const CWeapon & w) const noexcept;
bool operator == (const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Inequality comparison operator.
*/
bool operator != (const CWeapon & w) const noexcept;
bool operator != (const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Less than comparison operator.
*/
bool operator < (const CWeapon & w) const noexcept;
bool operator < (const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Greater than comparison operator.
*/
bool operator > (const CWeapon & w) const noexcept;
bool operator > (const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Less than or equal comparison operator.
*/
bool operator <= (const CWeapon & w) const noexcept;
bool operator <= (const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Greater than or equal comparison operator.
*/
bool operator >= (const CWeapon & w) const noexcept;
bool operator >= (const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Implicit conversion to weapon identifier.
*/
operator SQInt32 () const noexcept
operator SQInt32 () const
{
return m_ID;
}
@ -110,7 +110,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to weapon identifier.
*/
operator Int64 () const noexcept
operator Int64 () const
{
return _SCI64(m_ID);
}
@ -118,7 +118,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/
operator bool () const noexcept
operator bool () const
{
return IsWeaponValid(m_ID);
}
@ -126,7 +126,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Negation operator.
*/
bool operator ! () const noexcept
bool operator ! () const
{
return !IsWeaponValid(m_ID);
}
@ -134,144 +134,144 @@ public:
/* --------------------------------------------------------------------------------------------
* Used by the script to compare two instances of this type.
*/
SQInteger Cmp(const CWeapon & w) const noexcept;
SQInteger Cmp(const CWeapon & w) const;
/* --------------------------------------------------------------------------------------------
* Convert this type to a string.
*/
const SQChar * ToString() const noexcept;
const SQChar * ToString() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the identifier referenced by this instance.
*/
SQInteger GetID() const noexcept;
SQInteger GetID() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier referenced by this instance.
*/
void SetID(SQInt32 id) noexcept;
void SetID(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Set the identifier that this insance should reference and
* get a reference to the instance to chain operations.
*/
CWeapon & SetnGet(SQInt32 id) noexcept;
CWeapon & SetnGet(SQInt32 id);
/* --------------------------------------------------------------------------------------------
* Retrieve the global tag.
*/
const SQChar * GetGlobalTag() const noexcept;
const SQChar * GetGlobalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the global tag.
*/
void SetGlobalTag(const SQChar * tag) const noexcept;
void SetGlobalTag(const SQChar * tag) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the global data.
*/
SqObj & GetGlobalData() const noexcept;
SqObj & GetGlobalData() const;
/* --------------------------------------------------------------------------------------------
* Change the global data.
*/
void SetGlobalData(SqObj & data) const noexcept;
void SetGlobalData(SqObj & data) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the local tag.
*/
const SQChar * GetLocalTag() const noexcept;
const SQChar * GetLocalTag() const;
/* --------------------------------------------------------------------------------------------
* Change the local tag.
*/
void SetLocalTag(const SQChar * tag) noexcept;
void SetLocalTag(const SQChar * tag);
/* --------------------------------------------------------------------------------------------
* Retrieve the local data.
*/
SqObj & GetLocalData() noexcept;
SqObj & GetLocalData();
/* --------------------------------------------------------------------------------------------
* Change the local data.
*/
void SetLocalData(SqObj & data) noexcept;
void SetLocalData(SqObj & data);
/* --------------------------------------------------------------------------------------------
* See whether the referenced model identifier is valid.
*/
bool IsValid() const noexcept;
bool IsValid() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the name of the referenced model.
*/
const SQChar * GetName() const noexcept;
const SQChar * GetName() const;
/* --------------------------------------------------------------------------------------------
* Change the identifier of the referenced model.
*/
void SetName(const SQChar * name) noexcept;
void SetName(const SQChar * name);
/* --------------------------------------------------------------------------------------------
* Retrieve the ammount of ammo associated with this instance.
*/
SQInteger GetAmmo() const noexcept;
SQInteger GetAmmo() const;
/* --------------------------------------------------------------------------------------------
* Change the ammount of ammo associated with this instance.
*/
void SetAmmo(SQInt32 amount) noexcept;
void SetAmmo(SQInt32 amount);
/* --------------------------------------------------------------------------------------------
* See whether the referenced weapon identifier points to a weapon that may not be used by
* another player to perform a kill. Such as a player fall, drown, explosion etc.
*/
bool IsNatural() const noexcept;
bool IsNatural() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the value in the specified field from the weapon data.
*/
SQFloat GetDataValue(SQInt32 field) const noexcept;
SQFloat GetDataValue(SQInt32 field) const;
/* --------------------------------------------------------------------------------------------
* Change the value in the specified field from the weapon data.
*/
void SetDataValue(SQInt32 field, SQFloat value) const noexcept;
void SetDataValue(SQInt32 field, SQFloat value) const;
/* --------------------------------------------------------------------------------------------
* Reset the data for the referenced weapon identifier.
*/
void ResetData() const noexcept;
void ResetData() const;
/* --------------------------------------------------------------------------------------------
* Reset the foe;d data data for the referenced weapon identifier.
*/
void ResetData(SQInt32 field) const noexcept;
void ResetData(SQInt32 field) const;
/* --------------------------------------------------------------------------------------------
* See whether the data at the specified field was modified.
*/
bool IsDataModified(SQInt32 field) const noexcept;
bool IsDataModified(SQInt32 field) const;
/* --------------------------------------------------------------------------------------------
* Set the weapon of the specified player instance to the referenced weapon identifier.
*/
void SetOn(const Reference< CPlayer > & player) const noexcept;
void SetOn(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Give the referenced weapon identifier to the specified player instance.
*/
void GiveTo(const Reference< CPlayer > & player) const noexcept;
void GiveTo(const Reference< CPlayer > & player) const;
/* --------------------------------------------------------------------------------------------
* Set the weapon of the specified player instance to the referenced weapon identifier.
*/
void SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const noexcept;
void SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const;
/* --------------------------------------------------------------------------------------------
* Give the referenced weapon identifier to the specified player instance.
*/
void GiveTo(const Reference< CPlayer > & player, SQInt32 ammo) const noexcept;
void GiveTo(const Reference< CPlayer > & player, SQInt32 ammo) const;
private:

View File

@ -22,27 +22,27 @@ struct CWorldBounds
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds() noexcept;
CWorldBounds();
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds(const Vector2f & vec) noexcept;
CWorldBounds(const Vector2f & vec);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds(const Vector2f & min, const Vector2f & max) noexcept;
CWorldBounds(const Vector2f & min, const Vector2f & max);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds(const CWorldBounds & x) noexcept;
CWorldBounds(const CWorldBounds & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds(CWorldBounds && x) noexcept;
CWorldBounds(CWorldBounds && x);
/* --------------------------------------------------------------------------------------------
* ...
@ -52,57 +52,57 @@ struct CWorldBounds
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds & operator= (const CWorldBounds & x) noexcept;
CWorldBounds & operator= (const CWorldBounds & x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds & operator= (CWorldBounds && x) noexcept;
CWorldBounds & operator= (CWorldBounds && x);
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds operator+ (const CWorldBounds & x) const noexcept;
CWorldBounds operator+ (const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds operator- (const CWorldBounds & x) const noexcept;
CWorldBounds operator- (const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds operator* (const CWorldBounds & x) const noexcept;
CWorldBounds operator* (const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
CWorldBounds operator/ (const CWorldBounds & x) const noexcept;
CWorldBounds operator/ (const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator== (const CWorldBounds & x) const noexcept;
bool operator== (const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
bool operator!= (const CWorldBounds & x) const noexcept;
bool operator!= (const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
SQInteger Cmp(const CWorldBounds & x) const noexcept;
SQInteger Cmp(const CWorldBounds & x) const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void Set() const noexcept;
void Set() const;
/* --------------------------------------------------------------------------------------------
* ...
*/
void Get() const noexcept;
void Get() const;
};

View File

@ -13,7 +13,7 @@ namespace SqMod {
*/
// ------------------------------------------------------------------------------------------------
bool RegisterAPI(HSQUIRRELVM vm) noexcept
bool RegisterAPI(HSQUIRRELVM vm)
{
if (_Log->cFtl(!Register_AABB(vm), "Unable to register: AABB") || \
_Log->cFtl(!Register_Circle(vm), "Unable to register: Circle") || \

View File

@ -11,7 +11,7 @@ namespace SqMod {
using namespace Sqrat;
// ------------------------------------------------------------------------------------------------
bool RegisterAPI(HSQUIRRELVM vm) noexcept;
bool RegisterAPI(HSQUIRRELVM vm);
// ------------------------------------------------------------------------------------------------
bool Register_AABB(HSQUIRRELVM vm);

View File

@ -45,19 +45,19 @@ protected:
Node * m_Next;
// ----------------------------------------------------------------------------------------
Node(Executor e, void * t, Node * n) noexcept
Node(Executor e, void * t, Node * n)
: m_Exec(e), m_This(t), m_Next(n)
{
/* ... */
}
// ----------------------------------------------------------------------------------------
Node(const Node &) noexcept = default;
Node(Node &&) noexcept = default;
Node(const Node &) = default;
Node(Node &&) = default;
// ----------------------------------------------------------------------------------------
Node & operator = (const Node &) noexcept = default;
Node & operator = (Node &&) noexcept = default;
Node & operator = (const Node &) = default;
Node & operator = (Node &&) = default;
};
// --------------------------------------------------------------------------------------------
@ -67,13 +67,13 @@ protected:
Node * m_Head;
// ----------------------------------------------------------------------------------------
Container() noexcept : m_Head(0) { /* ... */ }
Container() : m_Head(0) { /* ... */ }
Container(Node * n) noexcept : m_Head(n) { /* ... */ }
Container(Node * n) : m_Head(n) { /* ... */ }
// ----------------------------------------------------------------------------------------
Container(const Container &) noexcept = default;
Container(Container &&) noexcept = default;
Container(const Container &) = default;
Container(Container &&) = default;
// ----------------------------------------------------------------------------------------
~Container()
@ -82,11 +82,11 @@ protected:
}
// ----------------------------------------------------------------------------------------
Container & operator = (const Container &) noexcept = default;
Container & operator = (Container &&) noexcept = default;
Container & operator = (const Container &) = default;
Container & operator = (Container &&) = default;
// ----------------------------------------------------------------------------------------
void Remove(Executor e, void * t) noexcept
void Remove(Executor e, void * t)
{
for (Node * node = m_Head, * prev = 0; node; prev = node, node = node->m_Next)
{
@ -119,7 +119,7 @@ protected:
};
// --------------------------------------------------------------------------------------------
template < Ret (* FPtr) (Args...) > static inline Executor Free() noexcept
template < Ret (* FPtr) (Args...) > static inline Executor Free()
{
return [](void * /* NULL */, Args... args) -> Ret {
return (*FPtr)(std::forward<Args>(args)...);
@ -127,7 +127,7 @@ protected:
}
// --------------------------------------------------------------------------------------------
template < typename T, Ret (T::* MPtr) (Args...) > static inline Executor Member() noexcept
template < typename T, Ret (T::* MPtr) (Args...) > static inline Executor Member()
{
return [](void * thisptr, Args... args) -> Ret {
return (static_cast<T *>(thisptr)->*MPtr)(std::forward<Args>(args)...);
@ -135,7 +135,7 @@ protected:
}
// --------------------------------------------------------------------------------------------
template < typename T, Ret (T::* MPtr) (Args...) const> static inline Executor Member() noexcept
template < typename T, Ret (T::* MPtr) (Args...) const> static inline Executor Member()
{
return [](void * thisptr, Args... args) -> Ret {
return (static_cast<T *>(thisptr)->*MPtr)(std::forward<Args>(args)...);
@ -143,7 +143,7 @@ protected:
}
// --------------------------------------------------------------------------------------------
template < typename L > static inline Executor Lambda() noexcept
template < typename L > static inline Executor Lambda()
{
return [](void * thisptr, Args... args) -> Ret {
return (static_cast<L *>(thisptr)->operator()(std::forward<Args>(args)...));
@ -156,85 +156,85 @@ public:
typedef Ret Return;
// --------------------------------------------------------------------------------------------
template < Ret (* FPtr) (Args...) > void Connect() noexcept
template < Ret (* FPtr) (Args...) > void Connect()
{
m_Nodes.m_Head = new Node(Free< FPtr >(), 0, m_Nodes.m_Head);
}
// --------------------------------------------------------------------------------------------
template < typename T, Ret (T::* MPtr) (Args...) > void Connect(T * ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) > void Connect(T * ptr)
{
m_Nodes.m_Head = new Node(Member< T, MPtr >(), ptr, m_Nodes.m_Head);
}
template < typename T, Ret (T::* MPtr) (Args...) > void Connect(T & ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) > void Connect(T & ptr)
{
m_Nodes.m_Head = new Node(Member< T, MPtr >(), std::addressof(ptr), m_Nodes.m_Head);
}
// --------------------------------------------------------------------------------------------
template < typename T, Ret (T::* MPtr) (Args...) const > void Connect(T * ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) const > void Connect(T * ptr)
{
m_Nodes.m_Head = new Node(Member< T, MPtr >(), ptr, m_Nodes.m_Head);
}
template < typename T, Ret (T::* MPtr) (Args...) const > void Connect(T & ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) const > void Connect(T & ptr)
{
m_Nodes.m_Head = new Node(Member< T, MPtr >(), std::addressof(ptr), m_Nodes.m_Head);
}
// --------------------------------------------------------------------------------------------
template < typename L > void Connect(L * ptr) noexcept
template < typename L > void Connect(L * ptr)
{
m_Nodes.m_Head = new Node(Lambda< L >(), ptr, m_Nodes.m_Head);
}
template < typename L > void Connect(L & ptr) noexcept
template < typename L > void Connect(L & ptr)
{
m_Nodes.m_Head = new Node(Lambda< L >(), std::addressof(ptr), m_Nodes.m_Head);
}
// --------------------------------------------------------------------------------------------
template < Ret (* FPtr) (Args...) > void Disconnect() noexcept
template < Ret (* FPtr) (Args...) > void Disconnect()
{
m_Nodes.Remove(Free< FPtr >(), 0);
}
// --------------------------------------------------------------------------------------------
template < typename T, Ret (T::* MPtr) (Args...) > void Disconnect(T * ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) > void Disconnect(T * ptr)
{
m_Nodes.Remove(Member< T, MPtr >(), ptr);
}
template < typename T, Ret (T::* MPtr) (Args...) > void Disconnect(T & ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) > void Disconnect(T & ptr)
{
m_Nodes.Remove(Member< T, MPtr >(), std::addressof(ptr));
}
// --------------------------------------------------------------------------------------------
template < typename T, Ret (T::* MPtr) (Args...) const > void Disconnect(T * ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) const > void Disconnect(T * ptr)
{
m_Nodes.Remove(Member< T, MPtr >(), ptr);
}
template < typename T, Ret (T::* MPtr) (Args...) const > void Disconnect(T & ptr) noexcept
template < typename T, Ret (T::* MPtr) (Args...) const > void Disconnect(T & ptr)
{
m_Nodes.Remove(Member< T, MPtr >(), std::addressof(ptr));
}
// --------------------------------------------------------------------------------------------
template < typename L > void Disconnect(L * ptr) noexcept
template < typename L > void Disconnect(L * ptr)
{
m_Nodes.Remove(Lambda< L >(), ptr);
}
template < typename L > void Disconnect(L & ptr) noexcept
template < typename L > void Disconnect(L & ptr)
{
m_Nodes.Remove(Lambda< L >(), std::addressof(ptr));
}
// --------------------------------------------------------------------------------------------
void Clear() noexcept
void Clear()
{
m_Nodes.Clear();
}