1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 23:27:15 +02:00

Changes required to compile on x64 and against extra compiler warnings.

This commit is contained in:
Sandu Liviu Catalin
2015-11-01 05:36:03 +02:00
parent b42bc2930c
commit 2409a896df
40 changed files with 222 additions and 51 deletions

View File

@ -102,6 +102,14 @@ public:
return m_ID;
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
*/
operator Int64 () const noexcept
{
return _SCI64(m_ID);
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/

View File

@ -1,13 +1,17 @@
#include "Misc/Functions.hpp"
#include "Register.hpp"
// ------------------------------------------------------------------------------------------------
#include "Config.hpp"
// ------------------------------------------------------------------------------------------------
namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_Functions(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod

View File

@ -214,6 +214,7 @@ const SQChar * CModel::GetName() const noexcept
// ------------------------------------------------------------------------------------------------
void CModel::SetName(const SQChar * name) noexcept
{
SQMOD_UNUSED_VAR(name);
m_ID = -1; /* @TODO Implement! */
}

View File

@ -102,6 +102,14 @@ public:
return m_ID;
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
*/
operator Int64 () const noexcept
{
return _SCI64(m_ID);
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/

View File

@ -6,7 +6,8 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_CPlayerImmunity(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod

View File

@ -6,7 +6,8 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_CRadio(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod

View File

@ -2450,10 +2450,9 @@ SQInt32 WeaponToModel(SQInt32 id)
bool Register_Misc(HSQUIRRELVM vm)
{
// Output debugging information
LogDbg("Beginning registration of <Misc> API");
LogDbg("Beginning registration of <Miscellaneous> API");
// Attempt to register the specified API
Sqrat::RootTable(vm)
.Func(_SC("GetKeyCodeName"), &GetKeyCodeName)
.Func(_SC("GetModelName"), &GetModelName)
.Func(_SC("IsModelWeapon"), &IsModelWeapon)
@ -2469,12 +2468,12 @@ bool Register_Misc(HSQUIRRELVM vm)
.Func(_SC("GetWeaponID"), &GetWeaponID)
.Func(_SC("IsWeaponValid"), &IsWeaponValid)
.Func(_SC("IsWeaponNatural"), &IsWeaponNatural)
.Func(_SC("WeaponToModel"), &WeaponToModel)
.Func(_SC("WeaponToModel"), &WeaponToModel);
/* END REGISTRATION STATEMENT */ ;
// Output debugging information
LogDbg("Registration of <Misc> API was successful");
LogDbg("Registration of <Miscellaneous> API was successful");
// Registration succeeded
return true;
}

View File

@ -14,7 +14,7 @@ namespace SqMod {
/* ------------------------------------------------------------------------------------------------
* Attempt to convert the specified key code to a name.
*/
const SQChar * GetKeyCodeName(SQInteger keycode);
const SQChar * GetKeyCodeName(SQInt32 keycode);
/* ------------------------------------------------------------------------------------------------
* Attemp to convert the specified model identifier to a name.

View File

@ -97,17 +97,34 @@ public:
/* --------------------------------------------------------------------------------------------
* Implicit conversion to skin identifier.
*/
operator SQInt32 () const noexcept { return m_ID; }
operator SQInt32 () const noexcept
{
return m_ID;
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to skin identifier.
*/
operator Int64 () const noexcept
{
return _SCI64(m_ID);
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/
operator bool () const noexcept { return IsSkinValid(m_ID); }
operator bool () const noexcept
{
return IsSkinValid(m_ID);
}
/* --------------------------------------------------------------------------------------------
* Negation operator.
*/
bool operator ! () const noexcept { return !IsSkinValid(m_ID); }
bool operator ! () const noexcept
{
return !IsSkinValid(m_ID);
}
/* --------------------------------------------------------------------------------------------
* Used by the script to compare two instances of this type.

View File

@ -6,7 +6,8 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_CSound(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod

View File

@ -6,7 +6,8 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_CVehicleImmunity(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod

View File

@ -6,7 +6,8 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_CWastedSettings(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod

View File

@ -100,13 +100,21 @@ public:
bool operator >= (const CWeapon & w) const noexcept;
/* --------------------------------------------------------------------------------------------
* Implicit conversion to model identifier.
* Implicit conversion to weapon identifier.
*/
operator SQInt32 () const noexcept
{
return m_ID;
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to weapon identifier.
*/
operator Int64 () const noexcept
{
return _SCI64(m_ID);
}
/* --------------------------------------------------------------------------------------------
* Implicit conversion to boolean.
*/

View File

@ -6,7 +6,8 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
bool Register_CWorldBounds(HSQUIRRELVM vm)
{
SQMOD_UNUSED_VAR(vm);
return true;
}
} // Namespace:: SqMod
} // Namespace:: SqMod