Initial commit of hashtable stuff

This commit is contained in:
David Anderson 2005-04-02 07:33:25 +00:00
parent 85f5604d43
commit d17d9103de
8 changed files with 6785 additions and 0 deletions

410
dlls/nvault/hash.cpp Executable file
View File

@ -0,0 +1,410 @@
#include "hash.h"
HashTable::HashTable()
{
//necessary to do this!
memset(m_Table, 0, sizeof(m_Table));
}
HashTable::~HashTable()
{
Clear();
}
//Returns an iterator
HashTable::iterator HashTable::Enumerate()
{
return HashTable::iterator(m_Table, HT_SIZE);
}
//Retrieves a value from the hash table
HashTable::htNode *HashTable::Retrieve(const char *key)
{
return _FindNode(key);
}
//Adds an entry into the hash table
void HashTable::Store(const char *key, const char *value, bool temporary)
{
time_t stamp = 0;
if (temporary)
stamp = time(NULL);
_Insert(key, value, stamp);
}
//Deletes all keys between the two times.
// 0 specifies "match all"
//All specifies whether permanent keys (time_t = 0) are erased
size_t HashTable::Prune(time_t begin, time_t end, bool all)
{
HashTable::htNode *node, *temp;
size_t total = 0;
bool fire;
for (uint32_t i=0; i<HT_SIZE; i++)
{
if (m_Table[i])
{
node = m_Table[i]->head;
while (node != NULL)
{
temp = node->next;
fire = false;
if (!begin && !end)
{
fire = true;
} else if (!begin && end) {
if (node->stamp <= end)
fire = true;
} else if (begin && !end) {
if (node->stamp >= begin)
fire = true;
} else {
if (node->stamp >= begin && node->stamp <= end)
fire = true;
}
if (fire && ((node->stamp == 0) && !all))
fire = false;
if (fire)
{
_Unlink(m_Table[i], node);
total++;
}
node = temp;
}
}
}
return total;
}
void HashTable::Clear()
{
HashTable::htNode *node, *temp;
for (uint32_t i=0; i<HT_SIZE; i++)
{
if (m_Table[i])
{
node = m_Table[i]->head;
while (node != NULL)
{
temp = node->next;
delete node;
node = temp;
}
delete m_Table[i];
m_Table[i] = NULL;
}
}
}
////////////////////
// Iterator stuff //
////////////////////
HashTable::iterator::iterator(HashTable::htNodeSet **table, uint32_t tableSize)
{
d = NULL;
t = table;
s = tableSize;
for (r = 0; r<s; r++)
{
if (t[r] && t[r]->head)
{
d = t[r]->head;
break;
}
}
}
void HashTable::iterator::next()
{
if (d->next)
{
d = d->next;
} else {
d=NULL;
r++;
for (; r<s; r++)
{
if (t[r] && t[r]->head)
{
d = t[r]->head;
break;
}
}
}
}
bool HashTable::iterator::done()
{
if (d == NULL && r >= s)
return true;
return false;
}
const char *HashTable::iterator::val()
{
return d->val.c_str();
}
const char *HashTable::iterator::key()
{
return d->key.c_str();
}
time_t HashTable::iterator::stamp()
{
return d->stamp;
}
uint32_t HashTable::iterator::hash()
{
return r;
}
HashTable::htNode *HashTable::iterator::operator *()
{
return d;
}
/////////////////////////////
// Private implementations //
/////////////////////////////
//Erases a node
void HashTable::_Unlink(HashTable::htNodeSet *set, HashTable::htNode *node)
{
if (set->head == node)
{
set->head = NULL;
set->tail = NULL;
delete node;
} else {
HashTable::htNode *link = set->head;
while (link != NULL)
{
if (link->next == node)
{
link->next = node->next;
delete node;
return;
}
link = link->next;
}
}
}
//Finds a node by key
HashTable::htNode *HashTable::_FindNode(const char *key)
{
HashTable::htNodeSet *set;
HashTable::htNode *node;
set = _FindNodeSet(key);
node = set->head;
while (node)
{
if (node->key.compare(key) == 0)
return node;
node = node->next;
}
return _InsertIntoNodeSet(set, key, true);
}
//Inserts a new set of data into a bucket
void HashTable::_Insert(const char *key, const char *value, time_t stamp)
{
HashTable::htNodeSet *set;
HashTable::htNode *node;
set = _FindNodeSet(key);
node = _InsertIntoNodeSet(set, key);
node->val.assign(value);
node->stamp = stamp;
}
//Inserts a new key into a bucket
HashTable::htNode *HashTable::_InsertIntoNodeSet(HashTable::htNodeSet *set, const char *key, bool skip)
{
HashTable::htNode *node;
if (!skip)
{
node = set->head;
while (node != NULL)
{
if (strcmp(node->key.c_str(), key) == 0)
return node;
node = node->next;
}
}
node = new HashTable::htNode;
node->key.assign(key);
node->next = NULL;
if (set->head == NULL)
{
set->head = node;
set->tail = node;
} else {
set->tail->next = node;
set->tail = node;
}
return node;
}
//Finds a bucket head by key
HashTable::htNodeSet *HashTable::_FindNodeSet(const char *key)
{
uint16_t dv = HashTable::HashString(key);
if (!m_Table[dv])
{
m_Table[dv] = new HashTable::htNodeSet;
memset(m_Table[dv], 0, sizeof(HashTable::htNodeSet));
}
return m_Table[dv];
}
uint16_t HashTable::HashString(const char *str)
{
uint8_t v1 = 0, v2 = 0;
uint16_t dv = 0;
v1 = HashTable::_HashString1(str);
v2 = HashTable::_HashString2(str);
//Combine the two hashes into an 11bit key
dv = ((uint16_t)(v1) << 3) ^ (uint16_t)v2;
dv &= 0x7FF;
return dv;
}
uint8_t HashTable::_HashString1(const char *str)
{
uint8_t v = 0;
while (*str)
v = Hash_CRCTable1[v ^ (uint8_t)(*str++)];
return v;
}
uint8_t HashTable::_HashString2(const char *str)
{
uint8_t v = 0;
while (*str)
v = Hash_CRCTable2[v ^ (uint8_t)(*str++)];
return v;
}
//Contains last two bytes of standard CRC32
const uint8_t Hash_CRCTable1[256] = {
0x00, 0x96, 0x2c, 0xba, 0x19, 0x8f,
0x35, 0xa3, 0x32, 0xa4, 0x1e, 0x88,
0x2b, 0xbd, 0x07, 0x91, 0x64, 0xf2,
0x48, 0xde, 0x7d, 0xeb, 0x51, 0xc7,
0x56, 0xc0, 0x7a, 0xec, 0x4f, 0xd9,
0x63, 0xf5, 0xc8, 0x5e, 0xe4, 0x72,
0xd1, 0x47, 0xfd, 0x6b, 0xfa, 0x6c,
0xd6, 0x40, 0xe3, 0x75, 0xcf, 0x59,
0xac, 0x3a, 0x80, 0x16, 0xb5, 0x23,
0x99, 0x0f, 0x9e, 0x08, 0xb2, 0x24,
0x87, 0x11, 0xab, 0x3d, 0x90, 0x06,
0xbc, 0x2a, 0x89, 0x1f, 0xa5, 0x33,
0xa2, 0x34, 0x8e, 0x18, 0xbb, 0x2d,
0x97, 0x01, 0xf4, 0x62, 0xd8, 0x4e,
0xed, 0x7b, 0xc1, 0x57, 0xc6, 0x50,
0xea, 0x7c, 0xdf, 0x49, 0xf3, 0x65,
0x58, 0xce, 0x74, 0xe2, 0x41, 0xd7,
0x6d, 0xfb, 0x6a, 0xfc, 0x46, 0xd0,
0x73, 0xe5, 0x5f, 0xc9, 0x3c, 0xaa,
0x10, 0x86, 0x25, 0xb3, 0x09, 0x9f,
0x0e, 0x98, 0x22, 0xb4, 0x17, 0x81,
0x3b, 0xad, 0x20, 0xb6, 0x0c, 0x9a,
0x39, 0xaf, 0x15, 0x83, 0x12, 0x84,
0x3e, 0xa8, 0x0b, 0x9d, 0x27, 0xb1,
0x44, 0xd2, 0x68, 0xfe, 0x5d, 0xcb,
0x71, 0xe7, 0x76, 0xe0, 0x5a, 0xcc,
0x6f, 0xf9, 0x43, 0xd5, 0xe8, 0x7e,
0xc4, 0x52, 0xf1, 0x67, 0xdd, 0x4b,
0xda, 0x4c, 0xf6, 0x60, 0xc3, 0x55,
0xef, 0x79, 0x8c, 0x1a, 0xa0, 0x36,
0x95, 0x03, 0xb9, 0x2f, 0xbe, 0x28,
0x92, 0x04, 0xa7, 0x31, 0x8b, 0x1d,
0xb0, 0x26, 0x9c, 0x0a, 0xa9, 0x3f,
0x85, 0x13, 0x82, 0x14, 0xae, 0x38,
0x9b, 0x0d, 0xb7, 0x21, 0xd4, 0x42,
0xf8, 0x6e, 0xcd, 0x5b, 0xe1, 0x77,
0xe6, 0x70, 0xca, 0x5c, 0xff, 0x69,
0xd3, 0x45, 0x78, 0xee, 0x54, 0xc2,
0x61, 0xf7, 0x4d, 0xdb, 0x4a, 0xdc,
0x66, 0xf0, 0x53, 0xc5, 0x7f, 0xe9,
0x1c, 0x8a, 0x30, 0xa6, 0x05, 0x93,
0x29, 0xbf, 0x2e, 0xb8, 0x02, 0x94,
0x37, 0xa1, 0x1b, 0x8d};
//Contains second pair of bytes from standard CRC32
const uint8_t Hash_CRCTable2[256] = {
0x00, 0x07, 0x0e, 0x09, 0x6d, 0x6a,
0x63, 0x64, 0xdb, 0xdc, 0xd5, 0xd2,
0xb6, 0xb1, 0xb8, 0xbf, 0xb7, 0xb0,
0xb9, 0xbe, 0xda, 0xdd, 0xd4, 0xd3,
0x6c, 0x6b, 0x62, 0x65, 0x01, 0x06,
0x0f, 0x08, 0x6e, 0x69, 0x60, 0x67,
0x03, 0x04, 0x0d, 0x0a, 0xb5, 0xb2,
0xbb, 0xbc, 0xd8, 0xdf, 0xd6, 0xd1,
0xd9, 0xde, 0xd7, 0xd0, 0xb4, 0xb3,
0xba, 0xbd, 0x02, 0x05, 0x0c, 0x0b,
0x6f, 0x68, 0x61, 0x66, 0xdc, 0xdb,
0xd2, 0xd5, 0xb1, 0xb6, 0xbf, 0xb8,
0x07, 0x00, 0x09, 0x0e, 0x6a, 0x6d,
0x64, 0x63, 0x6b, 0x6c, 0x65, 0x62,
0x06, 0x01, 0x08, 0x0f, 0xb0, 0xb7,
0xbe, 0xb9, 0xdd, 0xda, 0xd3, 0xd4,
0xb2, 0xb5, 0xbc, 0xbb, 0xdf, 0xd8,
0xd1, 0xd6, 0x69, 0x6e, 0x67, 0x60,
0x04, 0x03, 0x0a, 0x0d, 0x05, 0x02,
0x0b, 0x0c, 0x68, 0x6f, 0x66, 0x61,
0xde, 0xd9, 0xd0, 0xd7, 0xb3, 0xb4,
0xbd, 0xba, 0xb8, 0xbf, 0xb6, 0xb1,
0xd5, 0xd2, 0xdb, 0xdc, 0x63, 0x64,
0x6d, 0x6a, 0x0e, 0x09, 0x00, 0x07,
0x0f, 0x08, 0x01, 0x06, 0x62, 0x65,
0x6c, 0x6b, 0xd4, 0xd3, 0xda, 0xdd,
0xb9, 0xbe, 0xb7, 0xb0, 0xd6, 0xd1,
0xd8, 0xdf, 0xbb, 0xbc, 0xb5, 0xb2,
0x0d, 0x0a, 0x03, 0x04, 0x60, 0x67,
0x6e, 0x69, 0x61, 0x66, 0x6f, 0x68,
0x0c, 0x0b, 0x02, 0x05, 0xba, 0xbd,
0xb4, 0xb3, 0xd7, 0xd0, 0xd9, 0xde,
0x64, 0x63, 0x6a, 0x6d, 0x09, 0x0e,
0x07, 0x00, 0xbf, 0xb8, 0xb1, 0xb6,
0xd2, 0xd5, 0xdc, 0xdb, 0xd3, 0xd4,
0xdd, 0xda, 0xbe, 0xb9, 0xb0, 0xb7,
0x08, 0x0f, 0x06, 0x01, 0x65, 0x62,
0x6b, 0x6c, 0x0a, 0x0d, 0x04, 0x03,
0x67, 0x60, 0x69, 0x6e, 0xd1, 0xd6,
0xdf, 0xd8, 0xbc, 0xbb, 0xb2, 0xb5,
0xbd, 0xba, 0xb3, 0xb4, 0xd0, 0xd7,
0xde, 0xd9, 0x66, 0x61, 0x68, 0x6f,
0x0b, 0x0c, 0x05, 0x02};

