plugins/include/core.inc
branchrefac-jit
changeset 2284 026da5437111
parent 2192 7602d7fb60d9
child 2288 15c77b21589a
     1.1 --- a/plugins/include/core.inc	Fri Jul 11 06:51:21 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,141 +0,0 @@
     1.4 -/**
     1.5 - * vim: set ts=4 :
     1.6 - * =============================================================================
     1.7 - * SourceMod (C)2004-2008 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		3
    1.44 -struct PlVers
    1.45 -{
    1.46 -	version,
    1.47 -	String:filevers[],
    1.48 -	String:date[],
    1.49 -	String:time[]
    1.50 -};
    1.51 -
    1.52 -/**
    1.53 - * Function helper values.
    1.54 - */
    1.55 -enum Function
    1.56 -{
    1.57 -     INVALID_FUNCTION = -1,
    1.58 -};
    1.59 -
    1.60 -/**
    1.61 - * Specifies what to do after a hook completes.
    1.62 - */
    1.63 -enum Action
    1.64 -{
    1.65 -	Plugin_Continue = 0,	/**< Continue with the original action */
    1.66 -	Plugin_Changed = 1,		/**< Inputs or outputs have been overridden with new values */
    1.67 -	Plugin_Handled = 3,		/**< Handle the action at the end (don't call it) */
    1.68 -	Plugin_Stop = 4,		/**< Immediately stop the hook chain and handle the original */
    1.69 -};
    1.70 -
    1.71 -/**
    1.72 - * Specifies identity types.
    1.73 - */
    1.74 -enum Identity
    1.75 -{
    1.76 -	Identity_Core = 0,
    1.77 -	Identity_Extension = 1,
    1.78 -	Identity_Plugin = 2
    1.79 -};
    1.80 -
    1.81 -public PlVers:__version = 
    1.82 -{
    1.83 -	version = SOURCEMOD_PLUGINAPI_VERSION,
    1.84 -	filevers = SOURCEMOD_VERSION,
    1.85 -	date = __DATE__,
    1.86 -	time = __TIME__
    1.87 -};
    1.88 -
    1.89 -/**
    1.90 - * Plugin status values.
    1.91 - */
    1.92 -enum PluginStatus
    1.93 -{
    1.94 -	Plugin_Running=0,		/**< Plugin is running */
    1.95 -	/* All states below are "temporarily" unexecutable */
    1.96 -	Plugin_Paused,			/**< Plugin is loaded but paused */
    1.97 -	Plugin_Error,			/**< Plugin is loaded but errored/locked */
    1.98 -	/* All states below do not have all natives */
    1.99 -	Plugin_Loaded,			/**< Plugin has passed loading and can be finalized */
   1.100 -	Plugin_Failed,			/**< Plugin has a fatal failure */
   1.101 -	Plugin_Created,			/**< Plugin is created but not initialized */
   1.102 -	Plugin_Uncompiled,		/**< Plugin is not yet compiled by the JIT */
   1.103 -	Plugin_BadLoad,			/**< Plugin failed to load */
   1.104 -};
   1.105 -
   1.106 -/**
   1.107 - * Plugin information properties.
   1.108 - */
   1.109 -enum PluginInfo
   1.110 -{
   1.111 -	PlInfo_Name,			/**< Plugin name */
   1.112 -	PlInfo_Author,			/**< Plugin author */
   1.113 -	PlInfo_Description,		/**< Plugin description */
   1.114 -	PlInfo_Version,			/**< Plugin verison */
   1.115 -	PlInfo_URL,				/**< Plugin URL */
   1.116 -};
   1.117 -
   1.118 -/**
   1.119 - * Defines how an extension must expose itself for autoloading.
   1.120 - */
   1.121 -struct Extension
   1.122 -{
   1.123 -	const String:name[],	/**< Short name */
   1.124 -	const String:file[],	/**< Default file name */
   1.125 -	bool:autoload,			/**< Whether or not to auto-load */
   1.126 -	bool:required,			/**< Whether or not to require */
   1.127 -};
   1.128 -
   1.129 -/**
   1.130 - * Defines how a plugin must expose itself for native requiring.
   1.131 - */
   1.132 -struct SharedPlugin
   1.133 -{
   1.134 -	const String:name[],	/**< Short name */
   1.135 -	const String:file[],	/**< File name */
   1.136 -	bool:required,			/**< Whether or not to require */
   1.137 -};
   1.138 -
   1.139 -public Float:NULL_VECTOR[3];		/**< Pass this into certain functions to act as a C++ NULL */
   1.140 -public const String:NULL_STRING[1];	/**< pass this into certain functions to act as a C++ NULL */
   1.141 -
   1.142 -#define AUTOLOAD_EXTENSIONS
   1.143 -#define REQUIRE_EXTENSIONS
   1.144 -#define REQUIRE_PLUGIN