attempted merge at 1.77 back into trunk... Oh MY GOD
This commit is contained in:
20
dlls/hamsandwich/msvc8/hs.sln
Normal file
20
dlls/hamsandwich/msvc8/hs.sln
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ham sandwich", "hs.vcproj", "{5B5DEFD0-28ED-4D0E-A1B0-50F9304A65DF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5B5DEFD0-28ED-4D0E-A1B0-50F9304A65DF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5B5DEFD0-28ED-4D0E-A1B0-50F9304A65DF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5B5DEFD0-28ED-4D0E-A1B0-50F9304A65DF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5B5DEFD0-28ED-4D0E-A1B0-50F9304A65DF}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
268
dlls/hamsandwich/msvc8/hs.vcproj
Normal file
268
dlls/hamsandwich/msvc8/hs.vcproj
Normal file
@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="ham sandwich"
|
||||
ProjectGUID="{5B5DEFD0-28ED-4D0E-A1B0-50F9304A65DF}"
|
||||
RootNamespace="hamsandwich"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="z:\metamod\metamod;z:\hlsdk\common;z:\hlsdk\engine;z:\hlsdk\dlls;z:\hlsdk\pm_shared;.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ns_amxx_EXPORTS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)\hamsandwich_amxx.dll"
|
||||
/>
|
||||
<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|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="del c:\HLServer\tfc\addons\amxmodx\modules
copy $(TargetDir)$(TargetFileName) c:\HLServer\tfc\addons\amxmodx\modules
"
|
||||
Outputs=""echo lol"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/ns_amxx.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="z:\metamod\metamod;z:\hlsdk\common;z:\hlsdk\engine;z:\hlsdk\dlls;z:\hlsdk\pm_shared;.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ns_amxx_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug/ns_amxx.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\Debug/hamsandwich_amxx.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/ns_amxx.pdb"
|
||||
ImportLibrary=".\Debug/ns_amxx.lib"
|
||||
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="sdk"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\sdk\amxxmodule.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\sdk\amxxmodule.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\sdk\moduleconfig.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\amxxapi.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\FileParser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\FileParser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hamsandwich.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Makefile"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\natives.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\NEW_Util.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Trampolines.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\vfunc_gcc295.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\vfunc_msvc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\vtable.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\VTableManager.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
148
dlls/hamsandwich/msvc8/include/hamsandwich.inc
Normal file
148
dlls/hamsandwich/msvc8/include/hamsandwich.inc
Normal file
@ -0,0 +1,148 @@
|
||||
#if defined _hamsandwich_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _hamsandwich_included
|
||||
|
||||
#if AMXX_VERSION_NUM >= 175
|
||||
#pragma reqlib hamsandwich
|
||||
#if !defined AMXMODX_NOAUTOLOAD
|
||||
#pragma loadlib hamsandwich
|
||||
#endif
|
||||
#else
|
||||
#pragma library hamsandwich
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Ham Sandwich general usage
|
||||
* -
|
||||
* Mods supported:
|
||||
* cs:
|
||||
* * 1.6 - legimate, most up to date version
|
||||
* * linux 32bit and windows
|
||||
* * czero - legimate, most up to date version
|
||||
* * linux 32bit and windows
|
||||
* * czero untested, theoretically it should work
|
||||
* dod:
|
||||
* * whatever the most up to date legitimate version is (1.3?)
|
||||
* * linux and windows
|
||||
* * windows untested, should work
|
||||
* tfc:
|
||||
* * whatever most up to date legitimate version is
|
||||
* * linux and windows
|
||||
* * windows untested, should work
|
||||
* ns:
|
||||
* * 3.2 beta 2
|
||||
* * linux and windows
|
||||
* * windows untested, should work
|
||||
* ts:
|
||||
* * 2.1
|
||||
* * linux and windows
|
||||
* * windows untested, should work
|
||||
* sven:
|
||||
* * 3.0
|
||||
* * windows
|
||||
* * windows untested, should work
|
||||
* -
|
||||
* The module will automatically use the relevant function depending
|
||||
* on what game mod is loaded. You only have to tell it to do the damage.
|
||||
* -
|
||||
* Be VERY VERY careful. I check _NO_ bounds in any of the natives
|
||||
* Also, these call the game's private function, and I do not have
|
||||
* the time nor desire to figure out the quirks of each mod's function
|
||||
* -
|
||||
* The USE natives haven't been tested yet, but should work!
|
||||
* -
|
||||
* The only mod I tested the windows version of takedamage
|
||||
* for was cs 1.6. It's much easier for me to test linux.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Calls the mod's private damage routine.
|
||||
* -
|
||||
* parameters:
|
||||
* id: index of the entity that is to be damaged
|
||||
*
|
||||
* inflictor: the entity that is "doing the damage" (eg a weapon)
|
||||
*
|
||||
* attacker: the entity who controls the inflictor (eg weapon holder)
|
||||
*
|
||||
* damage: how much damage to do to the victim
|
||||
*
|
||||
* type: bitmask of damage flags. Most mods do not
|
||||
* follow the standard HLSDK damage flags, so
|
||||
* you may have to do some testing!
|
||||
* The only flags I figured out were CS related:
|
||||
* * (1<<6) = no slowdown on damage
|
||||
* * (1<<13) = always gib
|
||||
* * (1<<12) = never gib
|
||||
*
|
||||
* -
|
||||
* Note: Setting damage to a ridiculously high value can mess up
|
||||
* some mods!
|
||||
*/
|
||||
native hs_takedamage(id,inflictor,attacker,Float:damage,type);
|
||||
native hs_etakedamage(id,inflictor,attacker,Float:damage,type);
|
||||
|
||||
|
||||
/**
|
||||
* Calls the mod's private use routine.
|
||||
* -
|
||||
* parameters:
|
||||
* id: index of the entity that is to be used
|
||||
*
|
||||
* activator: the entity that is "doing the use" (eg a trigger_multiple)
|
||||
*
|
||||
* caller: the entity who controls the activator (eg the player who trigger the trigger_multiple)
|
||||
*
|
||||
* use_type: how to use the entity
|
||||
* TYPICAL settings in HLSDK are:
|
||||
* 0 = USE_OFF - turns the object "off"
|
||||
* 1 = USE_ON - turns the object "on"
|
||||
* 2 = USE_SET - sets the object use state (uses the value flag)
|
||||
* 3 = USE_TOGGLE - toggles the state (from on->off and off->on)
|
||||
*
|
||||
* use_value: set when USE_SET is invoked
|
||||
* TYPICALLY USE_SET is only used for players using an object
|
||||
* when he begins using it, the use_value is set to 1.0
|
||||
* when he's done using it, the use_value is set to 0.0
|
||||
*
|
||||
* -
|
||||
* NOTE: This native was not tested at all beyond theory tests!
|
||||
*/
|
||||
native hs_use(id,activator,caller,use_type,Float:use_value);
|
||||
native hs_euse(id,activator,caller,use_type,Float:use_value);
|
||||
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
HAM_UNSET = 0,
|
||||
HAM_IGNORED,
|
||||
HAM_HANDLED,
|
||||
HAM_OVERRIDE,
|
||||
HAM_SUPERCEDE
|
||||
};
|
||||
|
||||
/**
|
||||
* Forwards all takedamage routines that would occur to the given
|
||||
* classname to the public provided.
|
||||
*
|
||||
* Parameters are:
|
||||
* function(IDVictim, IDInflictor, IDAttacker, Float:Damage, DamageType)
|
||||
*
|
||||
* Note: For now, this will also intercept calls to hs_takedamage
|
||||
* that is very likely to change shortly in the future.
|
||||
*/
|
||||
native register_takedamage(const classname[], const function[]);
|
||||
|
||||
/**
|
||||
* Forwards all use routines that would occur to the given
|
||||
* classname to the public provided.
|
||||
*
|
||||
* Parameters are:
|
||||
* function(IDUsed, IDActivator, IDCaller, UseType, Float:UseValue)
|
||||
*
|
||||
* Note: For now, this will also intercept calls to hs_use
|
||||
* that is very likely to change shortly in the future.
|
||||
*/
|
||||
native register_use(const classname[], const function[]);
|
Reference in New Issue
Block a user