skeleton tf2 extension for ferret
--HG-- branch : sourcemod-1.1.0 extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401722
This commit is contained in:
parent
3f49d29274
commit
20112fe6cc
88
extensions/tf2/Makefile.ep1
Normal file
88
extensions/tf2/Makefile.ep1
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#(C)2004-2006 SourceMM Development Team
|
||||||
|
# Makefile written by David "BAILOPAN" Anderson
|
||||||
|
|
||||||
|
SMSDK = ../..
|
||||||
|
SRCDS = ~/srcds
|
||||||
|
SOURCEMM = ../../../sourcemm
|
||||||
|
HL2SDK = ../../../hl2sdk
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
PROJECT = game.cstrike
|
||||||
|
|
||||||
|
#Uncomment for SourceMM-enabled extensions
|
||||||
|
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
|
||||||
|
|
||||||
|
OBJECTS = sdk/smsdk_ext.cpp extension.cpp natives.cpp RegNatives.cpp timeleft.cpp
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
||||||
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
|
CPP = gcc-4.1
|
||||||
|
|
||||||
|
HL2PUB = $(HL2SDK)/public
|
||||||
|
HL2LIB = $(HL2SDK)/linux_sdk
|
||||||
|
|
||||||
|
LINK = $(LINK_HL2) -static-libgcc
|
||||||
|
|
||||||
|
INCLUDE = -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
|
||||||
|
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(SOURCEMM) -I$(SOURCEMM)/sourcehook -I$(SOURCEMM)/sourcemm \
|
||||||
|
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions \
|
||||||
|
|
||||||
|
CFLAGS = -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp \
|
||||||
|
-Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp \
|
||||||
|
-Wall -Werror -fPIC -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H
|
||||||
|
CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
|
################################################
|
||||||
|
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||||
|
################################################
|
||||||
|
|
||||||
|
ifeq "$(DEBUG)" "true"
|
||||||
|
BIN_DIR = Debug
|
||||||
|
CFLAGS += $(C_DEBUG_FLAGS)
|
||||||
|
else
|
||||||
|
BIN_DIR = Release
|
||||||
|
CFLAGS += $(C_OPT_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||||
|
ifeq "$(GCC_VERSION)" "4"
|
||||||
|
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
BINARY = $(PROJECT).ext.so
|
||||||
|
|
||||||
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||||
|
|
||||||
|
$(BIN_DIR)/%.o: %.cpp
|
||||||
|
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
|
all:
|
||||||
|
mkdir -p $(BIN_DIR)/sdk
|
||||||
|
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so
|
||||||
|
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so
|
||||||
|
$(MAKE) -f Makefile.ep1 extension
|
||||||
|
|
||||||
|
extension: $(OBJ_LINUX)
|
||||||
|
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
||||||
|
|
||||||
|
debug:
|
||||||
|
$(MAKE) -f Makefile.ep1 all DEBUG=true
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf Release/*.o
|
||||||
|
rm -rf Release/sdk/*.o
|
||||||
|
rm -rf Release/$(BINARY)
|
||||||
|
rm -rf Debug/*.o
|
||||||
|
rm -rf Debug/sdk/*.o
|
||||||
|
rm -rf Debug/$(BINARY)
|
88
extensions/tf2/Makefile.ep2
Normal file
88
extensions/tf2/Makefile.ep2
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#(C)2004-2006 SourceMM Development Team
|
||||||
|
# Makefile written by David "BAILOPAN" Anderson
|
||||||
|
|
||||||
|
SMSDK = ../..
|
||||||
|
SRCDS = ~/srcds
|
||||||
|
SOURCEMM = ../../../sourcemm
|
||||||
|
HL2SDK = ../../../hl2sdk-ob
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
PROJECT = game.cstrike
|
||||||
|
|
||||||
|
#Uncomment for SourceMM-enabled extensions
|
||||||
|
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
|
||||||
|
|
||||||
|
OBJECTS = sdk/smsdk_ext.cpp extension.cpp natives.cpp RegNatives.cpp timeleft.cpp
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
||||||
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
|
CPP = gcc-4.1
|
||||||
|
|
||||||
|
HL2PUB = $(HL2SDK)/public
|
||||||
|
HL2LIB = $(HL2SDK)/linux_sdk
|
||||||
|
|
||||||
|
LINK = $(LINK_HL2) -static-libgcc
|
||||||
|
|
||||||
|
INCLUDE = -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
|
||||||
|
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(SOURCEMM) -I$(SOURCEMM)/sourcehook -I$(SOURCEMM)/sourcemm \
|
||||||
|
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions \
|
||||||
|
|
||||||
|
CFLAGS = -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp \
|
||||||
|
-Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp \
|
||||||
|
-Wall -Werror -fPIC -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -DORANGEBOX_BUILD
|
||||||
|
CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
|
################################################
|
||||||
|
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||||
|
################################################
|
||||||
|
|
||||||
|
ifeq "$(DEBUG)" "true"
|
||||||
|
BIN_DIR = Debug
|
||||||
|
CFLAGS += $(C_DEBUG_FLAGS)
|
||||||
|
else
|
||||||
|
BIN_DIR = Release
|
||||||
|
CFLAGS += $(C_OPT_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||||
|
ifeq "$(GCC_VERSION)" "4"
|
||||||
|
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
BINARY = $(PROJECT).ext.so
|
||||||
|
|
||||||
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||||
|
|
||||||
|
$(BIN_DIR)/%.o: %.cpp
|
||||||
|
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
|
all:
|
||||||
|
mkdir -p $(BIN_DIR)/sdk
|
||||||
|
ln -sf $(SRCDS)/orangebox/bin/vstdlib_i486.so vstdlib_i486.so
|
||||||
|
ln -sf $(SRCDS)/orangebox/bin/tier0_i486.so tier0_i486.so
|
||||||
|
$(MAKE) -f Makefile.ep2 extension
|
||||||
|
|
||||||
|
extension: $(OBJ_LINUX)
|
||||||
|
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
||||||
|
|
||||||
|
debug:
|
||||||
|
$(MAKE) -f Makefile.ep2 all DEBUG=true
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf Release/*.o
|
||||||
|
rm -rf Release/sdk/*.o
|
||||||
|
rm -rf Release/$(BINARY)
|
||||||
|
rm -rf Debug/*.o
|
||||||
|
rm -rf Debug/sdk/*.o
|
||||||
|
rm -rf Debug/$(BINARY)
|
88
extensions/tf2/Makefile.orig
Normal file
88
extensions/tf2/Makefile.orig
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#(C)2004-2006 SourceMM Development Team
|
||||||
|
# Makefile written by David "BAILOPAN" Anderson
|
||||||
|
|
||||||
|
SMSDK = ../..
|
||||||
|
SRCDS = ~/srcds
|
||||||
|
SOURCEMM = ../../../sourcemm-1.4.2
|
||||||
|
HL2SDK = ../../../hl2sdk
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
PROJECT = game.cstrike
|
||||||
|
|
||||||
|
#Uncomment for SourceMM-enabled extensions
|
||||||
|
LINK_HL2 = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so
|
||||||
|
|
||||||
|
OBJECTS = sdk/smsdk_ext.cpp extension.cpp natives.cpp RegNatives.cpp timeleft.cpp
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
C_OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
||||||
|
C_DEBUG_FLAGS = -g -ggdb3
|
||||||
|
CPP_GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
|
CPP = gcc-4.1
|
||||||
|
|
||||||
|
HL2PUB = $(HL2SDK)/public
|
||||||
|
HL2LIB = $(HL2SDK)/linux_sdk
|
||||||
|
|
||||||
|
LINK = $(LINK_HL2) -static-libgcc
|
||||||
|
|
||||||
|
INCLUDE = -I. -I.. -Isdk -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
|
||||||
|
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(SOURCEMM) -I$(SOURCEMM)/sourcehook -I$(SOURCEMM)/sourcemm \
|
||||||
|
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions \
|
||||||
|
|
||||||
|
CFLAGS = -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp \
|
||||||
|
-Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp \
|
||||||
|
-Wall -Werror -fPIC -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H
|
||||||
|
CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
|
################################################
|
||||||
|
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||||
|
################################################
|
||||||
|
|
||||||
|
ifeq "$(DEBUG)" "true"
|
||||||
|
BIN_DIR = Debug
|
||||||
|
CFLAGS += $(C_DEBUG_FLAGS)
|
||||||
|
else
|
||||||
|
BIN_DIR = Release
|
||||||
|
CFLAGS += $(C_OPT_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||||
|
ifeq "$(GCC_VERSION)" "4"
|
||||||
|
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
BINARY = $(PROJECT).ext.so
|
||||||
|
|
||||||
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||||
|
|
||||||
|
$(BIN_DIR)/%.o: %.cpp
|
||||||
|
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
|
all:
|
||||||
|
mkdir -p $(BIN_DIR)/sdk
|
||||||
|
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so
|
||||||
|
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so
|
||||||
|
$(MAKE) -f Makefile.orig extension
|
||||||
|
|
||||||
|
extension: $(OBJ_LINUX)
|
||||||
|
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
||||||
|
|
||||||
|
debug:
|
||||||
|
$(MAKE) -f Makefile.orig all DEBUG=true
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf Release/*.o
|
||||||
|
rm -rf Release/sdk/*.o
|
||||||
|
rm -rf Release/$(BINARY)
|
||||||
|
rm -rf Debug/*.o
|
||||||
|
rm -rf Debug/sdk/*.o
|
||||||
|
rm -rf Debug/$(BINARY)
|
88
extensions/tf2/extension.cpp
Normal file
88
extensions/tf2/extension.cpp
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod Counter-Strike:Source Extension
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "extension.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file extension.cpp
|
||||||
|
* @brief Implement extension code here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
|
||||||
|
|
||||||
|
TF2Tools g_TF2Tools;
|
||||||
|
IGameConfig *g_pGameConf = NULL;
|
||||||
|
|
||||||
|
SMEXT_LINK(&g_TF2Tools);
|
||||||
|
|
||||||
|
extern sp_nativeinfo_t g_TFNatives[];
|
||||||
|
|
||||||
|
bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||||
|
{
|
||||||
|
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
||||||
|
|
||||||
|
char conf_error[255];
|
||||||
|
if (!gameconfs->LoadGameConfigFile("sm-tf2.games", &g_pGameConf, conf_error, sizeof(conf_error)))
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
snprintf(error, maxlength, "Could not read sm-cstrike.games.txt: %s", conf_error);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sharesys->AddNatives(myself, g_TFNatives);
|
||||||
|
sharesys->RegisterLibrary(myself, "tf2");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TF2Tools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late)
|
||||||
|
{
|
||||||
|
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TF2Tools::SDK_OnUnload()
|
||||||
|
{
|
||||||
|
gameconfs->CloseGameConfigFile(g_pGameConf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TF2Tools::SDK_OnAllLoaded()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TF2Tools::QueryRunning(char *error, size_t maxlength)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
121
extensions/tf2/extension.h
Normal file
121
extensions/tf2/extension.h
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod Counter-Strike:Source Extension
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
||||||
|
#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file extension.h
|
||||||
|
* @brief Sample extension code header.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "smsdk_ext.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sample implementation of the SDK Extension.
|
||||||
|
* Note: Uncomment one of the pre-defined virtual functions in order to use it.
|
||||||
|
*/
|
||||||
|
class TF2Tools : public SDKExtension
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* @brief This is called after the initial loading sequence has been processed.
|
||||||
|
*
|
||||||
|
* @param error Error message buffer.
|
||||||
|
* @param maxlength Size of error message buffer.
|
||||||
|
* @param late Whether or not the module was loaded after map load.
|
||||||
|
* @return True to succeed loading, false to fail.
|
||||||
|
*/
|
||||||
|
virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is called right before the extension is unloaded.
|
||||||
|
*/
|
||||||
|
virtual void SDK_OnUnload();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is called once all known extensions have been loaded.
|
||||||
|
* Note: It is is a good idea to add natives here, if any are provided.
|
||||||
|
*/
|
||||||
|
virtual void SDK_OnAllLoaded();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when the pause state is changed.
|
||||||
|
*/
|
||||||
|
//virtual void SDK_OnPauseChange(bool paused);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief this is called when Core wants to know if your extension is working.
|
||||||
|
*
|
||||||
|
* @param error Error message buffer.
|
||||||
|
* @param maxlength Size of error message buffer.
|
||||||
|
* @return True if working, false otherwise.
|
||||||
|
*/
|
||||||
|
virtual bool QueryRunning(char *error, size_t maxlength);
|
||||||
|
|
||||||
|
//void NotifyInterfaceDrop(SMInterface *pInterface);
|
||||||
|
//bool QueryInterfaceDrop(SMInterface *pInterface);
|
||||||
|
public:
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
/**
|
||||||
|
* @brief Called when Metamod is attached, before the extension version is called.
|
||||||
|
*
|
||||||
|
* @param error Error buffer.
|
||||||
|
* @param maxlength Maximum size of error buffer.
|
||||||
|
* @param late Whether or not Metamod considers this a late load.
|
||||||
|
* @return True to succeed, false to fail.
|
||||||
|
*/
|
||||||
|
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when Metamod is detaching, after the extension version is called.
|
||||||
|
* NOTE: By default this is blocked unless sent from SourceMod.
|
||||||
|
*
|
||||||
|
* @param error Error buffer.
|
||||||
|
* @param maxlength Maximum size of error buffer.
|
||||||
|
* @return True to succeed, false to fail.
|
||||||
|
*/
|
||||||
|
//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlength);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when Metamod's pause state is changing.
|
||||||
|
* NOTE: By default this is blocked unless sent from SourceMod.
|
||||||
|
*
|
||||||
|
* @param paused Pause state being set.
|
||||||
|
* @param error Error buffer.
|
||||||
|
* @param maxlength Maximum size of error buffer.
|
||||||
|
* @return True to succeed, false to fail.
|
||||||
|
*/
|
||||||
|
//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
32
extensions/tf2/msvc8/tf2.sln
Normal file
32
extensions/tf2/msvc8/tf2.sln
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
|
# Visual Studio 2005
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tf2", "tf2.vcproj", "{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug - Episode1|Win32 = Debug - Episode1|Win32
|
||||||
|
Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32
|
||||||
|
Debug - Orange Box|Win32 = Debug - Orange Box|Win32
|
||||||
|
Release - Episode 1|Win32 = Release - Episode 1|Win32
|
||||||
|
Release - Old Metamod|Win32 = Release - Old Metamod|Win32
|
||||||
|
Release - Orange Box|Win32 = Release - Orange Box|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.ActiveCfg = Debug - Episode1|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Episode1|Win32.Build.0 = Debug - Episode1|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32
|
||||||
|
{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
719
extensions/tf2/msvc8/tf2.vcproj
Normal file
719
extensions/tf2/msvc8/tf2.vcproj
Normal file
@ -0,0 +1,719 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8.00"
|
||||||
|
Name="tf2"
|
||||||
|
ProjectGUID="{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||||
|
RootNamespace="tf2"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="tier0.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Episode1|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;$(HL2SDK)\tier1;$(SOURCEMM);$(SOURCEMM)\sourcemm;$(SOURCEMM)\sourcehook"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="$(HL2SDK)\lib\public\tier0.lib $(HL2SDK)\lib\public\tier1.lib $(HL2SDK)\lib\public\vstdlib.lib $(HL2SDK)\lib\public\mathlib.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Orange Box|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKOB)\public;$(HL2SDKOB)\public\dlls;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(HL2SDKOB)\public\vstdlib;$(HL2SDKOB)\tier1;$(SOURCEMM);$(SOURCEMM)\sourcemm;$(SOURCEMM)\sourcehook"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="$(HL2SDKOB)\lib\public\tier0.lib $(HL2SDKOB)\lib\public\tier1.lib $(HL2SDKOB)\lib\public\vstdlib.lib $(HL2SDKOB)\lib\public\mathlib.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug - Old Metamod|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;$(HL2SDK)\tier1;$(SOURCEMM142);$(SOURCEMM142)\sourcemm;$(SOURCEMM142)\sourcehook"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="$(HL2SDK)\lib\public\tier0.lib $(HL2SDK)\lib\public\tier1.lib $(HL2SDK)\lib\public\vstdlib.lib $(HL2SDK)\lib\public\mathlib.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Old Metamod|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;$(HL2SDK)\tier1;$(SOURCEMM142);$(SOURCEMM142)\sourcemm;$(SOURCEMM142)\sourcehook"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="$(HL2SDK)\lib\public\tier0.lib $(HL2SDK)\lib\public\tier1.lib $(HL2SDK)\lib\public\vstdlib.lib $(HL2SDK)\lib\public\mathlib.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Orange Box|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDKOB)\public;$(HL2SDKOB)\public\dlls;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(HL2SDKOB)\public\vstdlib;$(HL2SDKOB)\tier1;$(SOURCEMM);$(SOURCEMM)\sourcemm;$(SOURCEMM)\sourcehook"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="$(HL2SDKOB)\lib\public\tier0.lib $(HL2SDKOB)\lib\public\tier1.lib $(HL2SDKOB)\lib\public\vstdlib.lib $(HL2SDKOB)\lib\public\mathlib.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release - Episode 1|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..;..\sdk;..\..\..\public;..\..\..\public\sourcepawn;..\..\..\public\extensions;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;$(HL2SDK)\tier1;$(SOURCEMM);$(SOURCEMM)\sourcemm;$(SOURCEMM)\sourcehook"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableEnhancedInstructionSet="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="$(HL2SDK)\lib\public\tier0.lib $(HL2SDK)\lib\public\tier1.lib $(HL2SDK)\lib\public\vstdlib.lib $(HL2SDK)\lib\public\mathlib.lib"
|
||||||
|
OutputFile="$(OutDir)\game.tf2.ext.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\extension.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\natives.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\extension.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\version.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="SourceMod SDK"
|
||||||
|
UniqueIdentifier="{31958233-BB2D-4e41-A8F9-CE8A4684F436}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_config.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_ext.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\sdk\smsdk_ext.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
67
extensions/tf2/natives.cpp
Normal file
67
extensions/tf2/natives.cpp
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod Counter-Strike:Source Extension
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "extension.h"
|
||||||
|
|
||||||
|
inline CBaseEntity *GetCBaseEntity(int num, bool onlyPlayers)
|
||||||
|
{
|
||||||
|
edict_t *pEdict = engine->PEntityOfEntIndex(num);
|
||||||
|
if (!pEdict || pEdict->IsFree())
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num > 0 && num < playerhelpers->GetMaxClients())
|
||||||
|
{
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(pEdict);
|
||||||
|
if (!pPlayer || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (onlyPlayers)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
IServerUnknown *pUnk;
|
||||||
|
if ((pUnk=pEdict->GetUnknown()) == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pUnk->GetBaseEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
sp_nativeinfo_t g_TFNatives[] =
|
||||||
|
{
|
||||||
|
{NULL, NULL}
|
||||||
|
};
|
76
extensions/tf2/sdk/smsdk_config.h
Normal file
76
extensions/tf2/sdk/smsdk_config.h
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod Counter-Strike:Source Extension
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||||
|
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file smsdk_config.h
|
||||||
|
* @brief Contains macros for configuring basic extension information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "svn_version.h"
|
||||||
|
|
||||||
|
/* Basic information exposed publicly */
|
||||||
|
#define SMEXT_CONF_NAME "TF2 Tools"
|
||||||
|
#define SMEXT_CONF_DESCRIPTION "TF2 extended functionality"
|
||||||
|
#define SMEXT_CONF_VERSION SVN_FULL_VERSION
|
||||||
|
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
||||||
|
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||||
|
#define SMEXT_CONF_LOGTAG "TF2"
|
||||||
|
#define SMEXT_CONF_LICENSE "GPL"
|
||||||
|
#define SMEXT_CONF_DATESTRING __DATE__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Exposes plugin's main interface.
|
||||||
|
*/
|
||||||
|
#define SMEXT_LINK(name) SDKExtension *g_pExtensionIface = name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets whether or not this plugin required Metamod.
|
||||||
|
* NOTE: Uncomment to enable, comment to disable.
|
||||||
|
*/
|
||||||
|
#define SMEXT_CONF_METAMOD
|
||||||
|
|
||||||
|
/** Enable interfaces you want to use here by uncommenting lines */
|
||||||
|
//#define SMEXT_ENABLE_FORWARDSYS
|
||||||
|
//#define SMEXT_ENABLE_HANDLESYS
|
||||||
|
#define SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
//#define SMEXT_ENABLE_DBMANAGER
|
||||||
|
#define SMEXT_ENABLE_GAMECONF
|
||||||
|
//#define SMEXT_ENABLE_MEMUTILS
|
||||||
|
//#define SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
//#define SMEXT_ENABLE_TIMERSYS
|
||||||
|
//#define SMEXT_ENABLE_THREADER
|
||||||
|
//#define SMEXT_ENABLE_LIBSYS
|
||||||
|
//#define SMEXT_ENABLE_USERMSGS
|
||||||
|
|
||||||
|
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
422
extensions/tf2/sdk/smsdk_ext.cpp
Normal file
422
extensions/tf2/sdk/smsdk_ext.cpp
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod Base Extension Code
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include "smsdk_ext.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file smsdk_ext.cpp
|
||||||
|
* @brief Contains wrappers for making Extensions easier to write.
|
||||||
|
*/
|
||||||
|
|
||||||
|
IExtension *myself = NULL; /**< Ourself */
|
||||||
|
IShareSys *g_pShareSys = NULL; /**< Share system */
|
||||||
|
IShareSys *sharesys = NULL; /**< Share system */
|
||||||
|
ISourceMod *g_pSM = NULL; /**< SourceMod helpers */
|
||||||
|
ISourceMod *smutils = NULL; /**< SourceMod helpers */
|
||||||
|
|
||||||
|
#if defined SMEXT_ENABLE_FORWARDSYS
|
||||||
|
IForwardManager *g_pForwards = NULL; /**< Forward system */
|
||||||
|
IForwardManager *forwards = NULL; /**< Forward system */
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_HANDLESYS
|
||||||
|
IHandleSys *g_pHandleSys = NULL; /**< Handle system */
|
||||||
|
IHandleSys *handlesys = NULL; /**< Handle system */
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
IPlayerManager *playerhelpers = NULL; /**< Player helpers */
|
||||||
|
#endif //SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
#if defined SMEXT_ENABLE_DBMANAGER
|
||||||
|
IDBManager *dbi = NULL; /**< DB Manager */
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_GAMECONF
|
||||||
|
IGameConfigManager *gameconfs = NULL; /**< Game config manager */
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
|
IMemoryUtils *memutils = NULL;
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
IGameHelpers *gamehelpers = NULL;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
ITimerSystem *timersys = NULL;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_ADTFACTORY
|
||||||
|
IADTFactory *adtfactory = NULL;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_THREADER
|
||||||
|
IThreader *threader = NULL;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_LIBSYS
|
||||||
|
ILibrarySys *libsys = NULL;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_USERMSGS
|
||||||
|
IUserMessages *usermsgs = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Exports the main interface */
|
||||||
|
PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI()
|
||||||
|
{
|
||||||
|
return g_pExtensionIface;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDKExtension::SDKExtension()
|
||||||
|
{
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
m_SourceMMLoaded = false;
|
||||||
|
m_WeAreUnloaded = false;
|
||||||
|
m_WeGotPauseChange = false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late)
|
||||||
|
{
|
||||||
|
g_pShareSys = sharesys = sys;
|
||||||
|
myself = me;
|
||||||
|
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
m_WeAreUnloaded = true;
|
||||||
|
|
||||||
|
if (!m_SourceMMLoaded)
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
snprintf(error, maxlength, "Metamod attach failed");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
SM_GET_IFACE(SOURCEMOD, g_pSM);
|
||||||
|
smutils = g_pSM;
|
||||||
|
#if defined SMEXT_ENABLE_HANDLESYS
|
||||||
|
SM_GET_IFACE(HANDLESYSTEM, g_pHandleSys);
|
||||||
|
handlesys = g_pHandleSys;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_FORWARDSYS
|
||||||
|
SM_GET_IFACE(FORWARDMANAGER, g_pForwards);
|
||||||
|
forwards = g_pForwards;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
SM_GET_IFACE(PLAYERMANAGER, playerhelpers);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_DBMANAGER
|
||||||
|
SM_GET_IFACE(DBI, dbi);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMECONF
|
||||||
|
SM_GET_IFACE(GAMECONFIG, gameconfs);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
|
SM_GET_IFACE(MEMORYUTILS, memutils);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
SM_GET_IFACE(GAMEHELPERS, gamehelpers);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
SM_GET_IFACE(TIMERSYS, timersys);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_ADTFACTORY
|
||||||
|
SM_GET_IFACE(ADTFACTORY, adtfactory);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_THREADER
|
||||||
|
SM_GET_IFACE(THREADER, threader);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_LIBSYS
|
||||||
|
SM_GET_IFACE(LIBRARYSYS, libsys);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_USERMSGS
|
||||||
|
SM_GET_IFACE(USERMSGS, usermsgs);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (SDK_OnLoad(error, maxlength, late))
|
||||||
|
{
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
m_WeAreUnloaded = true;
|
||||||
|
#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::IsMetamodExtension()
|
||||||
|
{
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDKExtension::OnExtensionPauseChange(bool state)
|
||||||
|
{
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
m_WeGotPauseChange = true;
|
||||||
|
#endif
|
||||||
|
SDK_OnPauseChange(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDKExtension::OnExtensionsAllLoaded()
|
||||||
|
{
|
||||||
|
SDK_OnAllLoaded();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDKExtension::OnExtensionUnload()
|
||||||
|
{
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
m_WeAreUnloaded = true;
|
||||||
|
#endif
|
||||||
|
SDK_OnUnload();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionAuthor()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_AUTHOR;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionDateString()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_DATESTRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionDescription()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_DESCRIPTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionVerString()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionName()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionTag()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_LOGTAG;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetExtensionURL()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDKExtension::SDK_OnUnload()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDKExtension::SDK_OnPauseChange(bool paused)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDKExtension::SDK_OnAllLoaded()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
|
||||||
|
PluginId g_PLID = 0; /**< Metamod plugin ID */
|
||||||
|
ISmmPlugin *g_PLAPI = NULL; /**< Metamod plugin API */
|
||||||
|
SourceHook::ISourceHook *g_SHPtr = NULL; /**< SourceHook pointer */
|
||||||
|
ISmmAPI *g_SMAPI = NULL; /**< SourceMM API pointer */
|
||||||
|
|
||||||
|
IVEngineServer *engine = NULL; /**< IVEngineServer pointer */
|
||||||
|
IServerGameDLL *gamedll = NULL; /**< IServerGameDLL pointer */
|
||||||
|
|
||||||
|
/** Exposes the extension to Metamod */
|
||||||
|
SMM_API void *PL_EXPOSURE(const char *name, int *code)
|
||||||
|
{
|
||||||
|
if (name && !strcmp(name, METAMOD_PLAPI_NAME))
|
||||||
|
{
|
||||||
|
if (code)
|
||||||
|
{
|
||||||
|
*code = IFACE_OK;
|
||||||
|
}
|
||||||
|
return static_cast<void *>(g_pExtensionIface);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (code)
|
||||||
|
{
|
||||||
|
*code = IFACE_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
|
||||||
|
{
|
||||||
|
PLUGIN_SAVEVARS();
|
||||||
|
|
||||||
|
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||||
|
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
|
|
||||||
|
m_SourceMMLoaded = true;
|
||||||
|
|
||||||
|
return SDK_OnMetamodLoad(ismm, error, maxlen, late);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::Unload(char *error, size_t maxlen)
|
||||||
|
{
|
||||||
|
if (!m_WeAreUnloaded)
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
snprintf(error, maxlen, "This extension must be unloaded by SourceMod.");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SDK_OnMetamodUnload(error, maxlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::Pause(char *error, size_t maxlen)
|
||||||
|
{
|
||||||
|
if (!m_WeGotPauseChange)
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
snprintf(error, maxlen, "This extension must be paused by SourceMod.");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_WeGotPauseChange = false;
|
||||||
|
|
||||||
|
return SDK_OnMetamodPauseChange(true, error, maxlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::Unpause(char *error, size_t maxlen)
|
||||||
|
{
|
||||||
|
if (!m_WeGotPauseChange)
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
snprintf(error, maxlen, "This extension must be unpaused by SourceMod.");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_WeGotPauseChange = false;
|
||||||
|
|
||||||
|
return SDK_OnMetamodPauseChange(false, error, maxlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetAuthor()
|
||||||
|
{
|
||||||
|
return GetExtensionAuthor();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetDate()
|
||||||
|
{
|
||||||
|
return GetExtensionDateString();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetDescription()
|
||||||
|
{
|
||||||
|
return GetExtensionDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetLicense()
|
||||||
|
{
|
||||||
|
return SMEXT_CONF_LICENSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetLogTag()
|
||||||
|
{
|
||||||
|
return GetExtensionTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetName()
|
||||||
|
{
|
||||||
|
return GetExtensionName();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetURL()
|
||||||
|
{
|
||||||
|
return GetExtensionURL();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *SDKExtension::GetVersion()
|
||||||
|
{
|
||||||
|
return GetExtensionVerString();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::SDK_OnMetamodUnload(char *error, size_t maxlength)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SDKExtension::SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Overload a few things to prevent libstdc++ linking */
|
||||||
|
#if defined __linux__
|
||||||
|
extern "C" void __cxa_pure_virtual(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void *operator new(size_t size)
|
||||||
|
{
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *operator new[](size_t size)
|
||||||
|
{
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator delete(void *ptr)
|
||||||
|
{
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator delete[](void * ptr)
|
||||||
|
{
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
#endif
|
310
extensions/tf2/sdk/smsdk_ext.h
Normal file
310
extensions/tf2/sdk/smsdk_ext.h
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod Base Extension Code
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_BASESDK_H_
|
||||||
|
#define _INCLUDE_SOURCEMOD_EXTENSION_BASESDK_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file smsdk_ext.h
|
||||||
|
* @brief Contains wrappers for making Extensions easier to write.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "smsdk_config.h"
|
||||||
|
#include <IExtensionSys.h>
|
||||||
|
#include <IHandleSys.h>
|
||||||
|
#include <sp_vm_api.h>
|
||||||
|
#include <sm_platform.h>
|
||||||
|
#include <ISourceMod.h>
|
||||||
|
#if defined SMEXT_ENABLE_FORWARDSYS
|
||||||
|
#include <IForwardSys.h>
|
||||||
|
#endif //SMEXT_ENABLE_FORWARDSYS
|
||||||
|
#if defined SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
#include <IPlayerHelpers.h>
|
||||||
|
#endif //SMEXT_ENABLE_PlAYERHELPERS
|
||||||
|
#if defined SMEXT_ENABLE_DBMANAGER
|
||||||
|
#include <IDBDriver.h>
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_GAMECONF
|
||||||
|
#include <IGameConfigs.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
|
#include <IMemoryUtils.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
#include <IGameHelpers.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
#include <ITimerSystem.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_ADTFACTORY
|
||||||
|
#include <IADTFactory.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_THREADER
|
||||||
|
#include <IThreader.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_LIBSYS
|
||||||
|
#include <ILibrarySys.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_USERMSGS
|
||||||
|
#include <IUserMessages.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
#include <ISmmPlugin.h>
|
||||||
|
#include <eiface.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined METAMOD_PLAPI_VERSION
|
||||||
|
#include <metamod_wrappers.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using namespace SourceMod;
|
||||||
|
using namespace SourcePawn;
|
||||||
|
|
||||||
|
class SDKExtension :
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
public ISmmPlugin,
|
||||||
|
#endif
|
||||||
|
public IExtensionInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/** Constructor */
|
||||||
|
SDKExtension();
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* @brief This is called after the initial loading sequence has been processed.
|
||||||
|
*
|
||||||
|
* @param error Error message buffer.
|
||||||
|
* @param maxlength Size of error message buffer.
|
||||||
|
* @param late Whether or not the module was loaded after map load.
|
||||||
|
* @return True to succeed loading, false to fail.
|
||||||
|
*/
|
||||||
|
virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is called right before the extension is unloaded.
|
||||||
|
*/
|
||||||
|
virtual void SDK_OnUnload();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is called once all known extensions have been loaded.
|
||||||
|
*/
|
||||||
|
virtual void SDK_OnAllLoaded();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when the pause state is changed.
|
||||||
|
*/
|
||||||
|
virtual void SDK_OnPauseChange(bool paused);
|
||||||
|
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
/**
|
||||||
|
* @brief Called when Metamod is attached, before the extension version is called.
|
||||||
|
*
|
||||||
|
* @param error Error buffer.
|
||||||
|
* @param maxlength Maximum size of error buffer.
|
||||||
|
* @param late Whether or not Metamod considers this a late load.
|
||||||
|
* @return True to succeed, false to fail.
|
||||||
|
*/
|
||||||
|
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when Metamod is detaching, after the extension version is called.
|
||||||
|
* NOTE: By default this is blocked unless sent from SourceMod.
|
||||||
|
*
|
||||||
|
* @param error Error buffer.
|
||||||
|
* @param maxlength Maximum size of error buffer.
|
||||||
|
* @return True to succeed, false to fail.
|
||||||
|
*/
|
||||||
|
virtual bool SDK_OnMetamodUnload(char *error, size_t maxlength);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when Metamod's pause state is changing.
|
||||||
|
* NOTE: By default this is blocked unless sent from SourceMod.
|
||||||
|
*
|
||||||
|
* @param paused Pause state being set.
|
||||||
|
* @param error Error buffer.
|
||||||
|
* @param maxlength Maximum size of error buffer.
|
||||||
|
* @return True to succeed, false to fail.
|
||||||
|
*/
|
||||||
|
virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public: //IExtensionInterface
|
||||||
|
virtual bool OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late);
|
||||||
|
virtual void OnExtensionUnload();
|
||||||
|
virtual void OnExtensionsAllLoaded();
|
||||||
|
|
||||||
|
/** Returns whether or not this is a Metamod-based extension */
|
||||||
|
virtual bool IsMetamodExtension();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when the pause state changes.
|
||||||
|
*
|
||||||
|
* @param state True if being paused, false if being unpaused.
|
||||||
|
*/
|
||||||
|
virtual void OnExtensionPauseChange(bool state);
|
||||||
|
|
||||||
|
/** Returns name */
|
||||||
|
virtual const char *GetExtensionName();
|
||||||
|
/** Returns URL */
|
||||||
|
virtual const char *GetExtensionURL();
|
||||||
|
/** Returns log tag */
|
||||||
|
virtual const char *GetExtensionTag();
|
||||||
|
/** Returns author */
|
||||||
|
virtual const char *GetExtensionAuthor();
|
||||||
|
/** Returns version string */
|
||||||
|
virtual const char *GetExtensionVerString();
|
||||||
|
/** Returns description string */
|
||||||
|
virtual const char *GetExtensionDescription();
|
||||||
|
/** Returns date string */
|
||||||
|
virtual const char *GetExtensionDateString();
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
public: //ISmmPlugin
|
||||||
|
/** Called when the extension is attached to Metamod. */
|
||||||
|
virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late);
|
||||||
|
/** Returns the author to MM */
|
||||||
|
virtual const char *GetAuthor();
|
||||||
|
/** Returns the name to MM */
|
||||||
|
virtual const char *GetName();
|
||||||
|
/** Returns the description to MM */
|
||||||
|
virtual const char *GetDescription();
|
||||||
|
/** Returns the URL to MM */
|
||||||
|
virtual const char *GetURL();
|
||||||
|
/** Returns the license to MM */
|
||||||
|
virtual const char *GetLicense();
|
||||||
|
/** Returns the version string to MM */
|
||||||
|
virtual const char *GetVersion();
|
||||||
|
/** Returns the date string to MM */
|
||||||
|
virtual const char *GetDate();
|
||||||
|
/** Returns the logtag to MM */
|
||||||
|
virtual const char *GetLogTag();
|
||||||
|
/** Called on unload */
|
||||||
|
virtual bool Unload(char *error, size_t maxlength);
|
||||||
|
/** Called on pause */
|
||||||
|
virtual bool Pause(char *error, size_t maxlength);
|
||||||
|
/** Called on unpause */
|
||||||
|
virtual bool Unpause(char *error, size_t maxlength);
|
||||||
|
private:
|
||||||
|
bool m_SourceMMLoaded;
|
||||||
|
bool m_WeAreUnloaded;
|
||||||
|
bool m_WeGotPauseChange;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
extern SDKExtension *g_pExtensionIface;
|
||||||
|
extern IExtension *myself;
|
||||||
|
|
||||||
|
extern IShareSys *g_pShareSys;
|
||||||
|
extern IShareSys *sharesys; /* Note: Newer name */
|
||||||
|
extern ISourceMod *g_pSM;
|
||||||
|
extern ISourceMod *smutils; /* Note: Newer name */
|
||||||
|
|
||||||
|
/* Optional interfaces are below */
|
||||||
|
#if defined SMEXT_ENABLE_FORWARDSYS
|
||||||
|
extern IForwardManager *g_pForwards;
|
||||||
|
extern IForwardManager *forwards; /* Note: Newer name */
|
||||||
|
#endif //SMEXT_ENABLE_FORWARDSYS
|
||||||
|
#if defined SMEXT_ENABLE_HANDLESYS
|
||||||
|
extern IHandleSys *g_pHandleSys;
|
||||||
|
extern IHandleSys *handlesys; /* Note: Newer name */
|
||||||
|
#endif //SMEXT_ENABLE_HANDLESYS
|
||||||
|
#if defined SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
extern IPlayerManager *playerhelpers;
|
||||||
|
#endif //SMEXT_ENABLE_PLAYERHELPERS
|
||||||
|
#if defined SMEXT_ENABLE_DBMANAGER
|
||||||
|
extern IDBManager *dbi;
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_GAMECONF
|
||||||
|
extern IGameConfigManager *gameconfs;
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
|
extern IMemoryUtils *memutils;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
extern IGameHelpers *gamehelpers;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
extern ITimerSystem *timersys;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_ADTFACTORY
|
||||||
|
extern IADTFactory *adtfactory;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_THREADER
|
||||||
|
extern IThreader *threader;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_LIBSYS
|
||||||
|
extern ILibrarySys *libsys;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_USERMSGS
|
||||||
|
extern IUserMessages *usermsgs;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined SMEXT_CONF_METAMOD
|
||||||
|
PLUGIN_GLOBALVARS();
|
||||||
|
extern IVEngineServer *engine;
|
||||||
|
extern IServerGameDLL *gamedll;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Creates a SourceMod interface macro pair */
|
||||||
|
#define SM_MKIFACE(name) SMINTERFACE_##name##_NAME, SMINTERFACE_##name##_VERSION
|
||||||
|
/** Automates retrieving SourceMod interfaces */
|
||||||
|
#define SM_GET_IFACE(prefix, addr) \
|
||||||
|
if (!g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)) \
|
||||||
|
{ \
|
||||||
|
if (error != NULL && maxlength) \
|
||||||
|
{ \
|
||||||
|
size_t len = snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
|
||||||
|
if (len >= maxlength) \
|
||||||
|
{ \
|
||||||
|
error[maxlength - 1] = '\0'; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
return false; \
|
||||||
|
}
|
||||||
|
/** Automates retrieving SourceMod interfaces when needed outside of SDK_OnLoad() */
|
||||||
|
#define SM_GET_LATE_IFACE(prefix, addr) \
|
||||||
|
g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)
|
||||||
|
/** Validates a SourceMod interface pointer */
|
||||||
|
#define SM_CHECK_IFACE(prefix, addr) \
|
||||||
|
if (!addr) \
|
||||||
|
{ \
|
||||||
|
if (error != NULL && maxlength) \
|
||||||
|
{ \
|
||||||
|
size_t len = snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
|
||||||
|
if (len >= maxlength) \
|
||||||
|
{ \
|
||||||
|
error[maxlength - 1] = '\0'; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
return false; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // _INCLUDE_SOURCEMOD_EXTENSION_BASESDK_H_
|
42
extensions/tf2/svn_version.h
Normal file
42
extensions/tf2/svn_version.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod SDKTools Extension
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autogenerated by build scripts
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
|
||||||
|
#define SVN_FULL_VERSION "1.0.0.1336"
|
||||||
|
#define SVN_FILE_VERSION 1,0,0,1336
|
||||||
|
|
||||||
|
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
42
extensions/tf2/svn_version.tpl
Normal file
42
extensions/tf2/svn_version.tpl
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod SDKTools Extension
|
||||||
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autogenerated by build scripts
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||||
|
|
||||||
|
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$LOCAL_BUILD$"
|
||||||
|
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$LOCAL_BUILD$
|
||||||
|
|
||||||
|
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
104
extensions/tf2/version.rc
Normal file
104
extensions/tf2/version.rc
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
//#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "winres.h"
|
||||||
|
|
||||||
|
#include "svn_version.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION SVN_FILE_VERSION
|
||||||
|
PRODUCTVERSION SVN_FILE_VERSION
|
||||||
|
FILEFLAGSMASK 0x17L
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "000004b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Comments", "SourceMod CS:S Extension"
|
||||||
|
VALUE "FileDescription", "SourceMod CS:S Extension"
|
||||||
|
VALUE "FileVersion", SVN_FULL_VERSION
|
||||||
|
VALUE "InternalName", "SourceMod CS:S Extension"
|
||||||
|
VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC"
|
||||||
|
VALUE "OriginalFilename", "game.cstrike.ext.dll"
|
||||||
|
VALUE "ProductName", "SourceMod CS:S Extension"
|
||||||
|
VALUE "ProductVersion", SVN_FULL_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""winres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
Loading…
Reference in New Issue
Block a user