92
dlls/nvault/hash.h Executable file
View File

@ -0,0 +1,92 @@
#ifndef _INCLUDE_AMXX_HASH_H
#define _INCLUDE_AMXX_HASH_H
#include <time.h>
#include "sdk/amxxmodule.h"
#include "sdk/CString.h"
#if defined WIN32 || defined _WIN32
typedef unsigned __int8 uint8_t;
typedef __int8 int8_t;
#else
#include <stdint.h>
#endif
/**
* Hash Table implementation (by David "BAILOPAN" Anderson)
* This is not designed to be flexible for size/type, it's hardcoded.
* The table size is 2^11, which should be good enough for fast small lookups.
* A hash is computed by two chopped up 8bit versions of CRC32, which is then combined to
* form an 11bit key. That key is then an index into the appropriate bucket.
*/
extern const uint8_t Hash_CRCTable1[];
extern const uint8_t Hash_CRCTable2[];
//You should not change this without understanding the hash algorithm
#define HT_SIZE 2048
class HashTable
{
public: //STRUCTORS
HashTable();
~HashTable();
public: //PRE-DEF
class iterator;
struct htNode;
private: //PRE-DEF
struct htNodeSet;
public: //PUBLIC FUNCTIONS
void Store(const char *key, const char *value, bool temporary=true);
htNode *Retrieve(const char *key);
iterator Enumerate();
size_t Prune(time_t begin, time_t end, bool all=false);
void Clear();
public: //PUBLIC CLASSES
class iterator
{
public:
iterator(htNodeSet **table, uint32_t tableSize);
const char *key();
const char *val();
time_t stamp();
bool done();
void next();
uint32_t hash();
htNode *operator *();
private:
htNodeSet **t; //table
uint32_t s; //size
uint32_t r; //current
htNode *d; //delta
};
private: //PRIVATE API
void _Insert(const char *key, const char *val, time_t stamp);
htNode *_FindNode(const char *key);
htNodeSet *_FindNodeSet(const char *key);
htNode *_InsertIntoNodeSet(htNodeSet *set, const char *key, bool skip=false);
void _Unlink(htNodeSet *set, htNode *node);
public: //PUBLIC STATIC API
static uint16_t HashString(const char *str);
private: //PRIVATE STATIC API
static uint8_t _HashString1(const char *str);
static uint8_t _HashString2(const char *str);
public: //PUBLIC STRUCTURES
struct htNode
{
String key;
String val;
time_t stamp;
htNode *next;
};
private: //PRIVATE STRUCTURES
struct htNodeSet
{
htNode *head;
htNode *tail;
};
private: //INTERNAL VARIABLES
htNodeSet *m_Table[HT_SIZE];
};
#endif //_INCLUDE_AMXX_HASH_H

