1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-08-03 06:31:47 +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

@@ -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;
};