More consistency of some sort...
Oh god, what has possessed me to do this?
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_SOURCEMOD_GLOBALHEADER_H_
16 #define _INCLUDE_SOURCEMOD_GLOBALHEADER_H_
18 #include "sm_globals.h"
19 #include <ISourceMod.h>
21 #include "CDataPack.h"
23 using namespace SourceHook;
26 * @brief Implements SourceMod's global overall management, API, and logic
29 class SourceModBase : public ISourceMod
35 * @brief Initializes SourceMod, or returns an error on failure.
37 bool InitializeSourceMod(char *error, size_t err_max, bool late);
40 * @brief Starts everything SourceMod needs to run
42 void StartSourceMod(bool late);
45 * @brief Shuts down all SourceMod components
47 void CloseSourceMod();
50 * @brief Map change hook
52 bool LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background);
55 * @brief Level shutdown hook
60 * @brief Returns whether or not a map load is in progress
62 bool IsMapLoading() const;
65 * @brief Stores the global target index.
67 void SetGlobalTarget(unsigned int index);
70 * @brief Returns the global target index.
72 unsigned int GetGlobalTarget() const;
75 * @brief Sets whether if SoureMod needs to check player auths.
77 void SetAuthChecking(bool set);
79 const char *GetModPath() const;
80 const char *GetSourceModPath() const;
81 size_t BuildPath(PathType type, char *buffer, size_t maxlength, char *format, ...);
82 void LogMessage(IExtension *pExt, const char *format, ...);
83 void LogError(IExtension *pExt, const char *format, ...);
84 size_t FormatString(char *buffer, size_t maxlength, IPluginContext *pContext, const cell_t *params, unsigned int param);
85 IDataPack *CreateDataPack();
86 void FreeDataPack(IDataPack *pack);
87 HandleType_t GetDataPackHandleType(bool readonly=false);
90 * @brief Loading plugins
92 void DoGlobalPluginLoads();
93 void GameFrame(bool simulating);
95 CStack<CDataPack *> m_freepacks;
96 char m_SMBaseDir[PLATFORM_MAX_PATH];
97 char m_SMRelDir[PLATFORM_MAX_PATH];
99 bool m_ExecPluginReload;
100 unsigned int m_target;
104 extern SourceModBase g_SourceMod;
105 extern HandleType_t g_WrBitBufType;
106 extern HandleType_t g_RdBitBufType;
108 #endif //_INCLUDE_SOURCEMOD_GLOBALHEADER_H_