faluco@739: /** dvander@2783: * vim: set ts=4 sw=4 tw=99 noet: ds@1330: * ============================================================================= ds@757: * SourceMod BinTools Extension ds@3104: * Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved. ds@1330: * ============================================================================= faluco@739: * ds@1330: * This program is free software; you can redistribute it and/or modify it under ds@1330: * the terms of the GNU General Public License, version 3.0, as published by the ds@1330: * Free Software Foundation. dvander@1226: * ds@1330: * This program is distributed in the hope that it will be useful, but WITHOUT ds@1330: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ds@1330: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ds@1330: * details. dvander@1226: * ds@1330: * You should have received a copy of the GNU General Public License along with ds@1330: * this program. If not, see . dvander@1226: * ds@1330: * As a special exception, AlliedModders LLC gives you permission to link the ds@1330: * code of this program (as well as its derivative works) to "Half-Life 2," the ds@1330: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software ds@1330: * by the Valve Corporation. You must obey the GNU General Public License in ds@1330: * all respects for all other code used. Additionally, AlliedModders LLC grants ds@1330: * this exception to all derivative works. AlliedModders LLC defines further ds@1330: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), ds@1330: * or . faluco@739: * faluco@739: * Version: $Id$ faluco@739: */ faluco@739: dvander@2783: #include faluco@739: #include "extension.h" faluco@739: #include "CallMaker.h" faluco@739: faluco@739: /** faluco@739: * @file extension.cpp ds@757: * @brief Implements BinTools extension code. faluco@739: */ faluco@739: ds@757: BinTools g_BinTools; /**< Global singleton for extension's main interface */ faluco@739: CallMaker g_CallMaker; pred@2504: CallMaker2 g_CallMaker2; faluco@739: ISourcePawnEngine *g_SPEngine; faluco@739: faluco@739: SMEXT_LINK(&g_BinTools); faluco@739: ds@757: bool BinTools::SDK_OnLoad(char *error, size_t maxlength, bool late) faluco@739: { faluco@739: g_SPEngine = g_pSM->GetScriptingEngine(); faluco@739: g_pShareSys->AddInterface(myself, &g_CallMaker); ds@3104: ds@3104: /* IBinTools2 is only compatible with SH v5 */ ds@3104: if (g_pSM->GetShApiVersion() >= 5) ds@3104: { ds@3104: g_pShareSys->AddInterface(myself, &g_CallMaker2); ds@3104: } faluco@739: faluco@739: return true; faluco@739: } dvander@2783: dvander@2790: const char *BinTools::GetExtensionVerString() dvander@2783: { dvander@2783: return SM_FULL_VERSION; dvander@2783: } dvander@2783: dvander@2790: const char *BinTools::GetExtensionDateString() dvander@2783: { dvander@2783: return SM_BUILD_TIMESTAMP; dvander@2783: } dvander@2783: