8a46219d96
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40329
64 lines
1.2 KiB
C++
64 lines
1.2 KiB
C++
#ifndef _INCLUDE_SOURCEMOD_GLOBALS_H_
|
|
#define _INCLUDE_SOURCEMOD_GLOBALS_H_
|
|
|
|
/**
|
|
* @file Contains global headers that most files in SourceMod will need.
|
|
*/
|
|
|
|
#include <sp_vm_types.h>
|
|
#include <sp_vm_api.h>
|
|
#include "sm_platform.h"
|
|
#include <IShareSys.h>
|
|
|
|
using namespace SourcePawn;
|
|
using namespace SourceMod;
|
|
|
|
/**
|
|
* @brief Any class deriving from this will be automatically initiated/shutdown by SourceMod
|
|
*/
|
|
class SMGlobalClass
|
|
{
|
|
friend class SourceModBase;
|
|
public:
|
|
SMGlobalClass();
|
|
public:
|
|
/**
|
|
* @brief Called when SourceMod is initially loading
|
|
*/
|
|
virtual void OnSourceModStartup(bool late)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @brief Called after all global classes have initialized
|
|
*/
|
|
virtual void OnSourceModAllInitialized()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @brief Called when SourceMod is shutting down
|
|
*/
|
|
virtual void OnSourceModShutdown()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @brief Called after SourceMod is completely shutted down
|
|
*/
|
|
virtual void OnSourceModAllShutdown()
|
|
{
|
|
}
|
|
private:
|
|
SMGlobalClass *m_pGlobalClassNext;
|
|
static SMGlobalClass *head;
|
|
};
|
|
|
|
extern ISourcePawnEngine *g_pSourcePawn;
|
|
extern IVirtualMachine *g_pVM;
|
|
extern IdentityToken_t *g_pCoreIdent;
|
|
|
|
#include "sm_autonatives.h"
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_GLOBALS_H_
|