21
dlls/nvault/nvault.sln Executable file
View File

@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvault", "nvault.vcproj", "{E2827EDF-F83F-4D54-8FD1-F47BA1E4D328}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{E2827EDF-F83F-4D54-8FD1-F47BA1E4D328}.Debug.ActiveCfg = Debug|Win32
{E2827EDF-F83F-4D54-8FD1-F47BA1E4D328}.Debug.Build.0 = Debug|Win32
{E2827EDF-F83F-4D54-8FD1-F47BA1E4D328}.Release.ActiveCfg = Release|Win32
{E2827EDF-F83F-4D54-8FD1-F47BA1E4D328}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

154
dlls/nvault/nvault.vcproj Executable file
View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="nvault"
ProjectGUID="{E2827EDF-F83F-4D54-8FD1-F47BA1E4D328}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NVAULT_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/nvault.dll"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/nvault.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/nvault.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NVAULT_EXPORTS"
RuntimeLibrary="4"
StructMemberAlignment="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/nvault_amxx.dll"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/nvault.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\hash.cpp">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\hash.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
</Filter>
<Filter
Name="SDK"
Filter="">
<File
RelativePath=".\sdk\amxxmodule.cpp">
</File>
<File
RelativePath=".\sdk\amxxmodule.h">
</File>
<File
RelativePath=".\sdk\CString.h">
</File>
<File
RelativePath=".\sdk\moduleconfig.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

407
dlls/nvault/sdk/CString.h Executable file
View File

