core/HalfLife2.h
changeset 592 c2a2c38f1331
child 677 e2ae32d5132c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/core/HalfLife2.h	Sat Mar 10 21:26:04 2007 +0000
     1.3 @@ -0,0 +1,52 @@
     1.4 +/**
     1.5 + * vim: set ts=4 :
     1.6 + * ===============================================================
     1.7 + * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     1.8 + * ===============================================================
     1.9 + *
    1.10 + * This file is not open source and may not be copied without explicit
    1.11 + * written permission of AlliedModders LLC.  This file may not be redistributed 
    1.12 + * in whole or significant part.
    1.13 + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    1.14 + *
    1.15 + * Version: $Id$
    1.16 + */
    1.17 +
    1.18 +#ifndef _INCLUDE_SOURCEMOD_CHALFLIFE2_H_
    1.19 +#define _INCLUDE_SOURCEMOD_CHALFLIFE2_H_
    1.20 +
    1.21 +#include <sh_list.h>
    1.22 +#include "sm_trie.h"
    1.23 +#include "sm_globals.h"
    1.24 +#include "dt_send.h"
    1.25 +#include "server_class.h"
    1.26 +
    1.27 +using namespace SourceHook;
    1.28 +
    1.29 +struct DataTableInfo
    1.30 +{
    1.31 +	ServerClass *sc;
    1.32 +	Trie *lookup;
    1.33 +};
    1.34 +
    1.35 +class CHalfLife2
    1.36 +{
    1.37 +public:
    1.38 +	CHalfLife2();
    1.39 +	~CHalfLife2();
    1.40 +public:
    1.41 +	/*void OnSourceModStartup(bool late);
    1.42 +	void OnSourceModAllShutdown();*/
    1.43 +public:
    1.44 +	SendProp *FindInSendTable(const char *classname, const char *offset);
    1.45 +	ServerClass *FindServerClass(const char *classname);
    1.46 +private:
    1.47 +	DataTableInfo *_FindServerClass(const char *classname);
    1.48 +private:
    1.49 +	Trie *m_pClasses;
    1.50 +	List<DataTableInfo *> m_Tables;
    1.51 +};
    1.52 +
    1.53 +extern CHalfLife2 g_HL2;
    1.54 +
    1.55 +#endif //_INCLUDE_SOURCEMOD_CHALFLIFE2_H_