2006-11-08 07:30:20 +01:00
|
|
|
#ifndef _INCLUDE_SOURCEMOD_GLOBALHEADER_H_
|
|
|
|
#define _INCLUDE_SOURCEMOD_GLOBALHEADER_H_
|
|
|
|
|
2006-11-08 08:32:44 +01:00
|
|
|
#include "sm_globals.h"
|
2006-11-08 07:30:20 +01:00
|
|
|
|
2006-11-08 08:44:26 +01:00
|
|
|
/**
|
|
|
|
* @brief Implements SourceMod's global overall management, API, and logic
|
|
|
|
*/
|
|
|
|
|
2006-11-08 08:32:44 +01:00
|
|
|
class SourceModBase
|
|
|
|
{
|
2006-12-13 12:16:20 +01:00
|
|
|
public:
|
|
|
|
SourceModBase();
|
2006-11-08 08:32:44 +01:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Initializes SourceMod, or returns an error on failure.
|
|
|
|
*/
|
|
|
|
bool InitializeSourceMod(char *error, size_t err_max, bool late);
|
2006-12-13 12:16:20 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Starts everything SourceMod needs to run
|
|
|
|
*/
|
|
|
|
void StartSourceMod(bool late);
|
|
|
|
|
2007-01-13 05:28:13 +01:00
|
|
|
/**
|
|
|
|
* @brief Shuts down all SourceMod components
|
|
|
|
*/
|
|
|
|
void CloseSourceMod();
|
|
|
|
|
2006-12-13 12:16:20 +01:00
|
|
|
/**
|
|
|
|
* @brief Map change hook
|
|
|
|
*/
|
|
|
|
bool LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Returns whether or not a mapload is in progress
|
|
|
|
*/
|
|
|
|
bool IsMapLoading();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Returns the base SourceMod folder.
|
|
|
|
*/
|
|
|
|
const char *GetSMBaseDir();
|
|
|
|
|
2007-01-01 22:18:56 +01:00
|
|
|
/**
|
|
|
|
* @brief Returns the base folder for file natives.
|
|
|
|
*/
|
|
|
|
const char *GetBaseDir();
|
2006-12-13 12:16:20 +01:00
|
|
|
private:
|
|
|
|
/**
|
|
|
|
* @brief Loading plugins
|
|
|
|
*/
|
|
|
|
void DoGlobalPluginLoads();
|
|
|
|
private:
|
|
|
|
char m_SMBaseDir[PLATFORM_MAX_PATH+1];
|
|
|
|
bool m_IsMapLoading;
|
2006-12-15 14:38:04 +01:00
|
|
|
};
|
|
|
|
|
2006-11-08 08:32:44 +01:00
|
|
|
extern SourceModBase g_SourceMod;
|
2006-11-08 07:30:20 +01:00
|
|
|
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_GLOBALHEADER_H_
|