amazingly, core now builds. it probably crashes horribly but i'll test tomorrow.
3 * =============================================================================
5 * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #ifndef _INCLUDE_SOURCEMOD_GLOBALS_H_
33 #define _INCLUDE_SOURCEMOD_GLOBALS_H_
36 * @file Contains global headers that most files in SourceMod will need.
39 #include <sp_vm_types.h>
40 #include <sp_vm_api.h>
41 #include "sm_platform.h"
42 #include <IShareSys.h>
44 using namespace SourcePawn;
45 using namespace SourceMod;
47 class IServerPluginCallbacks;
50 * @brief Lists result codes possible from attempting to set a core configuration option.
54 ConfigResult_Accept = 0, /**< Config option was successfully set */
55 ConfigResult_Reject = 1, /**< Config option was given an invalid value and was rejected */
56 ConfigResult_Ignore = 2 /**< Config option was invalid, but ignored */
60 * @brief Lists possible sources of a config option change
64 ConfigSource_File = 0, /**< Config option was set from config file (core.cfg) */
65 ConfigSource_Console = 1, /**< Config option was set from console command (sm config) */
69 * @brief Any class deriving from this will be automatically initiated/shutdown by SourceMod
73 friend class SourceMod_Core;
74 friend class SourceModBase;
75 friend class CoreConfig;
76 friend class CExtensionManager;
81 * @brief Called when SourceMod is initially loading
83 virtual void OnSourceModStartup(bool late)
88 * @brief Called after all global classes have been started up
90 virtual void OnSourceModAllInitialized()
95 * @brief Called after all global classes have initialized
97 virtual void OnSourceModAllInitialized_Post()
102 * @brief Called when SourceMod is shutting down
104 virtual void OnSourceModShutdown()
109 * @brief Called after SourceMod is completely shut down
111 virtual void OnSourceModAllShutdown()
116 * @brief Called when a core config option is changed.
117 * @note This is called once BEFORE OnSourceModStartup() when SourceMod is loading
118 * @note It can then be called again when the 'sm config' command is used
120 virtual ConfigResult OnSourceModConfigChanged(const char *key,
126 return ConfigResult_Ignore;
130 * @brief Called when the level changes.
132 virtual void OnSourceModLevelChange(const char *mapName)
137 * @brief Called when the level ends.
139 virtual void OnSourceModLevelEnd()
144 * @brief Called after plugins are loaded on mapchange.
146 virtual void OnSourceModPluginsLoaded()
151 * @brief Called when SourceMod receives a pointer to IServerPluginCallbacks from SourceMM
153 virtual void OnSourceModVSPReceived()
158 * @brief Called once all MM:S plugins are loaded.
160 virtual void OnSourceModGameInitialized()
165 * @brief Called when an identity is dropped (right now, extensions only)
167 virtual void OnSourceModIdentityDropped(IdentityToken_t *pToken)
171 SMGlobalClass *m_pGlobalClassNext;
172 static SMGlobalClass *head;
175 extern ISourcePawnEngine *g_pSourcePawn;
176 extern ISourcePawnEngine2 *g_pSourcePawn2;
177 extern IVirtualMachine *g_pVM;
178 extern IdentityToken_t *g_pCoreIdent;
180 #include "sm_autonatives.h"
182 #endif //_INCLUDE_SOURCEMOD_GLOBALS_H_