Update spcomp and includes to latest 1.10-fork

disable warning 241: Array-based enum structs will be removed in 1.11
This commit is contained in:
BotoX
2024-06-21 06:55:55 +02:00
committed by zaCade
parent 689c4e89cf
commit 917ec936f8
72 changed files with 7755 additions and 6440 deletions
+51 -32
View File
@@ -38,7 +38,7 @@
#include <version>
/** If this gets changed, you need to update Core's check. */
#define SOURCEMOD_PLUGINAPI_VERSION 5
#define SOURCEMOD_PLUGINAPI_VERSION 5
struct PlVers
{
@@ -53,10 +53,10 @@ struct PlVers
*/
enum Action
{
Plugin_Continue = 0, /**< Continue with the original action */
Plugin_Changed = 1, /**< Inputs or outputs have been overridden with new values */
Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */
Plugin_Continue = 0, /**< Continue with the original action */
Plugin_Changed = 1, /**< Inputs or outputs have been overridden with new values */
Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
Plugin_Stop = 4 /**< Immediately stop the hook chain and handle the original */
};
/**
@@ -82,17 +82,17 @@ public PlVers __version =
*/
enum PluginStatus
{
Plugin_Running=0, /**< Plugin is running */
Plugin_Running=0, /**< Plugin is running */
/* All states below are "temporarily" unexecutable */
Plugin_Paused, /**< Plugin is loaded but paused */
Plugin_Error, /**< Plugin is loaded but errored/locked */
Plugin_Paused, /**< Plugin is loaded but paused */
Plugin_Error, /**< Plugin is loaded but errored/locked */
/* All states below do not have all natives */
Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
Plugin_Failed, /**< Plugin has a fatal failure */
Plugin_Created, /**< Plugin is created but not initialized */
Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
Plugin_BadLoad, /**< Plugin failed to load */
Plugin_Evicted /**< Plugin was unloaded due to an error */
Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
Plugin_Failed, /**< Plugin has a fatal failure */
Plugin_Created, /**< Plugin is created but not initialized */
Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
Plugin_BadLoad, /**< Plugin failed to load */
Plugin_Evicted /**< Plugin was unloaded due to an error */
};
/**
@@ -112,11 +112,11 @@ enum PluginStatus
*/
enum PluginInfo
{
PlInfo_Name, /**< Plugin name */
PlInfo_Author, /**< Plugin author */
PlInfo_Description, /**< Plugin description */
PlInfo_Version, /**< Plugin version */
PlInfo_URL, /**< Plugin URL */
PlInfo_Name, /**< Plugin name */
PlInfo_Author, /**< Plugin author */
PlInfo_Description, /**< Plugin description */
PlInfo_Version, /**< Plugin version */
PlInfo_URL /**< Plugin URL */
};
/**
@@ -124,10 +124,10 @@ enum PluginInfo
*/
struct Extension
{
public const char[] name; /**< Short name */
public const char[] file; /**< Default file name */
public bool autoload; /**< Whether or not to auto-load */
public bool required; /**< Whether or not to require */
public const char[] name; /**< Short name */
public const char[] file; /**< Default file name */
public bool autoload; /**< Whether or not to auto-load */
public bool required; /**< Whether or not to require */
};
/**
@@ -135,13 +135,29 @@ struct Extension
*/
struct SharedPlugin
{
public const char[] name; /**< Short name */
public const char[] file; /**< File name */
public bool required; /**< Whether or not to require */
public const char[] name; /**< Short name */
public const char[] file; /**< File name */
public bool required; /**< Whether or not to require */
};
public float NULL_VECTOR[3]; /**< Pass this into certain functions to act as a C++ NULL */
public const char NULL_STRING[1]; /**< pass this into certain functions to act as a C++ NULL */
public float NULL_VECTOR[3]; /**< Pass this into certain functions to act as a C++ NULL */
public const char NULL_STRING[1]; /**< pass this into certain functions to act as a C++ NULL */
/**
* Check if the given vector is the NULL_VECTOR.
*
* @param vec The vector to test.
* @return True if NULL_VECTOR, false otherwise.
*/
native bool IsNullVector(const float vec[3]);
/**
* Check if the given string is the NULL_STRING.
*
* @param str The string to test.
* @return True if NULL_STRING, false otherwise.
*/
native bool IsNullString(const char[] str);
/**
* Horrible compatibility shim.
@@ -161,7 +177,7 @@ native int VerifyCoreVersion();
* or otherwise non-existent, the plugin will still work. Calling
* removed natives results in a run-time error.
*
* @param name Native name.
* @param name Native name.
*/
native void MarkNativeAsOptional(const char[] name);
@@ -171,7 +187,7 @@ public void __ext_core_SetNTVOptional()
MarkNativeAsOptional("RequireFeature");
MarkNativeAsOptional("AddCommandListener");
MarkNativeAsOptional("RemoveCommandListener");
MarkNativeAsOptional("BfWriteBool");
MarkNativeAsOptional("BfWriteByte");
MarkNativeAsOptional("BfWriteChar");
@@ -230,8 +246,8 @@ public void __ext_core_SetNTVOptional()
MarkNativeAsOptional("BfRead.ReadVecCoord");
MarkNativeAsOptional("BfRead.ReadVecNormal");
MarkNativeAsOptional("BfRead.ReadAngles");
MarkNativeAsOptional("BfRead.GetNumBytesLeft");
MarkNativeAsOptional("BfRead.BytesLeft.get");
MarkNativeAsOptional("PbReadInt");
MarkNativeAsOptional("PbReadFloat");
MarkNativeAsOptional("PbReadBool");
@@ -263,6 +279,7 @@ public void __ext_core_SetNTVOptional()
MarkNativeAsOptional("PbAddMessage");
MarkNativeAsOptional("Protobuf.ReadInt");
MarkNativeAsOptional("Protobuf.ReadInt64");
MarkNativeAsOptional("Protobuf.ReadFloat");
MarkNativeAsOptional("Protobuf.ReadBool");
MarkNativeAsOptional("Protobuf.ReadString");
@@ -272,6 +289,7 @@ public void __ext_core_SetNTVOptional()
MarkNativeAsOptional("Protobuf.ReadVector2D");
MarkNativeAsOptional("Protobuf.GetRepeatedFieldCount");
MarkNativeAsOptional("Protobuf.SetInt");
MarkNativeAsOptional("Protobuf.SetInt64");
MarkNativeAsOptional("Protobuf.SetFloat");
MarkNativeAsOptional("Protobuf.SetBool");
MarkNativeAsOptional("Protobuf.SetString");
@@ -280,6 +298,7 @@ public void __ext_core_SetNTVOptional()
MarkNativeAsOptional("Protobuf.SetVector");
MarkNativeAsOptional("Protobuf.SetVector2D");
MarkNativeAsOptional("Protobuf.AddInt");
MarkNativeAsOptional("Protobuf.AddInt64");
MarkNativeAsOptional("Protobuf.AddFloat");
MarkNativeAsOptional("Protobuf.AddBool");
MarkNativeAsOptional("Protobuf.AddString");