1.1 --- a/plugins/include/core.inc Fri Mar 28 06:21:34 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,136 +0,0 @@
1.4 -/**
1.5 - * vim: set ts=4 :
1.6 - * =============================================================================
1.7 - * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.8 - * =============================================================================
1.9 - *
1.10 - * This file is part of the SourceMod/SourcePawn SDK.
1.11 - *
1.12 - * This program is free software; you can redistribute it and/or modify it under
1.13 - * the terms of the GNU General Public License, version 3.0, as published by the
1.14 - * Free Software Foundation.
1.15 - *
1.16 - * This program is distributed in the hope that it will be useful, but WITHOUT
1.17 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.18 - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.19 - * details.
1.20 - *
1.21 - * You should have received a copy of the GNU General Public License along with
1.22 - * this program. If not, see <http://www.gnu.org/licenses/>.
1.23 - *
1.24 - * As a special exception, AlliedModders LLC gives you permission to link the
1.25 - * code of this program (as well as its derivative works) to "Half-Life 2," the
1.26 - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
1.27 - * by the Valve Corporation. You must obey the GNU General Public License in
1.28 - * all respects for all other code used. Additionally, AlliedModders LLC grants
1.29 - * this exception to all derivative works. AlliedModders LLC defines further
1.30 - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
1.31 - * or <http://www.sourcemod.net/license.php>.
1.32 - *
1.33 - * Version: $Id$
1.34 - */
1.35 -
1.36 -#if defined _core_included
1.37 - #endinput
1.38 -#endif
1.39 -#define _core_included
1.40 -
1.41 -#include <version>
1.42 -
1.43 -#define SOURCEMOD_PLUGINAPI_VERSION 2
1.44 -struct PlVers
1.45 -{
1.46 - version,
1.47 - String:filevers[],
1.48 -};
1.49 -
1.50 -/**
1.51 - * Function helper values.
1.52 - */
1.53 -enum Function
1.54 -{
1.55 - INVALID_FUNCTION = -1,
1.56 -};
1.57 -
1.58 -/**
1.59 - * Specifies what to do after a hook completes.
1.60 - */
1.61 -enum Action
1.62 -{
1.63 - Plugin_Continue = 0, /**< Continue with the original action */
1.64 - Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
1.65 - Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */
1.66 -};
1.67 -
1.68 -/**
1.69 - * Specifies identity types.
1.70 - */
1.71 -enum Identity
1.72 -{
1.73 - Identity_Core = 0,
1.74 - Identity_Extension = 1,
1.75 - Identity_Plugin = 2
1.76 -};
1.77 -
1.78 -public PlVers:__version =
1.79 -{
1.80 - version = SOURCEMOD_PLUGINAPI_VERSION,
1.81 - filevers = SOURCEMOD_VERSION
1.82 -};
1.83 -
1.84 -/**
1.85 - * Plugin status values.
1.86 - */
1.87 -enum PluginStatus
1.88 -{
1.89 - Plugin_Running=0, /**< Plugin is running */
1.90 - /* All states below are "temporarily" unexecutable */
1.91 - Plugin_Paused, /**< Plugin is loaded but paused */
1.92 - Plugin_Error, /**< Plugin is loaded but errored/locked */
1.93 - /* All states below do not have all natives */
1.94 - Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
1.95 - Plugin_Failed, /**< Plugin has a fatal failure */
1.96 - Plugin_Created, /**< Plugin is created but not initialized */
1.97 - Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
1.98 - Plugin_BadLoad, /**< Plugin failed to load */
1.99 -};
1.100 -
1.101 -/**
1.102 - * Plugin information properties.
1.103 - */
1.104 -enum PluginInfo
1.105 -{
1.106 - PlInfo_Name, /**< Plugin name */
1.107 - PlInfo_Author, /**< Plugin author */
1.108 - PlInfo_Description, /**< Plugin description */
1.109 - PlInfo_Version, /**< Plugin verison */
1.110 - PlInfo_URL, /**< Plugin URL */
1.111 -};
1.112 -
1.113 -/**
1.114 - * Defines how an extension must expose itself for autoloading.
1.115 - */
1.116 -struct Extension
1.117 -{
1.118 - const String:name[], /**< Short name */
1.119 - const String:file[], /**< Default file name */
1.120 - bool:autoload, /**< Whether or not to auto-load */
1.121 - bool:required, /**< Whether or not to require */
1.122 -};
1.123 -
1.124 -/**
1.125 - * Defines how a plugin must expose itself for native requiring.
1.126 - */
1.127 -struct SharedPlugin
1.128 -{
1.129 - const String:name[], /**< Short name */
1.130 - const String:file[], /**< File name */
1.131 - bool:required, /**< Whether or not to require */
1.132 -};
1.133 -
1.134 -public Float:NULL_VECTOR[3]; /**< Pass this into certain functions to act as a C++ NULL */
1.135 -public const String:NULL_STRING[1]; /**< pass this into certain functions to act as a C++ NULL */
1.136 -
1.137 -#define AUTOLOAD_EXTENSIONS
1.138 -#define REQUIRE_EXTENSIONS
1.139 -#define REQUIRE_PLUGIN