@ -0,0 +1,407 @@
/* AMX Mod X
*
* by the AMX Mod X Development Team
* originally developed by OLO
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* 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, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*/
#ifndef _INCLUDE_CSTRING_H
#define _INCLUDE_CSTRING_H
#include <stdio.h>
#include <string.h>
//by David "BAILOPAN" Anderson
class String
{
public:
String()
{
v = NULL;
mSize = 0;
cSize = 0;
Grow(2);
assign("");
}
~String()
{
if (v)
delete [] v;
}
String(const char *src)
{
v = NULL;
mSize = 0;
cSize = 0; assign(src);
}
String(String &src)
{
v = NULL;
mSize = 0;
cSize = 0;
assign(src.c_str());
}
const char *c_str() { return v?v:""; }
const char *c_str() const { return v?v:""; }
void append(const char *t)
{
Grow(cSize + strlen(t) + 1);
strcat(v, t);
cSize = strlen(v);
}
void append(const char c)
{
Grow(cSize + 2);
v[cSize] = c;
v[++cSize] = 0;
}
void append(String &d)
{
const char *t = d.c_str();
Grow(cSize + strlen(t));
strcat(v, t);
cSize = strlen(v);
}
void assign(const String &src)
{
assign(src.c_str());
}
void assign(const char *d)
{
if (!d)
{
Grow(1);
cSize = 0;
strcpy(v, "");
return;
}
Grow(strlen(d));
if (v)
{
strcpy(v, d);
cSize = strlen(v);
} else {
cSize = 0;
}
}
void clear()
{
if (v)
{
v[0] = 0;
cSize = 0;
}
}
int compare (const char *d)
{
if (v) {
if (d) {
return strcmp(v, d);
} else {
return strlen(v);
}
} else {
if (d) {
return strlen(d);
} else {
return 0;
}
}
}
//Added this for amxx inclusion
bool empty()
{
if (!v || !cSize)
return true;
return false;
}
int size()
{
if (!v)
return 0;
return cSize;
}
const char * _fread(FILE *fp)
{
Grow(512);
char * ret = fgets(v, 511, fp);
cSize = strlen(v);
return ret;
}
int find(const char c, int index = 0)
{
if (!v)
return npos;
if (index >= (int)cSize || index < 0)
return npos;
unsigned int i = 0;
for (i=index; i<cSize; i++)
{
if (v[i] == c)
{
return i;
}
}
return npos;
}
bool is_space(int c)
{
if (c == '\f' || c == '\n' ||
c == '\t' || c == '\r' ||
c == '\v' || c == ' ')
{
return true;
}
return false;
}
void trim()
{
if (!v)
return;
unsigned int i = 0;
unsigned int j = 0;
if (cSize == 1)
{
if (is_space(v[i]))
{
clear();
return;
}
}
unsigned char c0 = v[0];
if (is_space(c0))
{
for (i=0; i<cSize; i++)
{
if (!is_space(v[i]) || (is_space(v[i]) && ((unsigned char)i==cSize-1)))
{
erase(0, i);
break;
}
}
}
cSize = strlen(v);
if (cSize < 1)
{
return;
}
if (is_space(v[cSize-1]))
{
for (i=cSize-1; i>=0; i--)
{
if (!is_space(v[i])
|| (is_space(v[i]) && i==0))
{
erase(i+1, j);
break;
}
j++;
}
}
if (cSize == 1)
{
if (is_space(v[0]))
{
clear();
return;
}
}
}
String & erase(unsigned int start, int num = npos)
{
if (!v)
return (*this);
unsigned int i = 0;
//check for bounds
if (num == npos || start+num > cSize-num+1)
num = cSize - start;
//do the erasing
bool copyflag = false;
for (i=0; i<cSize; i++)
{
if (i>=start && i<start+num)
{
if (i+num < cSize)
{
v[i] = v[i+num];
} else {
v[i] = 0;
}
copyflag = true;
} else if (copyflag) {
if (i+num < cSize)
{
v[i] = v[i+num];
} else {
v[i] = 0;
}
}
}
cSize -= num;
v[cSize] = 0;
return (*this);
}
String substr(unsigned int index, int num = npos)
{
String ns;
if (index >= cSize || !v)
return ns;
if (num == npos)
{
num = cSize - index;
} else if (index+num >= cSize) {
num = cSize - index;
}
unsigned int i = 0, j=0;
char *s = new char[cSize+1];
for (i=index; i<index+num; i++)
{
s[j++] = v[i];
}
s[j] = 0;
ns.assign(s);
delete [] s;
return ns;
}
void toLower()
{
if (!v)
return;
unsigned int i = 0;
for (i=0; i<cSize; i++)
{
if (v[i] >= 65 && v[i] <= 90)
v[i] |= 32;
}
}
String & operator = (const String &src)
{
assign(src);
return *this;
}
String & operator = (const char *src)
{
assign(src);
return *this;
}
char operator [] (unsigned int index)
{
if (index > cSize)
{
return -1;
} else {
return v[index];
}
}
int at(int a)
{
if (a < 0 || a >= (int)cSize)
return -1;
return v[a];
}
bool at(int at, char c)
{
if (at < 0 || at >= (int)cSize)
return false;
v[at] = c;
return true;
}
private:
void Grow(unsigned int d)
{
if (d<1)
return;
if (d > mSize)
{
mSize = d + 16; // allocate a buffer
char *t = new char[d+1];
if (v) {
strcpy(t, v);
t[cSize] = 0;
delete [] v;
}
v = t;
mSize = d;
}
}
char *v;
unsigned int mSize;
unsigned int cSize;
public:
static const int npos = -1;
};
#endif //_INCLUDE_CSTRING_H

3042
dlls/nvault/sdk/amxxmodule.cpp Executable file

File diff suppressed because it is too large Load Diff

2197
dlls/nvault/sdk/amxxmodule.h Executable file

File diff suppressed because it is too large Load Diff

462
dlls/nvault/sdk/moduleconfig.h Executable file
View File

