Merge of rewritten NS module into trunk
This commit is contained in:
88
dlls/ns/ns.h
88
dlls/ns/ns.h
@@ -1,14 +1,46 @@
|
||||
/* AMX Mod X
|
||||
* Natural Selection Module
|
||||
*
|
||||
* by the AMX Mod X Development Team
|
||||
*
|
||||
* This file is part of AMX Mod X.
|
||||
*
|
||||
*
|
||||
* 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 NS_H
|
||||
#define NS_H
|
||||
|
||||
|
||||
#include <extdll.h>
|
||||
#include <string.h>
|
||||
#include "amxxmodule.h"
|
||||
#include "ns_const.h"
|
||||
#include "CPlayer.h"
|
||||
#include "CSpawn.h"
|
||||
#include "utilfunctions.h"
|
||||
|
||||
#if defined CRAZY_OPTS
|
||||
#define EXTERN_VIS __attribute__((externally_visible))
|
||||
#else
|
||||
#define EXTERN_VIS
|
||||
#endif
|
||||
|
||||
extern DLL_FUNCTIONS *g_pFunctionTable;
|
||||
extern DLL_FUNCTIONS *g_pFunctionTable_Post;
|
||||
@@ -18,28 +50,44 @@ extern NEW_DLL_FUNCTIONS *g_pNewFunctionsTable;
|
||||
extern NEW_DLL_FUNCTIONS *g_pNewFunctionsTable_Post;
|
||||
|
||||
|
||||
extern CSpawn ns_spawnpoints;
|
||||
|
||||
|
||||
extern BOOL iscombat;
|
||||
extern CPlayer g_player[33];
|
||||
extern class CPlayer g_player[33];
|
||||
extern edict_t *player_edicts[33]; // Stupid INDEXENT() bug.
|
||||
|
||||
extern int gmsgHudText2;
|
||||
|
||||
|
||||
extern AMX_NATIVE_INFO ns_misc_natives[];
|
||||
extern AMX_NATIVE_INFO ns_pdata_natives[];
|
||||
|
||||
extern int SpawnForward;
|
||||
extern int TeamForward;
|
||||
|
||||
extern int ChangeclassForward;
|
||||
extern int BuiltForward;
|
||||
void PlayerPreThink(edict_t *pEntity);
|
||||
void PlayerPreThink_Post(edict_t *pEntity);
|
||||
void PlayerPostThink_Post(edict_t *pEntity);
|
||||
void UpdateClientData( const struct edict_s *ent, int sendweapons, struct clientdata_s *cd );
|
||||
void StartFrame(void);
|
||||
edict_t* CreateNamedEntity_Post(int className);
|
||||
void AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
typedef struct tagAMX_HEADER {
|
||||
int32_t size PACKED; /* size of the "file" */
|
||||
uint16_t magic PACKED; /* signature */
|
||||
char file_version; /* file format version */
|
||||
char amx_version; /* required version of the AMX */
|
||||
int16_t flags PACKED;
|
||||
int16_t defsize PACKED; /* size of a definition record */
|
||||
int32_t cod PACKED; /* initial value of COD - code block */
|
||||
int32_t dat PACKED; /* initial value of DAT - data block */
|
||||
int32_t hea PACKED; /* initial value of HEA - start of the heap */
|
||||
int32_t stp PACKED; /* initial value of STP - stack top */
|
||||
int32_t cip PACKED; /* initial value of CIP - the instruction pointer */
|
||||
int32_t publics PACKED; /* offset to the "public functions" table */
|
||||
int32_t natives PACKED; /* offset to the "native functions" table */
|
||||
int32_t libraries PACKED; /* offset to the table of libraries */
|
||||
int32_t pubvars PACKED; /* the "public variables" table */
|
||||
int32_t tags PACKED; /* the "public tagnames" table */
|
||||
int32_t nametable PACKED; /* name table */
|
||||
} PACKED AMX_HEADER;
|
||||
|
||||
// Don't enable this, it just adds some offset finding natives
|
||||
#define DEVELOPER_BUILD
|
||||
|
||||
|
||||
#endif // NS_H
|
||||
|
||||
Reference in New Issue
Block a user