@ -0,0 +1,462 @@
// Configuration
#ifndef __MODULECONFIG_H__
#define __MODULECONFIG_H__
// Module info
#define MODULE_NAME "nVault"
#define MODULE_VERSION "1.02"
#define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org/"
#define MODULE_LOGTAG "nVault"
// If you want the module not to be reloaded on mapchange, remove / comment out the next line
#define MODULE_RELOAD_ON_MAPCHANGE
#ifdef __DATE__
#define MODULE_DATE __DATE__
#else // __DATE__
#define MODULE_DATE "Unknown"
#endif // __DATE__
// metamod plugin?
// #define USE_METAMOD
// - AMXX Init functions
// Also consider using FN_META_*
// AMXX query
//#define FN_AMXX_QUERY OnAmxxQuery
// AMXX attach
// Do native functions init here (MF_AddNatives)
// #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX detach
//#define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded
// Do forward functions init here (MF_RegisterForward)
// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
/**** METAMOD ****/
// If your module doesn't use metamod, you may close the file now :)
#ifdef USE_METAMOD
// ----
// Hook Functions
// Uncomment these to be called
// You can also change the function name
// - Metamod init functions
// Also consider using FN_AMXX_*
// Meta query
//#define FN_META_QUERY OnMetaQuery
// Meta attach
//#define FN_META_ATTACH OnMetaAttach
// Meta detach
//#define FN_META_DETACH OnMetaDetach
// (wd) are Will Day's notes
// - GetEntityAPI2 functions
// #define FN_GameDLLInit GameDLLInit /* pfnGameInit() */
// #define FN_DispatchSpawn DispatchSpawn /* pfnSpawn() */
// #define FN_DispatchThink DispatchThink /* pfnThink() */
// #define FN_DispatchUse DispatchUse /* pfnUse() */
// #define FN_DispatchTouch DispatchTouch /* pfnTouch() */
// #define FN_DispatchBlocked DispatchBlocked /* pfnBlocked() */
// #define FN_DispatchKeyValue DispatchKeyValue /* pfnKeyValue() */
// #define FN_DispatchSave DispatchSave /* pfnSave() */
// #define FN_DispatchRestore DispatchRestore /* pfnRestore() */
// #define FN_DispatchObjectCollsionBox DispatchObjectCollsionBox /* pfnSetAbsBox() */
// #define FN_SaveWriteFields SaveWriteFields /* pfnSaveWriteFields() */
// #define FN_SaveReadFields SaveReadFields /* pfnSaveReadFields() */
// #define FN_SaveGlobalState SaveGlobalState /* pfnSaveGlobalState() */
// #define FN_RestoreGlobalState RestoreGlobalState /* pfnRestoreGlobalState() */
// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */
// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */
// #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */
// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */
// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */
// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */
// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */
// #define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */
// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */
// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */
// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */
// #define FN_StartFrame StartFrame /* pfnStartFrame() */
// #define FN_ParmsNewLevel ParmsNewLevel /* pfnParmsNewLevel() */
// #define FN_ParmsChangeLevel ParmsChangeLevel /* pfnParmsChangeLevel() */
// #define FN_GetGameDescription GetGameDescription /* pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2" "Half-Life" */
// #define FN_PlayerCustomization PlayerCustomization /* pfnPlayerCustomization() Notifies .dll of new customization for player. */
// #define FN_SpectatorConnect SpectatorConnect /* pfnSpectatorConnect() Called when spectator joins server */
// #define FN_SpectatorDisconnect SpectatorDisconnect /* pfnSpectatorDisconnect() Called when spectator leaves the server */
// #define FN_SpectatorThink SpectatorThink /* pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) */
// #define FN_Sys_Error Sys_Error /* pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 */
// #define FN_PM_Move PM_Move /* pfnPM_Move() (wd) SDK2 */
// #define FN_PM_Init PM_Init /* pfnPM_Init() Server version of player movement initialization; (wd) SDK2 */
// #define FN_PM_FindTextureType PM_FindTextureType /* pfnPM_FindTextureType() (wd) SDK2 */
// #define FN_SetupVisibility SetupVisibility /* pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 */
// #define FN_UpdateClientData UpdateClientData /* pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 */
// #define FN_AddToFullPack AddToFullPack /* pfnAddToFullPack() (wd) SDK2 */
// #define FN_CreateBaseline CreateBaseline /* pfnCreateBaseline() Tweak entity baseline for network encoding allows setup of player baselines too.; (wd) SDK2 */
// #define FN_RegisterEncoders RegisterEncoders /* pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 */
// #define FN_GetWeaponData GetWeaponData /* pfnGetWeaponData() (wd) SDK2 */
// #define FN_CmdStart CmdStart /* pfnCmdStart() (wd) SDK2 */
// #define FN_CmdEnd CmdEnd /* pfnCmdEnd() (wd) SDK2 */
// #define FN_ConnectionlessPacket ConnectionlessPacket /* pfnConnectionlessPacket() (wd) SDK2 */
// #define FN_GetHullBounds GetHullBounds /* pfnGetHullBounds() (wd) SDK2 */
// #define FN_CreateInstancedBaselines CreateInstancedBaselines /* pfnCreateInstancedBaselines() (wd) SDK2 */
// #define FN_InconsistentFile InconsistentFile /* pfnInconsistentFile() (wd) SDK2 */
// #define FN_AllowLagCompensation AllowLagCompensation /* pfnAllowLagCompensation() (wd) SDK2 */
// - GetEntityAPI2_Post functions
// #define FN_GameDLLInit_Post GameDLLInit_Post
// #define FN_DispatchSpawn_Post DispatchSpawn_Post
// #define FN_DispatchThink_Post DispatchThink_Post
// #define FN_DispatchUse_Post DispatchUse_Post
// #define FN_DispatchTouch_Post DispatchTouch_Post
// #define FN_DispatchBlocked_Post DispatchBlocked_Post
// #define FN_DispatchKeyValue_Post DispatchKeyValue_Post
// #define FN_DispatchSave_Post DispatchSave_Post
// #define FN_DispatchRestore_Post DispatchRestore_Post
// #define FN_DispatchObjectCollsionBox_Post DispatchObjectCollsionBox_Post
// #define FN_SaveWriteFields_Post SaveWriteFields_Post
// #define FN_SaveReadFields_Post SaveReadFields_Post
// #define FN_SaveGlobalState_Post SaveGlobalState_Post
// #define FN_RestoreGlobalState_Post RestoreGlobalState_Post
// #define FN_ResetGlobalState_Post ResetGlobalState_Post
// #define FN_ClientConnect_Post ClientConnect_Post
// #define FN_ClientDisconnect_Post ClientDisconnect_Post
// #define FN_ClientKill_Post ClientKill_Post
// #define FN_ClientPutInServer_Post ClientPutInServer_Post
// #define FN_ClientCommand_Post ClientCommand_Post
// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post
// #define FN_ServerActivate_Post ServerActivate_Post
// #define FN_ServerDeactivate_Post ServerDeactivate_Post
// #define FN_PlayerPreThink_Post PlayerPreThink_Post
// #define FN_PlayerPostThink_Post PlayerPostThink_Post
// #define FN_StartFrame_Post StartFrame_Post
// #define FN_ParmsNewLevel_Post ParmsNewLevel_Post
// #define FN_ParmsChangeLevel_Post ParmsChangeLevel_Post
// #define FN_GetGameDescription_Post GetGameDescription_Post
// #define FN_PlayerCustomization_Post PlayerCustomization_Post
// #define FN_SpectatorConnect_Post SpectatorConnect_Post
// #define FN_SpectatorDisconnect_Post SpectatorDisconnect_Post
// #define FN_SpectatorThink_Post SpectatorThink_Post
// #define FN_Sys_Error_Post Sys_Error_Post
// #define FN_PM_Move_Post PM_Move_Post
// #define FN_PM_Init_Post PM_Init_Post
// #define FN_PM_FindTextureType_Post PM_FindTextureType_Post
// #define FN_SetupVisibility_Post SetupVisibility_Post
// #define FN_UpdateClientData_Post UpdateClientData_Post
// #define FN_AddToFullPack_Post AddToFullPack_Post
// #define FN_CreateBaseline_Post CreateBaseline_Post
// #define FN_RegisterEncoders_Post RegisterEncoders_Post
// #define FN_GetWeaponData_Post GetWeaponData_Post
// #define FN_CmdStart_Post CmdStart_Post
// #define FN_CmdEnd_Post CmdEnd_Post
// #define FN_ConnectionlessPacket_Post ConnectionlessPacket_Post
// #define FN_GetHullBounds_Post GetHullBounds_Post
// #define FN_CreateInstancedBaselines_Post CreateInstancedBaselines_Post
// #define FN_InconsistentFile_Post InconsistentFile_Post
// #define FN_AllowLagCompensation_Post AllowLagCompensation_Post
// - GetEngineAPI functions
// #define FN_PrecacheModel PrecacheModel
// #define FN_PrecacheSound PrecacheSound
// #define FN_SetModel SetModel
// #define FN_ModelIndex ModelIndex
// #define FN_ModelFrames ModelFrames
// #define FN_SetSize SetSize
// #define FN_ChangeLevel ChangeLevel
// #define FN_GetSpawnParms GetSpawnParms
// #define FN_SaveSpawnParms SaveSpawnParms
// #define FN_VecToYaw VecToYaw
// #define FN_VecToAngles VecToAngles
// #define FN_MoveToOrigin MoveToOrigin
// #define FN_ChangeYaw ChangeYaw
// #define FN_ChangePitch ChangePitch
// #define FN_FindEntityByString FindEntityByString
// #define FN_GetEntityIllum GetEntityIllum
// #define FN_FindEntityInSphere FindEntityInSphere
// #define FN_FindClientInPVS FindClientInPVS
// #define FN_EntitiesInPVS EntitiesInPVS
// #define FN_MakeVectors MakeVectors
// #define FN_AngleVectors AngleVectors
// #define FN_CreateEntity CreateEntity
// #define FN_RemoveEntity RemoveEntity
// #define FN_CreateNamedEntity CreateNamedEntity
// #define FN_MakeStatic MakeStatic
// #define FN_EntIsOnFloor EntIsOnFloor
// #define FN_DropToFloor DropToFloor
// #define FN_WalkMove WalkMove
// #define FN_SetOrigin SetOrigin
// #define FN_EmitSound EmitSound
// #define FN_EmitAmbientSound EmitAmbientSound
// #define FN_TraceLine TraceLine
// #define FN_TraceToss TraceToss
// #define FN_TraceMonsterHull TraceMonsterHull
// #define FN_TraceHull TraceHull
// #define FN_TraceModel TraceModel
// #define FN_TraceTexture TraceTexture
// #define FN_TraceSphere TraceSphere
// #define FN_GetAimVector GetAimVector
// #define FN_ServerCommand ServerCommand
// #define FN_ServerExecute ServerExecute
// #define FN_engClientCommand engClientCommand
// #define FN_ParticleEffect ParticleEffect
// #define FN_LightStyle LightStyle
// #define FN_DecalIndex DecalIndex
// #define FN_PointContents PointContents
// #define FN_MessageBegin MessageBegin
// #define FN_MessageEnd MessageEnd
// #define FN_WriteByte WriteByte
// #define FN_WriteChar WriteChar
// #define FN_WriteShort WriteShort
// #define FN_WriteLong WriteLong
// #define FN_WriteAngle WriteAngle
// #define FN_WriteCoord WriteCoord
// #define FN_WriteString WriteString
// #define FN_WriteEntity WriteEntity
// #define FN_CVarRegister CVarRegister
// #define FN_CVarGetFloat CVarGetFloat
// #define FN_CVarGetString CVarGetString
// #define FN_CVarSetFloat CVarSetFloat
// #define FN_CVarSetString CVarSetString
// #define FN_AlertMessage AlertMessage
// #define FN_EngineFprintf EngineFprintf
// #define FN_PvAllocEntPrivateData PvAllocEntPrivateData
// #define FN_PvEntPrivateData PvEntPrivateData
// #define FN_FreeEntPrivateData FreeEntPrivateData
// #define FN_SzFromIndex SzFromIndex
// #define FN_AllocString AllocString
// #define FN_GetVarsOfEnt GetVarsOfEnt
// #define FN_PEntityOfEntOffset PEntityOfEntOffset
// #define FN_EntOffsetOfPEntity EntOffsetOfPEntity
// #define FN_IndexOfEdict IndexOfEdict
// #define FN_PEntityOfEntIndex PEntityOfEntIndex
// #define FN_FindEntityByVars FindEntityByVars
// #define FN_GetModelPtr GetModelPtr
// #define FN_RegUserMsg RegUserMsg
// #define FN_AnimationAutomove AnimationAutomove
// #define FN_GetBonePosition GetBonePosition
// #define FN_FunctionFromName FunctionFromName
// #define FN_NameForFunction NameForFunction
// #define FN_ClientPrintf ClientPrintf
// #define FN_ServerPrint ServerPrint
// #define FN_Cmd_Args Cmd_Args
// #define FN_Cmd_Argv Cmd_Argv
// #define FN_Cmd_Argc Cmd_Argc
// #define FN_GetAttachment GetAttachment
// #define FN_CRC32_Init CRC32_Init
// #define FN_CRC32_ProcessBuffer CRC32_ProcessBuffer
// #define FN_CRC32_ProcessByte CRC32_ProcessByte
// #define FN_CRC32_Final CRC32_Final
// #define FN_RandomLong RandomLong
// #define FN_RandomFloat RandomFloat
// #define FN_SetView SetView
// #define FN_Time Time
// #define FN_CrosshairAngle CrosshairAngle
// #define FN_LoadFileForMe LoadFileForMe
// #define FN_FreeFile FreeFile
// #define FN_EndSection EndSection
// #define FN_CompareFileTime CompareFileTime
// #define FN_GetGameDir GetGameDir
// #define FN_Cvar_RegisterVariable Cvar_RegisterVariable
// #define FN_FadeClientVolume FadeClientVolume
// #define FN_SetClientMaxspeed SetClientMaxspeed
// #define FN_CreateFakeClient CreateFakeClient
// #define FN_RunPlayerMove RunPlayerMove
// #define FN_NumberOfEntities NumberOfEntities
// #define FN_GetInfoKeyBuffer GetInfoKeyBuffer
// #define FN_InfoKeyValue InfoKeyValue
// #define FN_SetKeyValue SetKeyValue
// #define FN_SetClientKeyValue SetClientKeyValue
// #define FN_IsMapValid IsMapValid
// #define FN_StaticDecal StaticDecal
// #define FN_PrecacheGeneric PrecacheGeneric
// #define FN_GetPlayerUserId GetPlayerUserId
// #define FN_BuildSoundMsg BuildSoundMsg
// #define FN_IsDedicatedServer IsDedicatedServer
// #define FN_CVarGetPointer CVarGetPointer
// #define FN_GetPlayerWONId GetPlayerWONId
// #define FN_Info_RemoveKey Info_RemoveKey
// #define FN_GetPhysicsKeyValue GetPhysicsKeyValue
// #define FN_SetPhysicsKeyValue SetPhysicsKeyValue
// #define FN_GetPhysicsInfoString GetPhysicsInfoString
// #define FN_PrecacheEvent PrecacheEvent
// #define FN_PlaybackEvent PlaybackEvent
// #define FN_SetFatPVS SetFatPVS
// #define FN_SetFatPAS SetFatPAS
// #define FN_CheckVisibility CheckVisibility
// #define FN_DeltaSetField DeltaSetField
// #define FN_DeltaUnsetField DeltaUnsetField
// #define FN_DeltaAddEncoder DeltaAddEncoder
// #define FN_GetCurrentPlayer GetCurrentPlayer
// #define FN_CanSkipPlayer CanSkipPlayer
// #define FN_DeltaFindField DeltaFindField
// #define FN_DeltaSetFieldByIndex DeltaSetFieldByIndex
// #define FN_DeltaUnsetFieldByIndex DeltaUnsetFieldByIndex
// #define FN_SetGroupMask SetGroupMask
// #define FN_engCreateInstancedBaseline engCreateInstancedBaseline
// #define FN_Cvar_DirectSet Cvar_DirectSet
// #define FN_ForceUnmodified ForceUnmodified
// #define FN_GetPlayerStats GetPlayerStats
// #define FN_AddServerCommand AddServerCommand
// #define FN_Voice_GetClientListening Voice_GetClientListening
// #define FN_Voice_SetClientListening Voice_SetClientListening
// #define FN_GetPlayerAuthId GetPlayerAuthId
// - GetEngineAPI_Post functions
// #define FN_PrecacheModel_Post PrecacheModel_Post
// #define FN_PrecacheSound_Post PrecacheSound_Post
// #define FN_SetModel_Post SetModel_Post
// #define FN_ModelIndex_Post ModelIndex_Post
// #define FN_ModelFrames_Post ModelFrames_Post
// #define FN_SetSize_Post SetSize_Post
// #define FN_ChangeLevel_Post ChangeLevel_Post
// #define FN_GetSpawnParms_Post GetSpawnParms_Post
// #define FN_SaveSpawnParms_Post SaveSpawnParms_Post
// #define FN_VecToYaw_Post VecToYaw_Post
// #define FN_VecToAngles_Post VecToAngles_Post
// #define FN_MoveToOrigin_Post MoveToOrigin_Post
// #define FN_ChangeYaw_Post ChangeYaw_Post
// #define FN_ChangePitch_Post ChangePitch_Post
// #define FN_FindEntityByString_Post FindEntityByString_Post
// #define FN_GetEntityIllum_Post GetEntityIllum_Post
// #define FN_FindEntityInSphere_Post FindEntityInSphere_Post
// #define FN_FindClientInPVS_Post FindClientInPVS_Post
// #define FN_EntitiesInPVS_Post EntitiesInPVS_Post
// #define FN_MakeVectors_Post MakeVectors_Post
// #define FN_AngleVectors_Post AngleVectors_Post
// #define FN_CreateEntity_Post CreateEntity_Post
// #define FN_RemoveEntity_Post RemoveEntity_Post
// #define FN_CreateNamedEntity_Post CreateNamedEntity_Post
// #define FN_MakeStatic_Post MakeStatic_Post
// #define FN_EntIsOnFloor_Post EntIsOnFloor_Post
// #define FN_DropToFloor_Post DropToFloor_Post
// #define FN_WalkMove_Post WalkMove_Post
// #define FN_SetOrigin_Post SetOrigin_Post
// #define FN_EmitSound_Post EmitSound_Post
// #define FN_EmitAmbientSound_Post EmitAmbientSound_Post
// #define FN_TraceLine_Post TraceLine_Post
// #define FN_TraceToss_Post TraceToss_Post
// #define FN_TraceMonsterHull_Post TraceMonsterHull_Post
// #define FN_TraceHull_Post TraceHull_Post
// #define FN_TraceModel_Post TraceModel_Post
// #define FN_TraceTexture_Post TraceTexture_Post
// #define FN_TraceSphere_Post TraceSphere_Post
// #define FN_GetAimVector_Post GetAimVector_Post
// #define FN_ServerCommand_Post ServerCommand_Post
// #define FN_ServerExecute_Post ServerExecute_Post
// #define FN_engClientCommand_Post engClientCommand_Post
// #define FN_ParticleEffect_Post ParticleEffect_Post
// #define FN_LightStyle_Post LightStyle_Post
// #define FN_DecalIndex_Post DecalIndex_Post
// #define FN_PointContents_Post PointContents_Post
// #define FN_MessageBegin_Post MessageBegin_Post
// #define FN_MessageEnd_Post MessageEnd_Post
// #define FN_WriteByte_Post WriteByte_Post
// #define FN_WriteChar_Post WriteChar_Post
// #define FN_WriteShort_Post WriteShort_Post
// #define FN_WriteLong_Post WriteLong_Post
// #define FN_WriteAngle_Post WriteAngle_Post
// #define FN_WriteCoord_Post WriteCoord_Post
// #define FN_WriteString_Post WriteString_Post
// #define FN_WriteEntity_Post WriteEntity_Post
// #define FN_CVarRegister_Post CVarRegister_Post
// #define FN_CVarGetFloat_Post CVarGetFloat_Post
// #define FN_CVarGetString_Post CVarGetString_Post
// #define FN_CVarSetFloat_Post CVarSetFloat_Post
// #define FN_CVarSetString_Post CVarSetString_Post
// #define FN_AlertMessage_Post AlertMessage_Post
// #define FN_EngineFprintf_Post EngineFprintf_Post
// #define FN_PvAllocEntPrivateData_Post PvAllocEntPrivateData_Post
// #define FN_PvEntPrivateData_Post PvEntPrivateData_Post
// #define FN_FreeEntPrivateData_Post FreeEntPrivateData_Post
// #define FN_SzFromIndex_Post SzFromIndex_Post
// #define FN_AllocString_Post AllocString_Post
// #define FN_GetVarsOfEnt_Post GetVarsOfEnt_Post
// #define FN_PEntityOfEntOffset_Post PEntityOfEntOffset_Post
// #define FN_EntOffsetOfPEntity_Post EntOffsetOfPEntity_Post
// #define FN_IndexOfEdict_Post IndexOfEdict_Post
// #define FN_PEntityOfEntIndex_Post PEntityOfEntIndex_Post
// #define FN_FindEntityByVars_Post FindEntityByVars_Post
// #define FN_GetModelPtr_Post GetModelPtr_Post
// #define FN_RegUserMsg_Post RegUserMsg_Post
// #define FN_AnimationAutomove_Post AnimationAutomove_Post
// #define FN_GetBonePosition_Post GetBonePosition_Post
// #define FN_FunctionFromName_Post FunctionFromName_Post
// #define FN_NameForFunction_Post NameForFunction_Post
// #define FN_ClientPrintf_Post ClientPrintf_Post
// #define FN_ServerPrint_Post ServerPrint_Post
// #define FN_Cmd_Args_Post Cmd_Args_Post
// #define FN_Cmd_Argv_Post Cmd_Argv_Post
// #define FN_Cmd_Argc_Post Cmd_Argc_Post
// #define FN_GetAttachment_Post GetAttachment_Post
// #define FN_CRC32_Init_Post CRC32_Init_Post
// #define FN_CRC32_ProcessBuffer_Post CRC32_ProcessBuffer_Post
// #define FN_CRC32_ProcessByte_Post CRC32_ProcessByte_Post
// #define FN_CRC32_Final_Post CRC32_Final_Post
// #define FN_RandomLong_Post RandomLong_Post
// #define FN_RandomFloat_Post RandomFloat_Post
// #define FN_SetView_Post SetView_Post
// #define FN_Time_Post Time_Post
// #define FN_CrosshairAngle_Post CrosshairAngle_Post
// #define FN_LoadFileForMe_Post LoadFileForMe_Post
// #define FN_FreeFile_Post FreeFile_Post
// #define FN_EndSection_Post EndSection_Post
// #define FN_CompareFileTime_Post CompareFileTime_Post
// #define FN_GetGameDir_Post GetGameDir_Post
// #define FN_Cvar_RegisterVariable_Post Cvar_RegisterVariable_Post
// #define FN_FadeClientVolume_Post FadeClientVolume_Post
// #define FN_SetClientMaxspeed_Post SetClientMaxspeed_Post
// #define FN_CreateFakeClient_Post CreateFakeClient_Post
// #define FN_RunPlayerMove_Post RunPlayerMove_Post
// #define FN_NumberOfEntities_Post NumberOfEntities_Post
// #define FN_GetInfoKeyBuffer_Post GetInfoKeyBuffer_Post
// #define FN_InfoKeyValue_Post InfoKeyValue_Post
// #define FN_SetKeyValue_Post SetKeyValue_Post
// #define FN_SetClientKeyValue_Post SetClientKeyValue_Post
// #define FN_IsMapValid_Post IsMapValid_Post
// #define FN_StaticDecal_Post StaticDecal_Post
// #define FN_PrecacheGeneric_Post PrecacheGeneric_Post
// #define FN_GetPlayerUserId_Post GetPlayerUserId_Post
// #define FN_BuildSoundMsg_Post BuildSoundMsg_Post
// #define FN_IsDedicatedServer_Post IsDedicatedServer_Post
// #define FN_CVarGetPointer_Post CVarGetPointer_Post
// #define FN_GetPlayerWONId_Post GetPlayerWONId_Post
// #define FN_Info_RemoveKey_Post Info_RemoveKey_Post
// #define FN_GetPhysicsKeyValue_Post GetPhysicsKeyValue_Post
// #define FN_SetPhysicsKeyValue_Post SetPhysicsKeyValue_Post
// #define FN_GetPhysicsInfoString_Post GetPhysicsInfoString_Post
// #define FN_PrecacheEvent_Post PrecacheEvent_Post
// #define FN_PlaybackEvent_Post PlaybackEvent_Post
// #define FN_SetFatPVS_Post SetFatPVS_Post
// #define FN_SetFatPAS_Post SetFatPAS_Post
// #define FN_CheckVisibility_Post CheckVisibility_Post
// #define FN_DeltaSetField_Post DeltaSetField_Post
// #define FN_DeltaUnsetField_Post DeltaUnsetField_Post
// #define FN_DeltaAddEncoder_Post DeltaAddEncoder_Post
// #define FN_GetCurrentPlayer_Post GetCurrentPlayer_Post
// #define FN_CanSkipPlayer_Post CanSkipPlayer_Post
// #define FN_DeltaFindField_Post DeltaFindField_Post
// #define FN_DeltaSetFieldByIndex_Post DeltaSetFieldByIndex_Post
// #define FN_DeltaUnsetFieldByIndex_Post DeltaUnsetFieldByIndex_Post
// #define FN_SetGroupMask_Post SetGroupMask_Post
// #define FN_engCreateInstancedBaseline_Post engCreateInstancedBaseline_Post
// #define FN_Cvar_DirectSet_Post Cvar_DirectSet_Post
// #define FN_ForceUnmodified_Post ForceUnmodified_Post
// #define FN_GetPlayerStats_Post GetPlayerStats_Post
// #define FN_AddServerCommand_Post AddServerCommand_Post
// #define FN_Voice_GetClientListening_Post Voice_GetClientListening_Post
// #define FN_Voice_SetClientListening_Post Voice_SetClientListening_Post
// #define FN_GetPlayerAuthId_Post GetPlayerAuthId_Post
// #define FN_OnFreeEntPrivateData OnFreeEntPrivateData
// #define FN_GameShutdown GameShutdown
// #define FN_ShouldCollide ShouldCollide
// #define FN_OnFreeEntPrivateData_Post OnFreeEntPrivateData_Post
// #define FN_GameShutdown_Post GameShutdown_Post
// #define FN_ShouldCollide_Post ShouldCollide_Post
#endif // USE_METAMOD
#endif // __MODULECONFIG_H__