Fix windows compilation.
This commit is contained in:
@@ -1,201 +1,201 @@
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// S c r i p t e d S e q u e n c e s
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef _INCLUDE_SEQUENCE_H_
|
||||
#define _INCLUDE_SEQUENCE_H_
|
||||
|
||||
|
||||
#ifndef _DEF_BYTE_
|
||||
typedef unsigned char byte;
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// client_textmessage_t
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct client_textmessage_s
|
||||
{
|
||||
int effect;
|
||||
byte r1, g1, b1, a1; // 2 colors for effects
|
||||
byte r2, g2, b2, a2;
|
||||
float x;
|
||||
float y;
|
||||
float fadein;
|
||||
float fadeout;
|
||||
float holdtime;
|
||||
float fxtime;
|
||||
const char *pName;
|
||||
const char *pMessage;
|
||||
} client_textmessage_t;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// sequenceDefaultBits_e
|
||||
//
|
||||
// Enumerated list of possible modifiers for a command. This enumeration
|
||||
// is used in a bitarray controlling what modifiers are specified for a command.
|
||||
//---------------------------------------------------------------------------
|
||||
enum sequenceModifierBits
|
||||
{
|
||||
SEQUENCE_MODIFIER_EFFECT_BIT = (1 << 1),
|
||||
SEQUENCE_MODIFIER_POSITION_BIT = (1 << 2),
|
||||
SEQUENCE_MODIFIER_COLOR_BIT = (1 << 3),
|
||||
SEQUENCE_MODIFIER_COLOR2_BIT = (1 << 4),
|
||||
SEQUENCE_MODIFIER_FADEIN_BIT = (1 << 5),
|
||||
SEQUENCE_MODIFIER_FADEOUT_BIT = (1 << 6),
|
||||
SEQUENCE_MODIFIER_HOLDTIME_BIT = (1 << 7),
|
||||
SEQUENCE_MODIFIER_FXTIME_BIT = (1 << 8),
|
||||
SEQUENCE_MODIFIER_SPEAKER_BIT = (1 << 9),
|
||||
SEQUENCE_MODIFIER_LISTENER_BIT = (1 << 10),
|
||||
SEQUENCE_MODIFIER_TEXTCHANNEL_BIT = (1 << 11),
|
||||
};
|
||||
typedef enum sequenceModifierBits sequenceModifierBits_e ;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandEnum_e
|
||||
//
|
||||
// Enumerated sequence command types.
|
||||
//---------------------------------------------------------------------------
|
||||
enum sequenceCommandEnum_
|
||||
{
|
||||
SEQUENCE_COMMAND_ERROR = -1,
|
||||
SEQUENCE_COMMAND_PAUSE = 0,
|
||||
SEQUENCE_COMMAND_FIRETARGETS,
|
||||
SEQUENCE_COMMAND_KILLTARGETS,
|
||||
SEQUENCE_COMMAND_TEXT,
|
||||
SEQUENCE_COMMAND_SOUND,
|
||||
SEQUENCE_COMMAND_GOSUB,
|
||||
SEQUENCE_COMMAND_SENTENCE,
|
||||
SEQUENCE_COMMAND_REPEAT,
|
||||
SEQUENCE_COMMAND_SETDEFAULTS,
|
||||
SEQUENCE_COMMAND_MODIFIER,
|
||||
SEQUENCE_COMMAND_POSTMODIFIER,
|
||||
SEQUENCE_COMMAND_NOOP,
|
||||
|
||||
SEQUENCE_MODIFIER_EFFECT,
|
||||
SEQUENCE_MODIFIER_POSITION,
|
||||
SEQUENCE_MODIFIER_COLOR,
|
||||
SEQUENCE_MODIFIER_COLOR2,
|
||||
SEQUENCE_MODIFIER_FADEIN,
|
||||
SEQUENCE_MODIFIER_FADEOUT,
|
||||
SEQUENCE_MODIFIER_HOLDTIME,
|
||||
SEQUENCE_MODIFIER_FXTIME,
|
||||
SEQUENCE_MODIFIER_SPEAKER,
|
||||
SEQUENCE_MODIFIER_LISTENER,
|
||||
SEQUENCE_MODIFIER_TEXTCHANNEL,
|
||||
};
|
||||
typedef enum sequenceCommandEnum_ sequenceCommandEnum_e;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandType_e
|
||||
//
|
||||
// Typeerated sequence command types.
|
||||
//---------------------------------------------------------------------------
|
||||
enum sequenceCommandType_
|
||||
{
|
||||
SEQUENCE_TYPE_COMMAND,
|
||||
SEQUENCE_TYPE_MODIFIER,
|
||||
};
|
||||
typedef enum sequenceCommandType_ sequenceCommandType_e;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandMapping_s
|
||||
//
|
||||
// A mapping of a command enumerated-value to its name.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sequenceCommandMapping_ sequenceCommandMapping_s;
|
||||
struct sequenceCommandMapping_
|
||||
{
|
||||
sequenceCommandEnum_e commandEnum;
|
||||
const char* commandName;
|
||||
sequenceCommandType_e commandType;
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandLine_s
|
||||
//
|
||||
// Structure representing a single command (usually 1 line) from a
|
||||
// .SEQ file entry.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sequenceCommandLine_ sequenceCommandLine_s;
|
||||
struct sequenceCommandLine_
|
||||
{
|
||||
int commandType; // Specifies the type of command
|
||||
client_textmessage_t clientMessage; // Text HUD message struct
|
||||
char* speakerName; // Targetname of speaking entity
|
||||
char* listenerName; // Targetname of entity being spoken to
|
||||
char* soundFileName; // Name of sound file to play
|
||||
char* sentenceName; // Name of sentences.txt to play
|
||||
char* fireTargetNames; // List of targetnames to fire
|
||||
char* killTargetNames; // List of targetnames to remove
|
||||
float delay; // Seconds 'till next command
|
||||
int repeatCount; // If nonzero, reset execution pointer to top of block (N times, -1 = infinite)
|
||||
int textChannel; // Display channel on which text message is sent
|
||||
int modifierBitField; // Bit field to specify what clientmessage fields are valid
|
||||
sequenceCommandLine_s* nextCommandLine; // Next command (linked list)
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceEntry_s
|
||||
//
|
||||
// Structure representing a single command (usually 1 line) from a
|
||||
// .SEQ file entry.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sequenceEntry_ sequenceEntry_s;
|
||||
struct sequenceEntry_
|
||||
{
|
||||
char* fileName; // Name of sequence file without .SEQ extension
|
||||
char* entryName; // Name of entry label in file
|
||||
sequenceCommandLine_s* firstCommand; // Linked list of commands in entry
|
||||
sequenceEntry_s* nextEntry; // Next loaded entry
|
||||
qboolean isGlobal; // Is entry retained over level transitions?
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sentenceEntry_s
|
||||
// Structure representing a single sentence of a group from a .SEQ
|
||||
// file entry. Sentences are identical to entries in sentences.txt, but
|
||||
// can be unique per level and are loaded/unloaded with the level.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sentenceEntry_ sentenceEntry_s;
|
||||
struct sentenceEntry_
|
||||
{
|
||||
char* data; // sentence data (ie "We have hostiles" )
|
||||
sentenceEntry_s* nextEntry; // Next loaded entry
|
||||
qboolean isGlobal; // Is entry retained over level transitions?
|
||||
unsigned int index; // this entry's position in the file.
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// sentenceGroupEntry_s
|
||||
// Structure representing a group of sentences found in a .SEQ file.
|
||||
// A sentence group is defined by all sentences with the same name, ignoring
|
||||
// the number at the end of the sentence name. Groups enable a sentence
|
||||
// to be picked at random across a group.
|
||||
//--------------------------------------------------------------------------
|
||||
typedef struct sentenceGroupEntry_ sentenceGroupEntry_s;
|
||||
struct sentenceGroupEntry_
|
||||
{
|
||||
char* groupName; // name of the group (ie CT_ALERT )
|
||||
unsigned int numSentences; // number of sentences in group
|
||||
sentenceEntry_s* firstSentence; // head of linked list of sentences in group
|
||||
sentenceGroupEntry_s* nextEntry; // next loaded group
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
//---------------------------------------------------------------------------
|
||||
sequenceEntry_s* SequenceGet( const char* fileName, const char* entryName );
|
||||
void Sequence_ParseFile( const char* fileName, qboolean isGlobal );
|
||||
void Sequence_OnLevelLoad( const char* mapName );
|
||||
sentenceEntry_s* SequencePickSentence( const char *groupName, int pickMethod, int *picked );
|
||||
|
||||
#endif /* _INCLUDE_SEQUENCE_H_ */
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// S c r i p t e d S e q u e n c e s
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef _INCLUDE_SEQUENCE_H_
|
||||
#define _INCLUDE_SEQUENCE_H_
|
||||
|
||||
|
||||
#ifndef _DEF_BYTE_
|
||||
typedef unsigned char byte;
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// client_textmessage_t
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct client_textmessage_s
|
||||
{
|
||||
int effect;
|
||||
byte r1, g1, b1, a1; // 2 colors for effects
|
||||
byte r2, g2, b2, a2;
|
||||
float x;
|
||||
float y;
|
||||
float fadein;
|
||||
float fadeout;
|
||||
float holdtime;
|
||||
float fxtime;
|
||||
const char *pName;
|
||||
const char *pMessage;
|
||||
} client_textmessage_t;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// sequenceDefaultBits_e
|
||||
//
|
||||
// Enumerated list of possible modifiers for a command. This enumeration
|
||||
// is used in a bitarray controlling what modifiers are specified for a command.
|
||||
//---------------------------------------------------------------------------
|
||||
enum sequenceModifierBits
|
||||
{
|
||||
SEQUENCE_MODIFIER_EFFECT_BIT = (1 << 1),
|
||||
SEQUENCE_MODIFIER_POSITION_BIT = (1 << 2),
|
||||
SEQUENCE_MODIFIER_COLOR_BIT = (1 << 3),
|
||||
SEQUENCE_MODIFIER_COLOR2_BIT = (1 << 4),
|
||||
SEQUENCE_MODIFIER_FADEIN_BIT = (1 << 5),
|
||||
SEQUENCE_MODIFIER_FADEOUT_BIT = (1 << 6),
|
||||
SEQUENCE_MODIFIER_HOLDTIME_BIT = (1 << 7),
|
||||
SEQUENCE_MODIFIER_FXTIME_BIT = (1 << 8),
|
||||
SEQUENCE_MODIFIER_SPEAKER_BIT = (1 << 9),
|
||||
SEQUENCE_MODIFIER_LISTENER_BIT = (1 << 10),
|
||||
SEQUENCE_MODIFIER_TEXTCHANNEL_BIT = (1 << 11),
|
||||
};
|
||||
typedef enum sequenceModifierBits sequenceModifierBits_e ;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandEnum_e
|
||||
//
|
||||
// Enumerated sequence command types.
|
||||
//---------------------------------------------------------------------------
|
||||
enum sequenceCommandEnum_
|
||||
{
|
||||
SEQUENCE_COMMAND_ERROR = -1,
|
||||
SEQUENCE_COMMAND_PAUSE = 0,
|
||||
SEQUENCE_COMMAND_FIRETARGETS,
|
||||
SEQUENCE_COMMAND_KILLTARGETS,
|
||||
SEQUENCE_COMMAND_TEXT,
|
||||
SEQUENCE_COMMAND_SOUND,
|
||||
SEQUENCE_COMMAND_GOSUB,
|
||||
SEQUENCE_COMMAND_SENTENCE,
|
||||
SEQUENCE_COMMAND_REPEAT,
|
||||
SEQUENCE_COMMAND_SETDEFAULTS,
|
||||
SEQUENCE_COMMAND_MODIFIER,
|
||||
SEQUENCE_COMMAND_POSTMODIFIER,
|
||||
SEQUENCE_COMMAND_NOOP,
|
||||
|
||||
SEQUENCE_MODIFIER_EFFECT,
|
||||
SEQUENCE_MODIFIER_POSITION,
|
||||
SEQUENCE_MODIFIER_COLOR,
|
||||
SEQUENCE_MODIFIER_COLOR2,
|
||||
SEQUENCE_MODIFIER_FADEIN,
|
||||
SEQUENCE_MODIFIER_FADEOUT,
|
||||
SEQUENCE_MODIFIER_HOLDTIME,
|
||||
SEQUENCE_MODIFIER_FXTIME,
|
||||
SEQUENCE_MODIFIER_SPEAKER,
|
||||
SEQUENCE_MODIFIER_LISTENER,
|
||||
SEQUENCE_MODIFIER_TEXTCHANNEL,
|
||||
};
|
||||
typedef enum sequenceCommandEnum_ sequenceCommandEnum_e;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandType_e
|
||||
//
|
||||
// Typeerated sequence command types.
|
||||
//---------------------------------------------------------------------------
|
||||
enum sequenceCommandType_
|
||||
{
|
||||
SEQUENCE_TYPE_COMMAND,
|
||||
SEQUENCE_TYPE_MODIFIER,
|
||||
};
|
||||
typedef enum sequenceCommandType_ sequenceCommandType_e;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandMapping_s
|
||||
//
|
||||
// A mapping of a command enumerated-value to its name.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sequenceCommandMapping_ sequenceCommandMapping_s;
|
||||
struct sequenceCommandMapping_
|
||||
{
|
||||
sequenceCommandEnum_e commandEnum;
|
||||
const char* commandName;
|
||||
sequenceCommandType_e commandType;
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceCommandLine_s
|
||||
//
|
||||
// Structure representing a single command (usually 1 line) from a
|
||||
// .SEQ file entry.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sequenceCommandLine_ sequenceCommandLine_s;
|
||||
struct sequenceCommandLine_
|
||||
{
|
||||
int commandType; // Specifies the type of command
|
||||
client_textmessage_t clientMessage; // Text HUD message struct
|
||||
char* speakerName; // Targetname of speaking entity
|
||||
char* listenerName; // Targetname of entity being spoken to
|
||||
char* soundFileName; // Name of sound file to play
|
||||
char* sentenceName; // Name of sentences.txt to play
|
||||
char* fireTargetNames; // List of targetnames to fire
|
||||
char* killTargetNames; // List of targetnames to remove
|
||||
float delay; // Seconds 'till next command
|
||||
int repeatCount; // If nonzero, reset execution pointer to top of block (N times, -1 = infinite)
|
||||
int textChannel; // Display channel on which text message is sent
|
||||
int modifierBitField; // Bit field to specify what clientmessage fields are valid
|
||||
sequenceCommandLine_s* nextCommandLine; // Next command (linked list)
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sequenceEntry_s
|
||||
//
|
||||
// Structure representing a single command (usually 1 line) from a
|
||||
// .SEQ file entry.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sequenceEntry_ sequenceEntry_s;
|
||||
struct sequenceEntry_
|
||||
{
|
||||
char* fileName; // Name of sequence file without .SEQ extension
|
||||
char* entryName; // Name of entry label in file
|
||||
sequenceCommandLine_s* firstCommand; // Linked list of commands in entry
|
||||
sequenceEntry_s* nextEntry; // Next loaded entry
|
||||
qboolean isGlobal; // Is entry retained over level transitions?
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// sentenceEntry_s
|
||||
// Structure representing a single sentence of a group from a .SEQ
|
||||
// file entry. Sentences are identical to entries in sentences.txt, but
|
||||
// can be unique per level and are loaded/unloaded with the level.
|
||||
//---------------------------------------------------------------------------
|
||||
typedef struct sentenceEntry_ sentenceEntry_s;
|
||||
struct sentenceEntry_
|
||||
{
|
||||
char* data; // sentence data (ie "We have hostiles" )
|
||||
sentenceEntry_s* nextEntry; // Next loaded entry
|
||||
qboolean isGlobal; // Is entry retained over level transitions?
|
||||
unsigned int index; // this entry's position in the file.
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// sentenceGroupEntry_s
|
||||
// Structure representing a group of sentences found in a .SEQ file.
|
||||
// A sentence group is defined by all sentences with the same name, ignoring
|
||||
// the number at the end of the sentence name. Groups enable a sentence
|
||||
// to be picked at random across a group.
|
||||
//--------------------------------------------------------------------------
|
||||
typedef struct sentenceGroupEntry_ sentenceGroupEntry_s;
|
||||
struct sentenceGroupEntry_
|
||||
{
|
||||
char* groupName; // name of the group (ie CT_ALERT )
|
||||
unsigned int numSentences; // number of sentences in group
|
||||
sentenceEntry_s* firstSentence; // head of linked list of sentences in group
|
||||
sentenceGroupEntry_s* nextEntry; // next loaded group
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
//---------------------------------------------------------------------------
|
||||
sequenceEntry_s* SequenceGet( const char* fileName, const char* entryName );
|
||||
void Sequence_ParseFile( const char* fileName, qboolean isGlobal );
|
||||
void Sequence_OnLevelLoad( const char* mapName );
|
||||
sentenceEntry_s* SequencePickSentence( const char *groupName, int pickMethod, int *picked );
|
||||
|
||||
#endif /* _INCLUDE_SEQUENCE_H_ */
|
||||
|
||||
@@ -1,177 +1,177 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
|
||||
{-0.525731, 0.000000, 0.850651},
|
||||
{-0.442863, 0.238856, 0.864188},
|
||||
{-0.295242, 0.000000, 0.955423},
|
||||
{-0.309017, 0.500000, 0.809017},
|
||||
{-0.162460, 0.262866, 0.951056},
|
||||
{0.000000, 0.000000, 1.000000},
|
||||
{0.000000, 0.850651, 0.525731},
|
||||
{-0.147621, 0.716567, 0.681718},
|
||||
{0.147621, 0.716567, 0.681718},
|
||||
{0.000000, 0.525731, 0.850651},
|
||||
{0.309017, 0.500000, 0.809017},
|
||||
{0.525731, 0.000000, 0.850651},
|
||||
{0.295242, 0.000000, 0.955423},
|
||||
{0.442863, 0.238856, 0.864188},
|
||||
{0.162460, 0.262866, 0.951056},
|
||||
{-0.681718, 0.147621, 0.716567},
|
||||
{-0.809017, 0.309017, 0.500000},
|
||||
{-0.587785, 0.425325, 0.688191},
|
||||
{-0.850651, 0.525731, 0.000000},
|
||||
{-0.864188, 0.442863, 0.238856},
|
||||
{-0.716567, 0.681718, 0.147621},
|
||||
{-0.688191, 0.587785, 0.425325},
|
||||
{-0.500000, 0.809017, 0.309017},
|
||||
{-0.238856, 0.864188, 0.442863},
|
||||
{-0.425325, 0.688191, 0.587785},
|
||||
{-0.716567, 0.681718, -0.147621},
|
||||
{-0.500000, 0.809017, -0.309017},
|
||||
{-0.525731, 0.850651, 0.000000},
|
||||
{0.000000, 0.850651, -0.525731},
|
||||
{-0.238856, 0.864188, -0.442863},
|
||||
{0.000000, 0.955423, -0.295242},
|
||||
{-0.262866, 0.951056, -0.162460},
|
||||
{0.000000, 1.000000, 0.000000},
|
||||
{0.000000, 0.955423, 0.295242},
|
||||
{-0.262866, 0.951056, 0.162460},
|
||||
{0.238856, 0.864188, 0.442863},
|
||||
{0.262866, 0.951056, 0.162460},
|
||||
{0.500000, 0.809017, 0.309017},
|
||||
{0.238856, 0.864188, -0.442863},
|
||||
{0.262866, 0.951056, -0.162460},
|
||||
{0.500000, 0.809017, -0.309017},
|
||||
{0.850651, 0.525731, 0.000000},
|
||||
{0.716567, 0.681718, 0.147621},
|
||||
{0.716567, 0.681718, -0.147621},
|
||||
{0.525731, 0.850651, 0.000000},
|
||||
{0.425325, 0.688191, 0.587785},
|
||||
{0.864188, 0.442863, 0.238856},
|
||||
{0.688191, 0.587785, 0.425325},
|
||||
{0.809017, 0.309017, 0.500000},
|
||||
{0.681718, 0.147621, 0.716567},
|
||||
{0.587785, 0.425325, 0.688191},
|
||||
{0.955423, 0.295242, 0.000000},
|
||||
{1.000000, 0.000000, 0.000000},
|
||||
{0.951056, 0.162460, 0.262866},
|
||||
{0.850651, -0.525731, 0.000000},
|
||||
{0.955423, -0.295242, 0.000000},
|
||||
{0.864188, -0.442863, 0.238856},
|
||||
{0.951056, -0.162460, 0.262866},
|
||||
{0.809017, -0.309017, 0.500000},
|
||||
{0.681718, -0.147621, 0.716567},
|
||||
{0.850651, 0.000000, 0.525731},
|
||||
{0.864188, 0.442863, -0.238856},
|
||||
{0.809017, 0.309017, -0.500000},
|
||||
{0.951056, 0.162460, -0.262866},
|
||||
{0.525731, 0.000000, -0.850651},
|
||||
{0.681718, 0.147621, -0.716567},
|
||||
{0.681718, -0.147621, -0.716567},
|
||||
{0.850651, 0.000000, -0.525731},
|
||||
{0.809017, -0.309017, -0.500000},
|
||||
{0.864188, -0.442863, -0.238856},
|
||||
{0.951056, -0.162460, -0.262866},
|
||||
{0.147621, 0.716567, -0.681718},
|
||||
{0.309017, 0.500000, -0.809017},
|
||||
{0.425325, 0.688191, -0.587785},
|
||||
{0.442863, 0.238856, -0.864188},
|
||||
{0.587785, 0.425325, -0.688191},
|
||||
{0.688191, 0.587785, -0.425325},
|
||||
{-0.147621, 0.716567, -0.681718},
|
||||
{-0.309017, 0.500000, -0.809017},
|
||||
{0.000000, 0.525731, -0.850651},
|
||||
{-0.525731, 0.000000, -0.850651},
|
||||
{-0.442863, 0.238856, -0.864188},
|
||||
{-0.295242, 0.000000, -0.955423},
|
||||
{-0.162460, 0.262866, -0.951056},
|
||||
{0.000000, 0.000000, -1.000000},
|
||||
{0.295242, 0.000000, -0.955423},
|
||||
{0.162460, 0.262866, -0.951056},
|
||||
{-0.442863, -0.238856, -0.864188},
|
||||
{-0.309017, -0.500000, -0.809017},
|
||||
{-0.162460, -0.262866, -0.951056},
|
||||
{0.000000, -0.850651, -0.525731},
|
||||
{-0.147621, -0.716567, -0.681718},
|
||||
{0.147621, -0.716567, -0.681718},
|
||||
{0.000000, -0.525731, -0.850651},
|
||||
{0.309017, -0.500000, -0.809017},
|
||||
{0.442863, -0.238856, -0.864188},
|
||||
{0.162460, -0.262866, -0.951056},
|
||||
{0.238856, -0.864188, -0.442863},
|
||||
{0.500000, -0.809017, -0.309017},
|
||||
{0.425325, -0.688191, -0.587785},
|
||||
{0.716567, -0.681718, -0.147621},
|
||||
{0.688191, -0.587785, -0.425325},
|
||||
{0.587785, -0.425325, -0.688191},
|
||||
{0.000000, -0.955423, -0.295242},
|
||||
{0.000000, -1.000000, 0.000000},
|
||||
{0.262866, -0.951056, -0.162460},
|
||||
{0.000000, -0.850651, 0.525731},
|
||||
{0.000000, -0.955423, 0.295242},
|
||||
{0.238856, -0.864188, 0.442863},
|
||||
{0.262866, -0.951056, 0.162460},
|
||||
{0.500000, -0.809017, 0.309017},
|
||||
{0.716567, -0.681718, 0.147621},
|
||||
{0.525731, -0.850651, 0.000000},
|
||||
{-0.238856, -0.864188, -0.442863},
|
||||
{-0.500000, -0.809017, -0.309017},
|
||||
{-0.262866, -0.951056, -0.162460},
|
||||
{-0.850651, -0.525731, 0.000000},
|
||||
{-0.716567, -0.681718, -0.147621},
|
||||
{-0.716567, -0.681718, 0.147621},
|
||||
{-0.525731, -0.850651, 0.000000},
|
||||
{-0.500000, -0.809017, 0.309017},
|
||||
{-0.238856, -0.864188, 0.442863},
|
||||
{-0.262866, -0.951056, 0.162460},
|
||||
{-0.864188, -0.442863, 0.238856},
|
||||
{-0.809017, -0.309017, 0.500000},
|
||||
{-0.688191, -0.587785, 0.425325},
|
||||
{-0.681718, -0.147621, 0.716567},
|
||||
{-0.442863, -0.238856, 0.864188},
|
||||
{-0.587785, -0.425325, 0.688191},
|
||||
{-0.309017, -0.500000, 0.809017},
|
||||
{-0.147621, -0.716567, 0.681718},
|
||||
{-0.425325, -0.688191, 0.587785},
|
||||
{-0.162460, -0.262866, 0.951056},
|
||||
{0.442863, -0.238856, 0.864188},
|
||||
{0.162460, -0.262866, 0.951056},
|
||||
{0.309017, -0.500000, 0.809017},
|
||||
{0.147621, -0.716567, 0.681718},
|
||||
{0.000000, -0.525731, 0.850651},
|
||||
{0.425325, -0.688191, 0.587785},
|
||||
{0.587785, -0.425325, 0.688191},
|
||||
{0.688191, -0.587785, 0.425325},
|
||||
{-0.955423, 0.295242, 0.000000},
|
||||
{-0.951056, 0.162460, 0.262866},
|
||||
{-1.000000, 0.000000, 0.000000},
|
||||
{-0.850651, 0.000000, 0.525731},
|
||||
{-0.955423, -0.295242, 0.000000},
|
||||
{-0.951056, -0.162460, 0.262866},
|
||||
{-0.864188, 0.442863, -0.238856},
|
||||
{-0.951056, 0.162460, -0.262866},
|
||||
{-0.809017, 0.309017, -0.500000},
|
||||
{-0.864188, -0.442863, -0.238856},
|
||||
{-0.951056, -0.162460, -0.262866},
|
||||
{-0.809017, -0.309017, -0.500000},
|
||||
{-0.681718, 0.147621, -0.716567},
|
||||
{-0.681718, -0.147621, -0.716567},
|
||||
{-0.850651, 0.000000, -0.525731},
|
||||
{-0.688191, 0.587785, -0.425325},
|
||||
{-0.587785, 0.425325, -0.688191},
|
||||
{-0.425325, 0.688191, -0.587785},
|
||||
{-0.425325, -0.688191, -0.587785},
|
||||
{-0.587785, -0.425325, -0.688191},
|
||||
{-0.688191, -0.587785, -0.425325},
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
|
||||
{-0.525731, 0.000000, 0.850651},
|
||||
{-0.442863, 0.238856, 0.864188},
|
||||
{-0.295242, 0.000000, 0.955423},
|
||||
{-0.309017, 0.500000, 0.809017},
|
||||
{-0.162460, 0.262866, 0.951056},
|
||||
{0.000000, 0.000000, 1.000000},
|
||||
{0.000000, 0.850651, 0.525731},
|
||||
{-0.147621, 0.716567, 0.681718},
|
||||
{0.147621, 0.716567, 0.681718},
|
||||
{0.000000, 0.525731, 0.850651},
|
||||
{0.309017, 0.500000, 0.809017},
|
||||
{0.525731, 0.000000, 0.850651},
|
||||
{0.295242, 0.000000, 0.955423},
|
||||
{0.442863, 0.238856, 0.864188},
|
||||
{0.162460, 0.262866, 0.951056},
|
||||
{-0.681718, 0.147621, 0.716567},
|
||||
{-0.809017, 0.309017, 0.500000},
|
||||
{-0.587785, 0.425325, 0.688191},
|
||||
{-0.850651, 0.525731, 0.000000},
|
||||
{-0.864188, 0.442863, 0.238856},
|
||||
{-0.716567, 0.681718, 0.147621},
|
||||
{-0.688191, 0.587785, 0.425325},
|
||||
{-0.500000, 0.809017, 0.309017},
|
||||
{-0.238856, 0.864188, 0.442863},
|
||||
{-0.425325, 0.688191, 0.587785},
|
||||
{-0.716567, 0.681718, -0.147621},
|
||||
{-0.500000, 0.809017, -0.309017},
|
||||
{-0.525731, 0.850651, 0.000000},
|
||||
{0.000000, 0.850651, -0.525731},
|
||||
{-0.238856, 0.864188, -0.442863},
|
||||
{0.000000, 0.955423, -0.295242},
|
||||
{-0.262866, 0.951056, -0.162460},
|
||||
{0.000000, 1.000000, 0.000000},
|
||||
{0.000000, 0.955423, 0.295242},
|
||||
{-0.262866, 0.951056, 0.162460},
|
||||
{0.238856, 0.864188, 0.442863},
|
||||
{0.262866, 0.951056, 0.162460},
|
||||
{0.500000, 0.809017, 0.309017},
|
||||
{0.238856, 0.864188, -0.442863},
|
||||
{0.262866, 0.951056, -0.162460},
|
||||
{0.500000, 0.809017, -0.309017},
|
||||
{0.850651, 0.525731, 0.000000},
|
||||
{0.716567, 0.681718, 0.147621},
|
||||
{0.716567, 0.681718, -0.147621},
|
||||
{0.525731, 0.850651, 0.000000},
|
||||
{0.425325, 0.688191, 0.587785},
|
||||
{0.864188, 0.442863, 0.238856},
|
||||
{0.688191, 0.587785, 0.425325},
|
||||
{0.809017, 0.309017, 0.500000},
|
||||
{0.681718, 0.147621, 0.716567},
|
||||
{0.587785, 0.425325, 0.688191},
|
||||
{0.955423, 0.295242, 0.000000},
|
||||
{1.000000, 0.000000, 0.000000},
|
||||
{0.951056, 0.162460, 0.262866},
|
||||
{0.850651, -0.525731, 0.000000},
|
||||
{0.955423, -0.295242, 0.000000},
|
||||
{0.864188, -0.442863, 0.238856},
|
||||
{0.951056, -0.162460, 0.262866},
|
||||
{0.809017, -0.309017, 0.500000},
|
||||
{0.681718, -0.147621, 0.716567},
|
||||
{0.850651, 0.000000, 0.525731},
|
||||
{0.864188, 0.442863, -0.238856},
|
||||
{0.809017, 0.309017, -0.500000},
|
||||
{0.951056, 0.162460, -0.262866},
|
||||
{0.525731, 0.000000, -0.850651},
|
||||
{0.681718, 0.147621, -0.716567},
|
||||
{0.681718, -0.147621, -0.716567},
|
||||
{0.850651, 0.000000, -0.525731},
|
||||
{0.809017, -0.309017, -0.500000},
|
||||
{0.864188, -0.442863, -0.238856},
|
||||
{0.951056, -0.162460, -0.262866},
|
||||
{0.147621, 0.716567, -0.681718},
|
||||
{0.309017, 0.500000, -0.809017},
|
||||
{0.425325, 0.688191, -0.587785},
|
||||
{0.442863, 0.238856, -0.864188},
|
||||
{0.587785, 0.425325, -0.688191},
|
||||
{0.688191, 0.587785, -0.425325},
|
||||
{-0.147621, 0.716567, -0.681718},
|
||||
{-0.309017, 0.500000, -0.809017},
|
||||
{0.000000, 0.525731, -0.850651},
|
||||
{-0.525731, 0.000000, -0.850651},
|
||||
{-0.442863, 0.238856, -0.864188},
|
||||
{-0.295242, 0.000000, -0.955423},
|
||||
{-0.162460, 0.262866, -0.951056},
|
||||
{0.000000, 0.000000, -1.000000},
|
||||
{0.295242, 0.000000, -0.955423},
|
||||
{0.162460, 0.262866, -0.951056},
|
||||
{-0.442863, -0.238856, -0.864188},
|
||||
{-0.309017, -0.500000, -0.809017},
|
||||
{-0.162460, -0.262866, -0.951056},
|
||||
{0.000000, -0.850651, -0.525731},
|
||||
{-0.147621, -0.716567, -0.681718},
|
||||
{0.147621, -0.716567, -0.681718},
|
||||
{0.000000, -0.525731, -0.850651},
|
||||
{0.309017, -0.500000, -0.809017},
|
||||
{0.442863, -0.238856, -0.864188},
|
||||
{0.162460, -0.262866, -0.951056},
|
||||
{0.238856, -0.864188, -0.442863},
|
||||
{0.500000, -0.809017, -0.309017},
|
||||
{0.425325, -0.688191, -0.587785},
|
||||
{0.716567, -0.681718, -0.147621},
|
||||
{0.688191, -0.587785, -0.425325},
|
||||
{0.587785, -0.425325, -0.688191},
|
||||
{0.000000, -0.955423, -0.295242},
|
||||
{0.000000, -1.000000, 0.000000},
|
||||
{0.262866, -0.951056, -0.162460},
|
||||
{0.000000, -0.850651, 0.525731},
|
||||
{0.000000, -0.955423, 0.295242},
|
||||
{0.238856, -0.864188, 0.442863},
|
||||
{0.262866, -0.951056, 0.162460},
|
||||
{0.500000, -0.809017, 0.309017},
|
||||
{0.716567, -0.681718, 0.147621},
|
||||
{0.525731, -0.850651, 0.000000},
|
||||
{-0.238856, -0.864188, -0.442863},
|
||||
{-0.500000, -0.809017, -0.309017},
|
||||
{-0.262866, -0.951056, -0.162460},
|
||||
{-0.850651, -0.525731, 0.000000},
|
||||
{-0.716567, -0.681718, -0.147621},
|
||||
{-0.716567, -0.681718, 0.147621},
|
||||
{-0.525731, -0.850651, 0.000000},
|
||||
{-0.500000, -0.809017, 0.309017},
|
||||
{-0.238856, -0.864188, 0.442863},
|
||||
{-0.262866, -0.951056, 0.162460},
|
||||
{-0.864188, -0.442863, 0.238856},
|
||||
{-0.809017, -0.309017, 0.500000},
|
||||
{-0.688191, -0.587785, 0.425325},
|
||||
{-0.681718, -0.147621, 0.716567},
|
||||
{-0.442863, -0.238856, 0.864188},
|
||||
{-0.587785, -0.425325, 0.688191},
|
||||
{-0.309017, -0.500000, 0.809017},
|
||||
{-0.147621, -0.716567, 0.681718},
|
||||
{-0.425325, -0.688191, 0.587785},
|
||||
{-0.162460, -0.262866, 0.951056},
|
||||
{0.442863, -0.238856, 0.864188},
|
||||
{0.162460, -0.262866, 0.951056},
|
||||
{0.309017, -0.500000, 0.809017},
|
||||
{0.147621, -0.716567, 0.681718},
|
||||
{0.000000, -0.525731, 0.850651},
|
||||
{0.425325, -0.688191, 0.587785},
|
||||
{0.587785, -0.425325, 0.688191},
|
||||
{0.688191, -0.587785, 0.425325},
|
||||
{-0.955423, 0.295242, 0.000000},
|
||||
{-0.951056, 0.162460, 0.262866},
|
||||
{-1.000000, 0.000000, 0.000000},
|
||||
{-0.850651, 0.000000, 0.525731},
|
||||
{-0.955423, -0.295242, 0.000000},
|
||||
{-0.951056, -0.162460, 0.262866},
|
||||
{-0.864188, 0.442863, -0.238856},
|
||||
{-0.951056, 0.162460, -0.262866},
|
||||
{-0.809017, 0.309017, -0.500000},
|
||||
{-0.864188, -0.442863, -0.238856},
|
||||
{-0.951056, -0.162460, -0.262866},
|
||||
{-0.809017, -0.309017, -0.500000},
|
||||
{-0.681718, 0.147621, -0.716567},
|
||||
{-0.681718, -0.147621, -0.716567},
|
||||
{-0.850651, 0.000000, -0.525731},
|
||||
{-0.688191, 0.587785, -0.425325},
|
||||
{-0.587785, 0.425325, -0.688191},
|
||||
{-0.425325, 0.688191, -0.587785},
|
||||
{-0.425325, -0.688191, -0.587785},
|
||||
{-0.587785, -0.425325, -0.688191},
|
||||
{-0.688191, -0.587785, -0.425325},
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
//
|
||||
// Word size dependent definitions
|
||||
// DAL 1/03
|
||||
//
|
||||
#ifndef ARCHTYPES_H
|
||||
#define ARCHTYPES_H
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define X64BITS
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32 ) && (! defined( __MINGW32__ ))
|
||||
|
||||
typedef __int16 int16;
|
||||
typedef unsigned __int16 uint16;
|
||||
typedef __int32 int32;
|
||||
typedef unsigned __int32 uint32;
|
||||
typedef __int64 int64;
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef __int32 intp; // intp is an integer that can accomodate a pointer
|
||||
typedef unsigned __int32 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *)
|
||||
|
||||
#else /* _WIN32 */
|
||||
|
||||
typedef short int16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#ifdef X64BITS
|
||||
typedef long long intp;
|
||||
typedef unsigned long long uintp;
|
||||
#else
|
||||
typedef int intp;
|
||||
typedef unsigned int uintp;
|
||||
#endif
|
||||
|
||||
#endif /* else _WIN32 */
|
||||
|
||||
#endif /* ARCHTYPES_H */
|
||||
//
|
||||
// Word size dependent definitions
|
||||
// DAL 1/03
|
||||
//
|
||||
#ifndef ARCHTYPES_H
|
||||
#define ARCHTYPES_H
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define X64BITS
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32 ) && (! defined( __MINGW32__ ))
|
||||
|
||||
typedef __int16 int16;
|
||||
typedef unsigned __int16 uint16;
|
||||
typedef __int32 int32;
|
||||
typedef unsigned __int32 uint32;
|
||||
typedef __int64 int64;
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef __int32 intp; // intp is an integer that can accomodate a pointer
|
||||
typedef unsigned __int32 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *)
|
||||
|
||||
#else /* _WIN32 */
|
||||
|
||||
typedef short int16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#ifdef X64BITS
|
||||
typedef long long intp;
|
||||
typedef unsigned long long uintp;
|
||||
#else
|
||||
typedef int intp;
|
||||
typedef unsigned int uintp;
|
||||
#endif
|
||||
|
||||
#endif /* else _WIN32 */
|
||||
|
||||
#endif /* ARCHTYPES_H */
|
||||
|
||||
@@ -1,311 +1,311 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
//
|
||||
// cdll_int.h
|
||||
//
|
||||
// 4-23-98
|
||||
// JOHN: client dll interface declarations
|
||||
//
|
||||
|
||||
#ifndef CDLL_INT_H
|
||||
#define CDLL_INT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "const.h"
|
||||
|
||||
|
||||
// this file is included by both the engine and the client-dll,
|
||||
// so make sure engine declarations aren't done twice
|
||||
|
||||
typedef int HSPRITE; // handle to a graphic
|
||||
|
||||
#define SCRINFO_SCREENFLASH 1
|
||||
#define SCRINFO_STRETCHED 2
|
||||
|
||||
typedef struct SCREENINFO_s
|
||||
{
|
||||
int iSize;
|
||||
int iWidth;
|
||||
int iHeight;
|
||||
int iFlags;
|
||||
int iCharHeight;
|
||||
short charWidths[256];
|
||||
} SCREENINFO;
|
||||
|
||||
|
||||
typedef struct client_data_s
|
||||
{
|
||||
// fields that cannot be modified (ie. have no effect if changed)
|
||||
vec3_t origin;
|
||||
|
||||
// fields that can be changed by the cldll
|
||||
vec3_t viewangles;
|
||||
int iWeaponBits;
|
||||
float fov; // field of view
|
||||
} client_data_t;
|
||||
|
||||
typedef struct client_sprite_s
|
||||
{
|
||||
char szName[64];
|
||||
char szSprite[64];
|
||||
int hspr;
|
||||
int iRes;
|
||||
wrect_t rc;
|
||||
} client_sprite_t;
|
||||
|
||||
typedef struct client_textmessage_s
|
||||
{
|
||||
int effect;
|
||||
byte r1, g1, b1, a1; // 2 colors for effects
|
||||
byte r2, g2, b2, a2;
|
||||
float x;
|
||||
float y;
|
||||
float fadein;
|
||||
float fadeout;
|
||||
float holdtime;
|
||||
float fxtime;
|
||||
const char *pName;
|
||||
const char *pMessage;
|
||||
} client_textmessage_t;
|
||||
|
||||
typedef struct hud_player_info_s
|
||||
{
|
||||
char *name;
|
||||
short ping;
|
||||
byte thisplayer; // TRUE if this is the calling player
|
||||
|
||||
// stuff that's unused at the moment, but should be done
|
||||
byte spectator;
|
||||
byte packetloss;
|
||||
|
||||
char *model;
|
||||
short topcolor;
|
||||
short bottomcolor;
|
||||
|
||||
} hud_player_info_t;
|
||||
|
||||
|
||||
typedef struct cl_enginefuncs_s
|
||||
{
|
||||
// sprite handlers
|
||||
HSPRITE ( *pfnSPR_Load ) ( const char *szPicName );
|
||||
int ( *pfnSPR_Frames ) ( HSPRITE hPic );
|
||||
int ( *pfnSPR_Height ) ( HSPRITE hPic, int frame );
|
||||
int ( *pfnSPR_Width ) ( HSPRITE hPic, int frame );
|
||||
void ( *pfnSPR_Set ) ( HSPRITE hPic, int r, int g, int b );
|
||||
void ( *pfnSPR_Draw ) ( int frame, int x, int y, const wrect_t *prc );
|
||||
void ( *pfnSPR_DrawHoles ) ( int frame, int x, int y, const wrect_t *prc );
|
||||
void ( *pfnSPR_DrawAdditive ) ( int frame, int x, int y, const wrect_t *prc );
|
||||
void ( *pfnSPR_EnableScissor ) ( int x, int y, int width, int height );
|
||||
void ( *pfnSPR_DisableScissor ) ( void );
|
||||
client_sprite_t *( *pfnSPR_GetList ) ( char *psz, int *piCount );
|
||||
|
||||
// screen handlers
|
||||
void ( *pfnFillRGBA ) ( int x, int y, int width, int height, int r, int g, int b, int a );
|
||||
int ( *pfnGetScreenInfo ) ( SCREENINFO *pscrinfo );
|
||||
void ( *pfnSetCrosshair ) ( HSPRITE hspr, wrect_t rc, int r, int g, int b );
|
||||
|
||||
// cvar handlers
|
||||
struct cvar_s *( *pfnRegisterVariable ) ( char *szName, char *szValue, int flags );
|
||||
float ( *pfnGetCvarFloat ) ( char *szName );
|
||||
char* ( *pfnGetCvarString ) ( char *szName );
|
||||
|
||||
// command handlers
|
||||
int ( *pfnAddCommand ) ( char *cmd_name, void (*function)(void) );
|
||||
int ( *pfnHookUserMsg ) ( char *szMsgName, pfnUserMsgHook pfn );
|
||||
int ( *pfnServerCmd ) ( char *szCmdString );
|
||||
int ( *pfnClientCmd ) ( char *szCmdString );
|
||||
|
||||
void ( *pfnGetPlayerInfo ) ( int ent_num, hud_player_info_t *pinfo );
|
||||
|
||||
// sound handlers
|
||||
void ( *pfnPlaySoundByName ) ( char *szSound, float volume );
|
||||
void ( *pfnPlaySoundByIndex ) ( int iSound, float volume );
|
||||
|
||||
// vector helpers
|
||||
void ( *pfnAngleVectors ) ( const float * vecAngles, float * forward, float * right, float * up );
|
||||
|
||||
// text message system
|
||||
client_textmessage_t *( *pfnTextMessageGet ) ( const char *pName );
|
||||
int ( *pfnDrawCharacter ) ( int x, int y, int number, int r, int g, int b );
|
||||
int ( *pfnDrawConsoleString ) ( int x, int y, char *string );
|
||||
void ( *pfnDrawSetTextColor ) ( float r, float g, float b );
|
||||
void ( *pfnDrawConsoleStringLen )( const char *string, int *length, int *height );
|
||||
|
||||
void ( *pfnConsolePrint ) ( const char *string );
|
||||
void ( *pfnCenterPrint ) ( const char *string );
|
||||
|
||||
|
||||
// Added for user input processing
|
||||
int ( *GetWindowCenterX ) ( void );
|
||||
int ( *GetWindowCenterY ) ( void );
|
||||
void ( *GetViewAngles ) ( float * );
|
||||
void ( *SetViewAngles ) ( float * );
|
||||
int ( *GetMaxClients ) ( void );
|
||||
void ( *Cvar_SetValue ) ( char *cvar, float value );
|
||||
|
||||
int (*Cmd_Argc) (void);
|
||||
char *( *Cmd_Argv ) ( int arg );
|
||||
void ( *Con_Printf ) ( char *fmt, ... );
|
||||
void ( *Con_DPrintf ) ( char *fmt, ... );
|
||||
void ( *Con_NPrintf ) ( int pos, char *fmt, ... );
|
||||
void ( *Con_NXPrintf ) ( struct con_nprint_s *info, char *fmt, ... );
|
||||
|
||||
const char *( *PhysInfo_ValueForKey ) ( const char *key );
|
||||
const char *( *ServerInfo_ValueForKey )( const char *key );
|
||||
float ( *GetClientMaxspeed ) ( void );
|
||||
int ( *CheckParm ) ( char *parm, char **ppnext );
|
||||
void ( *Key_Event ) ( int key, int down );
|
||||
void ( *GetMousePosition ) ( int *mx, int *my );
|
||||
int ( *IsNoClipping ) ( void );
|
||||
|
||||
struct cl_entity_s *( *GetLocalPlayer ) ( void );
|
||||
struct cl_entity_s *( *GetViewModel ) ( void );
|
||||
struct cl_entity_s *( *GetEntityByIndex ) ( int idx );
|
||||
|
||||
float ( *GetClientTime ) ( void );
|
||||
void ( *V_CalcShake ) ( void );
|
||||
void ( *V_ApplyShake ) ( float *origin, float *angles, float factor );
|
||||
|
||||
int ( *PM_PointContents ) ( float *point, int *truecontents );
|
||||
int ( *PM_WaterEntity ) ( float *p );
|
||||
struct pmtrace_s *( *PM_TraceLine ) ( float *start, float *end, int flags, int usehull, int ignore_pe );
|
||||
|
||||
struct model_s *( *CL_LoadModel ) ( const char *modelname, int *index );
|
||||
int ( *CL_CreateVisibleEntity ) ( int type, struct cl_entity_s *ent );
|
||||
|
||||
const struct model_s * ( *GetSpritePointer ) ( HSPRITE hSprite );
|
||||
void ( *pfnPlaySoundByNameAtLocation ) ( char *szSound, float volume, float *origin );
|
||||
|
||||
unsigned short ( *pfnPrecacheEvent ) ( int type, const char* psz );
|
||||
void ( *pfnPlaybackEvent ) ( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||
void ( *pfnWeaponAnim ) ( int iAnim, int body );
|
||||
float ( *pfnRandomFloat ) ( float flLow, float flHigh );
|
||||
long ( *pfnRandomLong ) ( long lLow, long lHigh );
|
||||
void ( *pfnHookEvent ) ( char *name, void ( *pfnEvent )( struct event_args_s *args ) );
|
||||
int (*Con_IsVisible) ();
|
||||
const char *( *pfnGetGameDirectory ) ( void );
|
||||
struct cvar_s *( *pfnGetCvarPointer ) ( const char *szName );
|
||||
const char *( *Key_LookupBinding ) ( const char *pBinding );
|
||||
const char *( *pfnGetLevelName ) ( void );
|
||||
void ( *pfnGetScreenFade ) ( struct screenfade_s *fade );
|
||||
void ( *pfnSetScreenFade ) ( struct screenfade_s *fade );
|
||||
void *( *VGui_GetPanel ) ( );
|
||||
void ( *VGui_ViewportPaintBackground ) (int extents[4]);
|
||||
|
||||
byte* (*COM_LoadFile) ( char *path, int usehunk, int *pLength );
|
||||
char* (*COM_ParseFile) ( char *data, char *token );
|
||||
void (*COM_FreeFile) ( void *buffer );
|
||||
|
||||
struct triangleapi_s *pTriAPI;
|
||||
struct efx_api_s *pEfxAPI;
|
||||
struct event_api_s *pEventAPI;
|
||||
struct demo_api_s *pDemoAPI;
|
||||
struct net_api_s *pNetAPI;
|
||||
struct IVoiceTweak_s *pVoiceTweak;
|
||||
|
||||
// returns 1 if the client is a spectator only (connected to a proxy), 0 otherwise or 2 if in dev_overview mode
|
||||
int ( *IsSpectateOnly ) ( void );
|
||||
struct model_s *( *LoadMapSprite ) ( const char *filename );
|
||||
|
||||
// file search functions
|
||||
void ( *COM_AddAppDirectoryToSearchPath ) ( const char *pszBaseDir, const char *appName );
|
||||
int ( *COM_ExpandFilename) ( const char *fileName, char *nameOutBuffer, int nameOutBufferSize );
|
||||
|
||||
// User info
|
||||
// playerNum is in the range (1, MaxClients)
|
||||
// returns NULL if player doesn't exit
|
||||
// returns "" if no value is set
|
||||
const char *( *PlayerInfo_ValueForKey )( int playerNum, const char *key );
|
||||
void ( *PlayerInfo_SetValueForKey )( const char *key, const char *value );
|
||||
|
||||
// Gets a unique ID for the specified player. This is the same even if you see the player on a different server.
|
||||
// iPlayer is an entity index, so client 0 would use iPlayer=1.
|
||||
// Returns false if there is no player on the server in the specified slot.
|
||||
qboolean (*GetPlayerUniqueID)(int iPlayer, char playerID[16]);
|
||||
|
||||
// TrackerID access
|
||||
int (*GetTrackerIDForPlayer)(int playerSlot);
|
||||
int (*GetPlayerForTrackerID)(int trackerID);
|
||||
|
||||
// Same as pfnServerCmd, but the message goes in the unreliable stream so it can't clog the net stream
|
||||
// (but it might not get there).
|
||||
int ( *pfnServerCmdUnreliable )( char *szCmdString );
|
||||
|
||||
void ( *pfnGetMousePos )( struct tagPOINT *ppt );
|
||||
void ( *pfnSetMousePos )( int x, int y );
|
||||
void ( *pfnSetMouseEnable )( qboolean fEnable );
|
||||
} cl_enginefunc_t;
|
||||
|
||||
#ifndef IN_BUTTONS_H
|
||||
#include "in_buttons.h"
|
||||
#endif
|
||||
|
||||
#define CLDLL_INTERFACE_VERSION 7
|
||||
|
||||
extern void ClientDLL_Init( void ); // from cdll_int.c
|
||||
extern void ClientDLL_Shutdown( void );
|
||||
extern void ClientDLL_HudInit( void );
|
||||
extern void ClientDLL_HudVidInit( void );
|
||||
extern void ClientDLL_UpdateClientData( void );
|
||||
extern void ClientDLL_Frame( double time );
|
||||
extern void ClientDLL_HudRedraw( int intermission );
|
||||
extern void ClientDLL_MoveClient( struct playermove_s *ppmove );
|
||||
extern void ClientDLL_ClientMoveInit( struct playermove_s *ppmove );
|
||||
extern char ClientDLL_ClientTextureType( char *name );
|
||||
|
||||
extern void ClientDLL_CreateMove( float frametime, struct usercmd_s *cmd, int active );
|
||||
extern void ClientDLL_ActivateMouse( void );
|
||||
extern void ClientDLL_DeactivateMouse( void );
|
||||
extern void ClientDLL_MouseEvent( int mstate );
|
||||
extern void ClientDLL_ClearStates( void );
|
||||
extern int ClientDLL_IsThirdPerson( void );
|
||||
extern void ClientDLL_GetCameraOffsets( float *ofs );
|
||||
extern int ClientDLL_GraphKeyDown( void );
|
||||
extern struct kbutton_s *ClientDLL_FindKey( const char *name );
|
||||
extern void ClientDLL_CAM_Think( void );
|
||||
extern void ClientDLL_IN_Accumulate( void );
|
||||
extern void ClientDLL_CalcRefdef( struct ref_params_s *pparams );
|
||||
extern int ClientDLL_AddEntity( int type, struct cl_entity_s *ent );
|
||||
extern void ClientDLL_CreateEntities( void );
|
||||
|
||||
extern void ClientDLL_DrawNormalTriangles( void );
|
||||
extern void ClientDLL_DrawTransparentTriangles( void );
|
||||
extern void ClientDLL_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity );
|
||||
extern void ClientDLL_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed );
|
||||
extern void ClientDLL_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client );
|
||||
extern void ClientDLL_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src );
|
||||
extern void ClientDLL_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd );
|
||||
extern void ClientDLL_ReadDemoBuffer( int size, unsigned char *buffer );
|
||||
extern int ClientDLL_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size );
|
||||
extern int ClientDLL_GetHullBounds( int hullnumber, float *mins, float *maxs );
|
||||
|
||||
extern void ClientDLL_VGui_ConsolePrint(const char* text);
|
||||
|
||||
extern int ClientDLL_Key_Event( int down, int keynum, const char *pszCurrentBinding );
|
||||
extern void ClientDLL_TempEntUpdate( double ft, double ct, double grav, struct tempent_s **ppFreeTE, struct tempent_s **ppActiveTE, int ( *addTEntity )( struct cl_entity_s *pEntity ), void ( *playTESound )( struct tempent_s *pTemp, float damp ) );
|
||||
extern struct cl_entity_s *ClientDLL_GetUserEntity( int index );
|
||||
extern void ClientDLL_VoiceStatus(int entindex, qboolean bTalking);
|
||||
extern void ClientDLL_DirectorMessage( int iSize, void *pbuf );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CDLL_INT_H
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
//
|
||||
// cdll_int.h
|
||||
//
|
||||
// 4-23-98
|
||||
// JOHN: client dll interface declarations
|
||||
//
|
||||
|
||||
#ifndef CDLL_INT_H
|
||||
#define CDLL_INT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "const.h"
|
||||
|
||||
|
||||
// this file is included by both the engine and the client-dll,
|
||||
// so make sure engine declarations aren't done twice
|
||||
|
||||
typedef int HSPRITE; // handle to a graphic
|
||||
|
||||
#define SCRINFO_SCREENFLASH 1
|
||||
#define SCRINFO_STRETCHED 2
|
||||
|
||||
typedef struct SCREENINFO_s
|
||||
{
|
||||
int iSize;
|
||||
int iWidth;
|
||||
int iHeight;
|
||||
int iFlags;
|
||||
int iCharHeight;
|
||||
short charWidths[256];
|
||||
} SCREENINFO;
|
||||
|
||||
|
||||
typedef struct client_data_s
|
||||
{
|
||||
// fields that cannot be modified (ie. have no effect if changed)
|
||||
vec3_t origin;
|
||||
|
||||
// fields that can be changed by the cldll
|
||||
vec3_t viewangles;
|
||||
int iWeaponBits;
|
||||
float fov; // field of view
|
||||
} client_data_t;
|
||||
|
||||
typedef struct client_sprite_s
|
||||
{
|
||||
char szName[64];
|
||||
char szSprite[64];
|
||||
int hspr;
|
||||
int iRes;
|
||||
wrect_t rc;
|
||||
} client_sprite_t;
|
||||
|
||||
typedef struct client_textmessage_s
|
||||
{
|
||||
int effect;
|
||||
byte r1, g1, b1, a1; // 2 colors for effects
|
||||
byte r2, g2, b2, a2;
|
||||
float x;
|
||||
float y;
|
||||
float fadein;
|
||||
float fadeout;
|
||||
float holdtime;
|
||||
float fxtime;
|
||||
const char *pName;
|
||||
const char *pMessage;
|
||||
} client_textmessage_t;
|
||||
|
||||
typedef struct hud_player_info_s
|
||||
{
|
||||
char *name;
|
||||
short ping;
|
||||
byte thisplayer; // TRUE if this is the calling player
|
||||
|
||||
// stuff that's unused at the moment, but should be done
|
||||
byte spectator;
|
||||
byte packetloss;
|
||||
|
||||
char *model;
|
||||
short topcolor;
|
||||
short bottomcolor;
|
||||
|
||||
} hud_player_info_t;
|
||||
|
||||
|
||||
typedef struct cl_enginefuncs_s
|
||||
{
|
||||
// sprite handlers
|
||||
HSPRITE ( *pfnSPR_Load ) ( const char *szPicName );
|
||||
int ( *pfnSPR_Frames ) ( HSPRITE hPic );
|
||||
int ( *pfnSPR_Height ) ( HSPRITE hPic, int frame );
|
||||
int ( *pfnSPR_Width ) ( HSPRITE hPic, int frame );
|
||||
void ( *pfnSPR_Set ) ( HSPRITE hPic, int r, int g, int b );
|
||||
void ( *pfnSPR_Draw ) ( int frame, int x, int y, const wrect_t *prc );
|
||||
void ( *pfnSPR_DrawHoles ) ( int frame, int x, int y, const wrect_t *prc );
|
||||
void ( *pfnSPR_DrawAdditive ) ( int frame, int x, int y, const wrect_t *prc );
|
||||
void ( *pfnSPR_EnableScissor ) ( int x, int y, int width, int height );
|
||||
void ( *pfnSPR_DisableScissor ) ( void );
|
||||
client_sprite_t *( *pfnSPR_GetList ) ( char *psz, int *piCount );
|
||||
|
||||
// screen handlers
|
||||
void ( *pfnFillRGBA ) ( int x, int y, int width, int height, int r, int g, int b, int a );
|
||||
int ( *pfnGetScreenInfo ) ( SCREENINFO *pscrinfo );
|
||||
void ( *pfnSetCrosshair ) ( HSPRITE hspr, wrect_t rc, int r, int g, int b );
|
||||
|
||||
// cvar handlers
|
||||
struct cvar_s *( *pfnRegisterVariable ) ( char *szName, char *szValue, int flags );
|
||||
float ( *pfnGetCvarFloat ) ( char *szName );
|
||||
char* ( *pfnGetCvarString ) ( char *szName );
|
||||
|
||||
// command handlers
|
||||
int ( *pfnAddCommand ) ( char *cmd_name, void (*function)(void) );
|
||||
int ( *pfnHookUserMsg ) ( char *szMsgName, pfnUserMsgHook pfn );
|
||||
int ( *pfnServerCmd ) ( char *szCmdString );
|
||||
int ( *pfnClientCmd ) ( char *szCmdString );
|
||||
|
||||
void ( *pfnGetPlayerInfo ) ( int ent_num, hud_player_info_t *pinfo );
|
||||
|
||||
// sound handlers
|
||||
void ( *pfnPlaySoundByName ) ( char *szSound, float volume );
|
||||
void ( *pfnPlaySoundByIndex ) ( int iSound, float volume );
|
||||
|
||||
// vector helpers
|
||||
void ( *pfnAngleVectors ) ( const float * vecAngles, float * forward, float * right, float * up );
|
||||
|
||||
// text message system
|
||||
client_textmessage_t *( *pfnTextMessageGet ) ( const char *pName );
|
||||
int ( *pfnDrawCharacter ) ( int x, int y, int number, int r, int g, int b );
|
||||
int ( *pfnDrawConsoleString ) ( int x, int y, char *string );
|
||||
void ( *pfnDrawSetTextColor ) ( float r, float g, float b );
|
||||
void ( *pfnDrawConsoleStringLen )( const char *string, int *length, int *height );
|
||||
|
||||
void ( *pfnConsolePrint ) ( const char *string );
|
||||
void ( *pfnCenterPrint ) ( const char *string );
|
||||
|
||||
|
||||
// Added for user input processing
|
||||
int ( *GetWindowCenterX ) ( void );
|
||||
int ( *GetWindowCenterY ) ( void );
|
||||
void ( *GetViewAngles ) ( float * );
|
||||
void ( *SetViewAngles ) ( float * );
|
||||
int ( *GetMaxClients ) ( void );
|
||||
void ( *Cvar_SetValue ) ( char *cvar, float value );
|
||||
|
||||
int (*Cmd_Argc) (void);
|
||||
char *( *Cmd_Argv ) ( int arg );
|
||||
void ( *Con_Printf ) ( char *fmt, ... );
|
||||
void ( *Con_DPrintf ) ( char *fmt, ... );
|
||||
void ( *Con_NPrintf ) ( int pos, char *fmt, ... );
|
||||
void ( *Con_NXPrintf ) ( struct con_nprint_s *info, char *fmt, ... );
|
||||
|
||||
const char *( *PhysInfo_ValueForKey ) ( const char *key );
|
||||
const char *( *ServerInfo_ValueForKey )( const char *key );
|
||||
float ( *GetClientMaxspeed ) ( void );
|
||||
int ( *CheckParm ) ( char *parm, char **ppnext );
|
||||
void ( *Key_Event ) ( int key, int down );
|
||||
void ( *GetMousePosition ) ( int *mx, int *my );
|
||||
int ( *IsNoClipping ) ( void );
|
||||
|
||||
struct cl_entity_s *( *GetLocalPlayer ) ( void );
|
||||
struct cl_entity_s *( *GetViewModel ) ( void );
|
||||
struct cl_entity_s *( *GetEntityByIndex ) ( int idx );
|
||||
|
||||
float ( *GetClientTime ) ( void );
|
||||
void ( *V_CalcShake ) ( void );
|
||||
void ( *V_ApplyShake ) ( float *origin, float *angles, float factor );
|
||||
|
||||
int ( *PM_PointContents ) ( float *point, int *truecontents );
|
||||
int ( *PM_WaterEntity ) ( float *p );
|
||||
struct pmtrace_s *( *PM_TraceLine ) ( float *start, float *end, int flags, int usehull, int ignore_pe );
|
||||
|
||||
struct model_s *( *CL_LoadModel ) ( const char *modelname, int *index );
|
||||
int ( *CL_CreateVisibleEntity ) ( int type, struct cl_entity_s *ent );
|
||||
|
||||
const struct model_s * ( *GetSpritePointer ) ( HSPRITE hSprite );
|
||||
void ( *pfnPlaySoundByNameAtLocation ) ( char *szSound, float volume, float *origin );
|
||||
|
||||
unsigned short ( *pfnPrecacheEvent ) ( int type, const char* psz );
|
||||
void ( *pfnPlaybackEvent ) ( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||
void ( *pfnWeaponAnim ) ( int iAnim, int body );
|
||||
float ( *pfnRandomFloat ) ( float flLow, float flHigh );
|
||||
long ( *pfnRandomLong ) ( long lLow, long lHigh );
|
||||
void ( *pfnHookEvent ) ( char *name, void ( *pfnEvent )( struct event_args_s *args ) );
|
||||
int (*Con_IsVisible) ();
|
||||
const char *( *pfnGetGameDirectory ) ( void );
|
||||
struct cvar_s *( *pfnGetCvarPointer ) ( const char *szName );
|
||||
const char *( *Key_LookupBinding ) ( const char *pBinding );
|
||||
const char *( *pfnGetLevelName ) ( void );
|
||||
void ( *pfnGetScreenFade ) ( struct screenfade_s *fade );
|
||||
void ( *pfnSetScreenFade ) ( struct screenfade_s *fade );
|
||||
void *( *VGui_GetPanel ) ( );
|
||||
void ( *VGui_ViewportPaintBackground ) (int extents[4]);
|
||||
|
||||
byte* (*COM_LoadFile) ( char *path, int usehunk, int *pLength );
|
||||
char* (*COM_ParseFile) ( char *data, char *token );
|
||||
void (*COM_FreeFile) ( void *buffer );
|
||||
|
||||
struct triangleapi_s *pTriAPI;
|
||||
struct efx_api_s *pEfxAPI;
|
||||
struct event_api_s *pEventAPI;
|
||||
struct demo_api_s *pDemoAPI;
|
||||
struct net_api_s *pNetAPI;
|
||||
struct IVoiceTweak_s *pVoiceTweak;
|
||||
|
||||
// returns 1 if the client is a spectator only (connected to a proxy), 0 otherwise or 2 if in dev_overview mode
|
||||
int ( *IsSpectateOnly ) ( void );
|
||||
struct model_s *( *LoadMapSprite ) ( const char *filename );
|
||||
|
||||
// file search functions
|
||||
void ( *COM_AddAppDirectoryToSearchPath ) ( const char *pszBaseDir, const char *appName );
|
||||
int ( *COM_ExpandFilename) ( const char *fileName, char *nameOutBuffer, int nameOutBufferSize );
|
||||
|
||||
// User info
|
||||
// playerNum is in the range (1, MaxClients)
|
||||
// returns NULL if player doesn't exit
|
||||
// returns "" if no value is set
|
||||
const char *( *PlayerInfo_ValueForKey )( int playerNum, const char *key );
|
||||
void ( *PlayerInfo_SetValueForKey )( const char *key, const char *value );
|
||||
|
||||
// Gets a unique ID for the specified player. This is the same even if you see the player on a different server.
|
||||
// iPlayer is an entity index, so client 0 would use iPlayer=1.
|
||||
// Returns false if there is no player on the server in the specified slot.
|
||||
qboolean (*GetPlayerUniqueID)(int iPlayer, char playerID[16]);
|
||||
|
||||
// TrackerID access
|
||||
int (*GetTrackerIDForPlayer)(int playerSlot);
|
||||
int (*GetPlayerForTrackerID)(int trackerID);
|
||||
|
||||
// Same as pfnServerCmd, but the message goes in the unreliable stream so it can't clog the net stream
|
||||
// (but it might not get there).
|
||||
int ( *pfnServerCmdUnreliable )( char *szCmdString );
|
||||
|
||||
void ( *pfnGetMousePos )( struct tagPOINT *ppt );
|
||||
void ( *pfnSetMousePos )( int x, int y );
|
||||
void ( *pfnSetMouseEnable )( qboolean fEnable );
|
||||
} cl_enginefunc_t;
|
||||
|
||||
#ifndef IN_BUTTONS_H
|
||||
#include "in_buttons.h"
|
||||
#endif
|
||||
|
||||
#define CLDLL_INTERFACE_VERSION 7
|
||||
|
||||
extern void ClientDLL_Init( void ); // from cdll_int.c
|
||||
extern void ClientDLL_Shutdown( void );
|
||||
extern void ClientDLL_HudInit( void );
|
||||
extern void ClientDLL_HudVidInit( void );
|
||||
extern void ClientDLL_UpdateClientData( void );
|
||||
extern void ClientDLL_Frame( double time );
|
||||
extern void ClientDLL_HudRedraw( int intermission );
|
||||
extern void ClientDLL_MoveClient( struct playermove_s *ppmove );
|
||||
extern void ClientDLL_ClientMoveInit( struct playermove_s *ppmove );
|
||||
extern char ClientDLL_ClientTextureType( char *name );
|
||||
|
||||
extern void ClientDLL_CreateMove( float frametime, struct usercmd_s *cmd, int active );
|
||||
extern void ClientDLL_ActivateMouse( void );
|
||||
extern void ClientDLL_DeactivateMouse( void );
|
||||
extern void ClientDLL_MouseEvent( int mstate );
|
||||
extern void ClientDLL_ClearStates( void );
|
||||
extern int ClientDLL_IsThirdPerson( void );
|
||||
extern void ClientDLL_GetCameraOffsets( float *ofs );
|
||||
extern int ClientDLL_GraphKeyDown( void );
|
||||
extern struct kbutton_s *ClientDLL_FindKey( const char *name );
|
||||
extern void ClientDLL_CAM_Think( void );
|
||||
extern void ClientDLL_IN_Accumulate( void );
|
||||
extern void ClientDLL_CalcRefdef( struct ref_params_s *pparams );
|
||||
extern int ClientDLL_AddEntity( int type, struct cl_entity_s *ent );
|
||||
extern void ClientDLL_CreateEntities( void );
|
||||
|
||||
extern void ClientDLL_DrawNormalTriangles( void );
|
||||
extern void ClientDLL_DrawTransparentTriangles( void );
|
||||
extern void ClientDLL_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity );
|
||||
extern void ClientDLL_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed );
|
||||
extern void ClientDLL_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client );
|
||||
extern void ClientDLL_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src );
|
||||
extern void ClientDLL_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd );
|
||||
extern void ClientDLL_ReadDemoBuffer( int size, unsigned char *buffer );
|
||||
extern int ClientDLL_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size );
|
||||
extern int ClientDLL_GetHullBounds( int hullnumber, float *mins, float *maxs );
|
||||
|
||||
extern void ClientDLL_VGui_ConsolePrint(const char* text);
|
||||
|
||||
extern int ClientDLL_Key_Event( int down, int keynum, const char *pszCurrentBinding );
|
||||
extern void ClientDLL_TempEntUpdate( double ft, double ct, double grav, struct tempent_s **ppFreeTE, struct tempent_s **ppActiveTE, int ( *addTEntity )( struct cl_entity_s *pEntity ), void ( *playTESound )( struct tempent_s *pTemp, float damp ) );
|
||||
extern struct cl_entity_s *ClientDLL_GetUserEntity( int index );
|
||||
extern void ClientDLL_VoiceStatus(int entindex, qboolean bTalking);
|
||||
extern void ClientDLL_DirectorMessage( int iSize, void *pbuf );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CDLL_INT_H
|
||||
|
||||
@@ -1,104 +1,104 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
// Customization.h
|
||||
|
||||
#ifndef CUSTOM_H
|
||||
#define CUSTOM_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
|
||||
#include "const.h"
|
||||
|
||||
#define MAX_QPATH 64 // Must match value in quakedefs.h
|
||||
|
||||
/////////////////
|
||||
// Customization
|
||||
// passed to pfnPlayerCustomization
|
||||
// For automatic downloading.
|
||||
typedef enum
|
||||
{
|
||||
t_sound = 0,
|
||||
t_skin,
|
||||
t_model,
|
||||
t_decal,
|
||||
t_generic,
|
||||
t_eventscript
|
||||
} resourcetype_t;
|
||||
|
||||
// Fake type for world
|
||||
#define t_world 6
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int size;
|
||||
} _resourceinfo_t;
|
||||
|
||||
typedef struct resourceinfo_s
|
||||
{
|
||||
_resourceinfo_t info[ 7 ];
|
||||
} resourceinfo_t;
|
||||
|
||||
#define RES_FATALIFMISSING (1<<0) // Disconnect if we can't get this file.
|
||||
#define RES_WASMISSING (1<<1) // Do we have the file locally, did we get it ok?
|
||||
#define RES_CUSTOM (1<<2) // Is this resource one that corresponds to another player's customization
|
||||
// or is it a server startup resource.
|
||||
#define RES_REQUESTED (1<<3) // Already requested a download of this one
|
||||
#define RES_PRECACHED (1<<4) // Already precached
|
||||
|
||||
#include "crc.h"
|
||||
|
||||
typedef struct resource_s
|
||||
{
|
||||
char szFileName[MAX_QPATH]; // File name to download/precache.
|
||||
resourcetype_t type; // t_sound, t_skin, t_model, t_decal.
|
||||
int nIndex; // For t_decals
|
||||
int nDownloadSize; // Size in Bytes if this must be downloaded.
|
||||
unsigned char ucFlags;
|
||||
|
||||
// For handling client to client resource propagation
|
||||
unsigned char rgucMD5_hash[16]; // To determine if we already have it.
|
||||
unsigned char playernum; // Which player index this resource is associated with, if it's a custom resource.
|
||||
|
||||
unsigned char rguc_reserved[ 32 ]; // For future expansion
|
||||
struct resource_s *pNext; // Next in chain.
|
||||
struct resource_s *pPrev;
|
||||
} resource_t;
|
||||
|
||||
typedef struct customization_s
|
||||
{
|
||||
qboolean bInUse; // Is this customization in use;
|
||||
resource_t resource; // The resource_t for this customization
|
||||
qboolean bTranslated; // Has the raw data been translated into a useable format?
|
||||
// (e.g., raw decal .wad make into texture_t *)
|
||||
int nUserData1; // Customization specific data
|
||||
int nUserData2; // Customization specific data
|
||||
void *pInfo; // Buffer that holds the data structure that references the data (e.g., the cachewad_t)
|
||||
void *pBuffer; // Buffer that holds the data for the customization (the raw .wad data)
|
||||
struct customization_s *pNext; // Next in chain
|
||||
} customization_t;
|
||||
|
||||
#define FCUST_FROMHPAK ( 1<<0 )
|
||||
#define FCUST_WIPEDATA ( 1<<1 )
|
||||
#define FCUST_IGNOREINIT ( 1<<2 )
|
||||
|
||||
void COM_ClearCustomizationList( struct customization_s *pHead, qboolean bCleanDecals);
|
||||
qboolean COM_CreateCustomization( struct customization_s *pListHead, struct resource_s *pResource, int playernumber, int flags,
|
||||
struct customization_s **pCustomization, int *nLumps );
|
||||
int COM_SizeofResourceList ( struct resource_s *pList, struct resourceinfo_s *ri );
|
||||
|
||||
#endif // CUSTOM_H
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
// Customization.h
|
||||
|
||||
#ifndef CUSTOM_H
|
||||
#define CUSTOM_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
|
||||
#include "const.h"
|
||||
|
||||
#define MAX_QPATH 64 // Must match value in quakedefs.h
|
||||
|
||||
/////////////////
|
||||
// Customization
|
||||
// passed to pfnPlayerCustomization
|
||||
// For automatic downloading.
|
||||
typedef enum
|
||||
{
|
||||
t_sound = 0,
|
||||
t_skin,
|
||||
t_model,
|
||||
t_decal,
|
||||
t_generic,
|
||||
t_eventscript
|
||||
} resourcetype_t;
|
||||
|
||||
// Fake type for world
|
||||
#define t_world 6
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int size;
|
||||
} _resourceinfo_t;
|
||||
|
||||
typedef struct resourceinfo_s
|
||||
{
|
||||
_resourceinfo_t info[ 7 ];
|
||||
} resourceinfo_t;
|
||||
|
||||
#define RES_FATALIFMISSING (1<<0) // Disconnect if we can't get this file.
|
||||
#define RES_WASMISSING (1<<1) // Do we have the file locally, did we get it ok?
|
||||
#define RES_CUSTOM (1<<2) // Is this resource one that corresponds to another player's customization
|
||||
// or is it a server startup resource.
|
||||
#define RES_REQUESTED (1<<3) // Already requested a download of this one
|
||||
#define RES_PRECACHED (1<<4) // Already precached
|
||||
|
||||
#include "crc.h"
|
||||
|
||||
typedef struct resource_s
|
||||
{
|
||||
char szFileName[MAX_QPATH]; // File name to download/precache.
|
||||
resourcetype_t type; // t_sound, t_skin, t_model, t_decal.
|
||||
int nIndex; // For t_decals
|
||||
int nDownloadSize; // Size in Bytes if this must be downloaded.
|
||||
unsigned char ucFlags;
|
||||
|
||||
// For handling client to client resource propagation
|
||||
unsigned char rgucMD5_hash[16]; // To determine if we already have it.
|
||||
unsigned char playernum; // Which player index this resource is associated with, if it's a custom resource.
|
||||
|
||||
unsigned char rguc_reserved[ 32 ]; // For future expansion
|
||||
struct resource_s *pNext; // Next in chain.
|
||||
struct resource_s *pPrev;
|
||||
} resource_t;
|
||||
|
||||
typedef struct customization_s
|
||||
{
|
||||
qboolean bInUse; // Is this customization in use;
|
||||
resource_t resource; // The resource_t for this customization
|
||||
qboolean bTranslated; // Has the raw data been translated into a useable format?
|
||||
// (e.g., raw decal .wad make into texture_t *)
|
||||
int nUserData1; // Customization specific data
|
||||
int nUserData2; // Customization specific data
|
||||
void *pInfo; // Buffer that holds the data structure that references the data (e.g., the cachewad_t)
|
||||
void *pBuffer; // Buffer that holds the data for the customization (the raw .wad data)
|
||||
struct customization_s *pNext; // Next in chain
|
||||
} customization_t;
|
||||
|
||||
#define FCUST_FROMHPAK ( 1<<0 )
|
||||
#define FCUST_WIPEDATA ( 1<<1 )
|
||||
#define FCUST_IGNOREINIT ( 1<<2 )
|
||||
|
||||
void COM_ClearCustomizationList( struct customization_s *pHead, qboolean bCleanDecals);
|
||||
qboolean COM_CreateCustomization( struct customization_s *pListHead, struct resource_s *pResource, int playernumber, int flags,
|
||||
struct customization_s **pCustomization, int *nLumps );
|
||||
int COM_SizeofResourceList ( struct resource_s *pList, struct resourceinfo_s *ri );
|
||||
|
||||
#endif // CUSTOM_H
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef CUSTOMENTITY_H
|
||||
#define CUSTOMENTITY_H
|
||||
|
||||
// Custom Entities
|
||||
|
||||
// Start/End Entity is encoded as 12 bits of entity index, and 4 bits of attachment (4:12)
|
||||
#define BEAMENT_ENTITY(x) ((x)&0xFFF)
|
||||
#define BEAMENT_ATTACHMENT(x) (((x)>>12)&0xF)
|
||||
|
||||
// Beam types, encoded as a byte
|
||||
enum
|
||||
{
|
||||
BEAM_POINTS = 0,
|
||||
BEAM_ENTPOINT,
|
||||
BEAM_ENTS,
|
||||
BEAM_HOSE,
|
||||
};
|
||||
|
||||
#define BEAM_FSINE 0x10
|
||||
#define BEAM_FSOLID 0x20
|
||||
#define BEAM_FSHADEIN 0x40
|
||||
#define BEAM_FSHADEOUT 0x80
|
||||
|
||||
#endif //CUSTOMENTITY_H
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef CUSTOMENTITY_H
|
||||
#define CUSTOMENTITY_H
|
||||
|
||||
// Custom Entities
|
||||
|
||||
// Start/End Entity is encoded as 12 bits of entity index, and 4 bits of attachment (4:12)
|
||||
#define BEAMENT_ENTITY(x) ((x)&0xFFF)
|
||||
#define BEAMENT_ATTACHMENT(x) (((x)>>12)&0xF)
|
||||
|
||||
// Beam types, encoded as a byte
|
||||
enum
|
||||
{
|
||||
BEAM_POINTS = 0,
|
||||
BEAM_ENTPOINT,
|
||||
BEAM_ENTS,
|
||||
BEAM_HOSE,
|
||||
};
|
||||
|
||||
#define BEAM_FSINE 0x10
|
||||
#define BEAM_FSOLID 0x20
|
||||
#define BEAM_FSHADEIN 0x40
|
||||
#define BEAM_FSHADEOUT 0x80
|
||||
|
||||
#endif //CUSTOMENTITY_H
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
#if !defined EDICT_H
|
||||
#define EDICT_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
#define MAX_ENT_LEAFS 48
|
||||
|
||||
#include "progdefs.h"
|
||||
|
||||
struct edict_s
|
||||
{
|
||||
qboolean free;
|
||||
int serialnumber;
|
||||
link_t area; // linked to a division node or leaf
|
||||
|
||||
int headnode; // -1 to use normal leaf check
|
||||
int num_leafs;
|
||||
short leafnums[MAX_ENT_LEAFS];
|
||||
|
||||
float freetime; // sv.time when the object was freed
|
||||
|
||||
void* pvPrivateData; // Alloced and freed by engine, used by DLLs
|
||||
|
||||
entvars_t v; // C exported fields from progs
|
||||
|
||||
// other fields from progs come immediately after
|
||||
};
|
||||
|
||||
#endif
|
||||
#if !defined EDICT_H
|
||||
#define EDICT_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
#define MAX_ENT_LEAFS 48
|
||||
|
||||
#include "progdefs.h"
|
||||
|
||||
struct edict_s
|
||||
{
|
||||
qboolean free;
|
||||
int serialnumber;
|
||||
link_t area; // linked to a division node or leaf
|
||||
|
||||
int headnode; // -1 to use normal leaf check
|
||||
int num_leafs;
|
||||
short leafnums[MAX_ENT_LEAFS];
|
||||
|
||||
float freetime; // sv.time when the object was freed
|
||||
|
||||
void* pvPrivateData; // Alloced and freed by engine, used by DLLs
|
||||
|
||||
entvars_t v; // C exported fields from progs
|
||||
|
||||
// other fields from progs come immediately after
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
1150
src/engine/eiface.h
1150
src/engine/eiface.h
File diff suppressed because it is too large
Load Diff
@@ -1,131 +1,131 @@
|
||||
//========= Copyright <20> 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
// keydefs.h
|
||||
#ifndef KEYDEFS_H
|
||||
#define KEYDEFS_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
|
||||
//
|
||||
// these are the key numbers that should be passed to Key_Event
|
||||
//
|
||||
#define K_TAB 9
|
||||
#define K_ENTER 13
|
||||
#define K_ESCAPE 27
|
||||
#define K_SPACE 32
|
||||
|
||||
// normal keys should be passed as lowercased ascii
|
||||
|
||||
#define K_BACKSPACE 127
|
||||
#define K_UPARROW 128
|
||||
#define K_DOWNARROW 129
|
||||
#define K_LEFTARROW 130
|
||||
#define K_RIGHTARROW 131
|
||||
|
||||
#define K_ALT 132
|
||||
#define K_CTRL 133
|
||||
#define K_SHIFT 134
|
||||
#define K_F1 135
|
||||
#define K_F2 136
|
||||
#define K_F3 137
|
||||
#define K_F4 138
|
||||
#define K_F5 139
|
||||
#define K_F6 140
|
||||
#define K_F7 141
|
||||
#define K_F8 142
|
||||
#define K_F9 143
|
||||
#define K_F10 144
|
||||
#define K_F11 145
|
||||
#define K_F12 146
|
||||
#define K_INS 147
|
||||
#define K_DEL 148
|
||||
#define K_PGDN 149
|
||||
#define K_PGUP 150
|
||||
#define K_HOME 151
|
||||
#define K_END 152
|
||||
|
||||
#define K_KP_HOME 160
|
||||
#define K_KP_UPARROW 161
|
||||
#define K_KP_PGUP 162
|
||||
#define K_KP_LEFTARROW 163
|
||||
#define K_KP_5 164
|
||||
#define K_KP_RIGHTARROW 165
|
||||
#define K_KP_END 166
|
||||
#define K_KP_DOWNARROW 167
|
||||
#define K_KP_PGDN 168
|
||||
#define K_KP_ENTER 169
|
||||
#define K_KP_INS 170
|
||||
#define K_KP_DEL 171
|
||||
#define K_KP_SLASH 172
|
||||
#define K_KP_MINUS 173
|
||||
#define K_KP_PLUS 174
|
||||
#define K_CAPSLOCK 175
|
||||
|
||||
|
||||
//
|
||||
// joystick buttons
|
||||
//
|
||||
#define K_JOY1 203
|
||||
#define K_JOY2 204
|
||||
#define K_JOY3 205
|
||||
#define K_JOY4 206
|
||||
|
||||
//
|
||||
// aux keys are for multi-buttoned joysticks to generate so they can use
|
||||
// the normal binding process
|
||||
//
|
||||
#define K_AUX1 207
|
||||
#define K_AUX2 208
|
||||
#define K_AUX3 209
|
||||
#define K_AUX4 210
|
||||
#define K_AUX5 211
|
||||
#define K_AUX6 212
|
||||
#define K_AUX7 213
|
||||
#define K_AUX8 214
|
||||
#define K_AUX9 215
|
||||
#define K_AUX10 216
|
||||
#define K_AUX11 217
|
||||
#define K_AUX12 218
|
||||
#define K_AUX13 219
|
||||
#define K_AUX14 220
|
||||
#define K_AUX15 221
|
||||
#define K_AUX16 222
|
||||
#define K_AUX17 223
|
||||
#define K_AUX18 224
|
||||
#define K_AUX19 225
|
||||
#define K_AUX20 226
|
||||
#define K_AUX21 227
|
||||
#define K_AUX22 228
|
||||
#define K_AUX23 229
|
||||
#define K_AUX24 230
|
||||
#define K_AUX25 231
|
||||
#define K_AUX26 232
|
||||
#define K_AUX27 233
|
||||
#define K_AUX28 234
|
||||
#define K_AUX29 235
|
||||
#define K_AUX30 236
|
||||
#define K_AUX31 237
|
||||
#define K_AUX32 238
|
||||
#define K_MWHEELDOWN 239
|
||||
#define K_MWHEELUP 240
|
||||
|
||||
#define K_PAUSE 255
|
||||
|
||||
//
|
||||
// mouse buttons generate virtual keys
|
||||
//
|
||||
#define K_MOUSE1 241
|
||||
#define K_MOUSE2 242
|
||||
#define K_MOUSE3 243
|
||||
#define K_MOUSE4 244
|
||||
#define K_MOUSE5 245
|
||||
|
||||
#endif // KEYDEFS_H
|
||||
//========= Copyright <20> 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
// keydefs.h
|
||||
#ifndef KEYDEFS_H
|
||||
#define KEYDEFS_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
|
||||
//
|
||||
// these are the key numbers that should be passed to Key_Event
|
||||
//
|
||||
#define K_TAB 9
|
||||
#define K_ENTER 13
|
||||
#define K_ESCAPE 27
|
||||
#define K_SPACE 32
|
||||
|
||||
// normal keys should be passed as lowercased ascii
|
||||
|
||||
#define K_BACKSPACE 127
|
||||
#define K_UPARROW 128
|
||||
#define K_DOWNARROW 129
|
||||
#define K_LEFTARROW 130
|
||||
#define K_RIGHTARROW 131
|
||||
|
||||
#define K_ALT 132
|
||||
#define K_CTRL 133
|
||||
#define K_SHIFT 134
|
||||
#define K_F1 135
|
||||
#define K_F2 136
|
||||
#define K_F3 137
|
||||
#define K_F4 138
|
||||
#define K_F5 139
|
||||
#define K_F6 140
|
||||
#define K_F7 141
|
||||
#define K_F8 142
|
||||
#define K_F9 143
|
||||
#define K_F10 144
|
||||
#define K_F11 145
|
||||
#define K_F12 146
|
||||
#define K_INS 147
|
||||
#define K_DEL 148
|
||||
#define K_PGDN 149
|
||||
#define K_PGUP 150
|
||||
#define K_HOME 151
|
||||
#define K_END 152
|
||||
|
||||
#define K_KP_HOME 160
|
||||
#define K_KP_UPARROW 161
|
||||
#define K_KP_PGUP 162
|
||||
#define K_KP_LEFTARROW 163
|
||||
#define K_KP_5 164
|
||||
#define K_KP_RIGHTARROW 165
|
||||
#define K_KP_END 166
|
||||
#define K_KP_DOWNARROW 167
|
||||
#define K_KP_PGDN 168
|
||||
#define K_KP_ENTER 169
|
||||
#define K_KP_INS 170
|
||||
#define K_KP_DEL 171
|
||||
#define K_KP_SLASH 172
|
||||
#define K_KP_MINUS 173
|
||||
#define K_KP_PLUS 174
|
||||
#define K_CAPSLOCK 175
|
||||
|
||||
|
||||
//
|
||||
// joystick buttons
|
||||
//
|
||||
#define K_JOY1 203
|
||||
#define K_JOY2 204
|
||||
#define K_JOY3 205
|
||||
#define K_JOY4 206
|
||||
|
||||
//
|
||||
// aux keys are for multi-buttoned joysticks to generate so they can use
|
||||
// the normal binding process
|
||||
//
|
||||
#define K_AUX1 207
|
||||
#define K_AUX2 208
|
||||
#define K_AUX3 209
|
||||
#define K_AUX4 210
|
||||
#define K_AUX5 211
|
||||
#define K_AUX6 212
|
||||
#define K_AUX7 213
|
||||
#define K_AUX8 214
|
||||
#define K_AUX9 215
|
||||
#define K_AUX10 216
|
||||
#define K_AUX11 217
|
||||
#define K_AUX12 218
|
||||
#define K_AUX13 219
|
||||
#define K_AUX14 220
|
||||
#define K_AUX15 221
|
||||
#define K_AUX16 222
|
||||
#define K_AUX17 223
|
||||
#define K_AUX18 224
|
||||
#define K_AUX19 225
|
||||
#define K_AUX20 226
|
||||
#define K_AUX21 227
|
||||
#define K_AUX22 228
|
||||
#define K_AUX23 229
|
||||
#define K_AUX24 230
|
||||
#define K_AUX25 231
|
||||
#define K_AUX26 232
|
||||
#define K_AUX27 233
|
||||
#define K_AUX28 234
|
||||
#define K_AUX29 235
|
||||
#define K_AUX30 236
|
||||
#define K_AUX31 237
|
||||
#define K_AUX32 238
|
||||
#define K_MWHEELDOWN 239
|
||||
#define K_MWHEELUP 240
|
||||
|
||||
#define K_PAUSE 255
|
||||
|
||||
//
|
||||
// mouse buttons generate virtual keys
|
||||
//
|
||||
#define K_MOUSE1 241
|
||||
#define K_MOUSE2 242
|
||||
#define K_MOUSE3 243
|
||||
#define K_MOUSE4 244
|
||||
#define K_MOUSE5 245
|
||||
|
||||
#endif // KEYDEFS_H
|
||||
|
||||
@@ -1,226 +1,226 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef PROGDEFS_H
|
||||
#define PROGDEFS_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float time;
|
||||
float frametime;
|
||||
float force_retouch;
|
||||
string_t mapname;
|
||||
string_t startspot;
|
||||
float deathmatch;
|
||||
float coop;
|
||||
float teamplay;
|
||||
float serverflags;
|
||||
float found_secrets;
|
||||
vec3_t v_forward;
|
||||
vec3_t v_up;
|
||||
vec3_t v_right;
|
||||
float trace_allsolid;
|
||||
float trace_startsolid;
|
||||
float trace_fraction;
|
||||
vec3_t trace_endpos;
|
||||
vec3_t trace_plane_normal;
|
||||
float trace_plane_dist;
|
||||
edict_t *trace_ent;
|
||||
float trace_inopen;
|
||||
float trace_inwater;
|
||||
int trace_hitgroup;
|
||||
int trace_flags;
|
||||
int msg_entity;
|
||||
int cdAudioTrack;
|
||||
int maxClients;
|
||||
int maxEntities;
|
||||
const char *pStringBase;
|
||||
|
||||
void *pSaveData;
|
||||
vec3_t vecLandmarkOffset;
|
||||
} globalvars_t;
|
||||
|
||||
|
||||
typedef struct entvars_s
|
||||
{
|
||||
string_t classname;
|
||||
string_t globalname;
|
||||
|
||||
vec3_t origin;
|
||||
vec3_t oldorigin;
|
||||
vec3_t velocity;
|
||||
vec3_t basevelocity;
|
||||
vec3_t clbasevelocity; // Base velocity that was passed in to server physics so
|
||||
// client can predict conveyors correctly. Server zeroes it, so we need to store here, too.
|
||||
vec3_t movedir;
|
||||
|
||||
vec3_t angles; // Model angles
|
||||
vec3_t avelocity; // angle velocity (degrees per second)
|
||||
vec3_t punchangle; // auto-decaying view angle adjustment
|
||||
vec3_t v_angle; // Viewing angle (player only)
|
||||
|
||||
// For parametric entities
|
||||
vec3_t endpos;
|
||||
vec3_t startpos;
|
||||
float impacttime;
|
||||
float starttime;
|
||||
|
||||
int fixangle; // 0:nothing, 1:force view angles, 2:add avelocity
|
||||
float idealpitch;
|
||||
float pitch_speed;
|
||||
float ideal_yaw;
|
||||
float yaw_speed;
|
||||
|
||||
int modelindex;
|
||||
string_t model;
|
||||
|
||||
int viewmodel; // player's viewmodel
|
||||
int weaponmodel; // what other players see
|
||||
|
||||
vec3_t absmin; // BB max translated to world coord
|
||||
vec3_t absmax; // BB max translated to world coord
|
||||
vec3_t mins; // local BB min
|
||||
vec3_t maxs; // local BB max
|
||||
vec3_t size; // maxs - mins
|
||||
|
||||
float ltime;
|
||||
float nextthink;
|
||||
|
||||
int movetype;
|
||||
int solid;
|
||||
|
||||
int skin;
|
||||
int body; // sub-model selection for studiomodels
|
||||
int effects;
|
||||
|
||||
float gravity; // % of "normal" gravity
|
||||
float friction; // inverse elasticity of MOVETYPE_BOUNCE
|
||||
|
||||
int light_level;
|
||||
|
||||
int sequence; // animation sequence
|
||||
int gaitsequence; // movement animation sequence for player (0 for none)
|
||||
float frame; // % playback position in animation sequences (0..255)
|
||||
float animtime; // world time when frame was set
|
||||
float framerate; // animation playback rate (-8x to 8x)
|
||||
byte controller[4]; // bone controller setting (0..255)
|
||||
byte blending[2]; // blending amount between sub-sequences (0..255)
|
||||
|
||||
float scale; // sprite rendering scale (0..255)
|
||||
|
||||
int rendermode;
|
||||
float renderamt;
|
||||
vec3_t rendercolor;
|
||||
int renderfx;
|
||||
|
||||
float health;
|
||||
float frags;
|
||||
int weapons; // bit mask for available weapons
|
||||
float takedamage;
|
||||
|
||||
int deadflag;
|
||||
vec3_t view_ofs; // eye position
|
||||
|
||||
int button;
|
||||
int impulse;
|
||||
|
||||
edict_t *chain; // Entity pointer when linked into a linked list
|
||||
edict_t *dmg_inflictor;
|
||||
edict_t *enemy;
|
||||
edict_t *aiment; // entity pointer when MOVETYPE_FOLLOW
|
||||
edict_t *owner;
|
||||
edict_t *groundentity;
|
||||
|
||||
int spawnflags;
|
||||
int flags;
|
||||
|
||||
int colormap; // lowbyte topcolor, highbyte bottomcolor
|
||||
int team;
|
||||
|
||||
float max_health;
|
||||
float teleport_time;
|
||||
float armortype;
|
||||
float armorvalue;
|
||||
int waterlevel;
|
||||
int watertype;
|
||||
|
||||
string_t target;
|
||||
string_t targetname;
|
||||
string_t netname;
|
||||
string_t message;
|
||||
|
||||
float dmg_take;
|
||||
float dmg_save;
|
||||
float dmg;
|
||||
float dmgtime;
|
||||
|
||||
string_t noise;
|
||||
string_t noise1;
|
||||
string_t noise2;
|
||||
string_t noise3;
|
||||
|
||||
float speed;
|
||||
float air_finished;
|
||||
float pain_finished;
|
||||
float radsuit_finished;
|
||||
|
||||
edict_t *pContainingEntity;
|
||||
|
||||
int playerclass;
|
||||
float maxspeed;
|
||||
|
||||
float fov;
|
||||
int weaponanim;
|
||||
|
||||
int pushmsec;
|
||||
|
||||
int bInDuck;
|
||||
int flTimeStepSound;
|
||||
int flSwimTime;
|
||||
int flDuckTime;
|
||||
int iStepLeft;
|
||||
float flFallVelocity;
|
||||
|
||||
int gamestate;
|
||||
|
||||
int oldbuttons;
|
||||
|
||||
int groupinfo;
|
||||
|
||||
// For mods
|
||||
int iuser1;
|
||||
int iuser2;
|
||||
int iuser3;
|
||||
int iuser4;
|
||||
float fuser1;
|
||||
float fuser2;
|
||||
float fuser3;
|
||||
float fuser4;
|
||||
vec3_t vuser1;
|
||||
vec3_t vuser2;
|
||||
vec3_t vuser3;
|
||||
vec3_t vuser4;
|
||||
edict_t *euser1;
|
||||
edict_t *euser2;
|
||||
edict_t *euser3;
|
||||
edict_t *euser4;
|
||||
} entvars_t;
|
||||
|
||||
|
||||
#endif // PROGDEFS_H
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef PROGDEFS_H
|
||||
#define PROGDEFS_H
|
||||
#ifdef _WIN32
|
||||
#ifndef __MINGW32__
|
||||
#pragma once
|
||||
#endif /* not __MINGW32__ */
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float time;
|
||||
float frametime;
|
||||
float force_retouch;
|
||||
string_t mapname;
|
||||
string_t startspot;
|
||||
float deathmatch;
|
||||
float coop;
|
||||
float teamplay;
|
||||
float serverflags;
|
||||
float found_secrets;
|
||||
vec3_t v_forward;
|
||||
vec3_t v_up;
|
||||
vec3_t v_right;
|
||||
float trace_allsolid;
|
||||
float trace_startsolid;
|
||||
float trace_fraction;
|
||||
vec3_t trace_endpos;
|
||||
vec3_t trace_plane_normal;
|
||||
float trace_plane_dist;
|
||||
edict_t *trace_ent;
|
||||
float trace_inopen;
|
||||
float trace_inwater;
|
||||
int trace_hitgroup;
|
||||
int trace_flags;
|
||||
int msg_entity;
|
||||
int cdAudioTrack;
|
||||
int maxClients;
|
||||
int maxEntities;
|
||||
const char *pStringBase;
|
||||
|
||||
void *pSaveData;
|
||||
vec3_t vecLandmarkOffset;
|
||||
} globalvars_t;
|
||||
|
||||
|
||||
typedef struct entvars_s
|
||||
{
|
||||
string_t classname;
|
||||
string_t globalname;
|
||||
|
||||
vec3_t origin;
|
||||
vec3_t oldorigin;
|
||||
vec3_t velocity;
|
||||
vec3_t basevelocity;
|
||||
vec3_t clbasevelocity; // Base velocity that was passed in to server physics so
|
||||
// client can predict conveyors correctly. Server zeroes it, so we need to store here, too.
|
||||
vec3_t movedir;
|
||||
|
||||
vec3_t angles; // Model angles
|
||||
vec3_t avelocity; // angle velocity (degrees per second)
|
||||
vec3_t punchangle; // auto-decaying view angle adjustment
|
||||
vec3_t v_angle; // Viewing angle (player only)
|
||||
|
||||
// For parametric entities
|
||||
vec3_t endpos;
|
||||
vec3_t startpos;
|
||||
float impacttime;
|
||||
float starttime;
|
||||
|
||||
int fixangle; // 0:nothing, 1:force view angles, 2:add avelocity
|
||||
float idealpitch;
|
||||
float pitch_speed;
|
||||
float ideal_yaw;
|
||||
float yaw_speed;
|
||||
|
||||
int modelindex;
|
||||
string_t model;
|
||||
|
||||
int viewmodel; // player's viewmodel
|
||||
int weaponmodel; // what other players see
|
||||
|
||||
vec3_t absmin; // BB max translated to world coord
|
||||
vec3_t absmax; // BB max translated to world coord
|
||||
vec3_t mins; // local BB min
|
||||
vec3_t maxs; // local BB max
|
||||
vec3_t size; // maxs - mins
|
||||
|
||||
float ltime;
|
||||
float nextthink;
|
||||
|
||||
int movetype;
|
||||
int solid;
|
||||
|
||||
int skin;
|
||||
int body; // sub-model selection for studiomodels
|
||||
int effects;
|
||||
|
||||
float gravity; // % of "normal" gravity
|
||||
float friction; // inverse elasticity of MOVETYPE_BOUNCE
|
||||
|
||||
int light_level;
|
||||
|
||||
int sequence; // animation sequence
|
||||
int gaitsequence; // movement animation sequence for player (0 for none)
|
||||
float frame; // % playback position in animation sequences (0..255)
|
||||
float animtime; // world time when frame was set
|
||||
float framerate; // animation playback rate (-8x to 8x)
|
||||
byte controller[4]; // bone controller setting (0..255)
|
||||
byte blending[2]; // blending amount between sub-sequences (0..255)
|
||||
|
||||
float scale; // sprite rendering scale (0..255)
|
||||
|
||||
int rendermode;
|
||||
float renderamt;
|
||||
vec3_t rendercolor;
|
||||
int renderfx;
|
||||
|
||||
float health;
|
||||
float frags;
|
||||
int weapons; // bit mask for available weapons
|
||||
float takedamage;
|
||||
|
||||
int deadflag;
|
||||
vec3_t view_ofs; // eye position
|
||||
|
||||
int button;
|
||||
int impulse;
|
||||
|
||||
edict_t *chain; // Entity pointer when linked into a linked list
|
||||
edict_t *dmg_inflictor;
|
||||
edict_t *enemy;
|
||||
edict_t *aiment; // entity pointer when MOVETYPE_FOLLOW
|
||||
edict_t *owner;
|
||||
edict_t *groundentity;
|
||||
|
||||
int spawnflags;
|
||||
int flags;
|
||||
|
||||
int colormap; // lowbyte topcolor, highbyte bottomcolor
|
||||
int team;
|
||||
|
||||
float max_health;
|
||||
float teleport_time;
|
||||
float armortype;
|
||||
float armorvalue;
|
||||
int waterlevel;
|
||||
int watertype;
|
||||
|
||||
string_t target;
|
||||
string_t targetname;
|
||||
string_t netname;
|
||||
string_t message;
|
||||
|
||||
float dmg_take;
|
||||
float dmg_save;
|
||||
float dmg;
|
||||
float dmgtime;
|
||||
|
||||
string_t noise;
|
||||
string_t noise1;
|
||||
string_t noise2;
|
||||
string_t noise3;
|
||||
|
||||
float speed;
|
||||
float air_finished;
|
||||
float pain_finished;
|
||||
float radsuit_finished;
|
||||
|
||||
edict_t *pContainingEntity;
|
||||
|
||||
int playerclass;
|
||||
float maxspeed;
|
||||
|
||||
float fov;
|
||||
int weaponanim;
|
||||
|
||||
int pushmsec;
|
||||
|
||||
int bInDuck;
|
||||
int flTimeStepSound;
|
||||
int flSwimTime;
|
||||
int flDuckTime;
|
||||
int iStepLeft;
|
||||
float flFallVelocity;
|
||||
|
||||
int gamestate;
|
||||
|
||||
int oldbuttons;
|
||||
|
||||
int groupinfo;
|
||||
|
||||
// For mods
|
||||
int iuser1;
|
||||
int iuser2;
|
||||
int iuser3;
|
||||
int iuser4;
|
||||
float fuser1;
|
||||
float fuser2;
|
||||
float fuser3;
|
||||
float fuser4;
|
||||
vec3_t vuser1;
|
||||
vec3_t vuser2;
|
||||
vec3_t vuser3;
|
||||
vec3_t vuser4;
|
||||
edict_t *euser1;
|
||||
edict_t *euser2;
|
||||
edict_t *euser3;
|
||||
edict_t *euser4;
|
||||
} entvars_t;
|
||||
|
||||
|
||||
#endif // PROGDEFS_H
|
||||
|
||||
@@ -1,82 +1,82 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef PROGS_H
|
||||
#define PROGS_H
|
||||
|
||||
#include "progdefs.h"
|
||||
|
||||
// 16 simultaneous events, max
|
||||
#define MAX_EVENT_QUEUE 64
|
||||
|
||||
#define DEFAULT_EVENT_RESENDS 1
|
||||
|
||||
#include "event_flags.h"
|
||||
|
||||
typedef struct event_info_s event_info_t;
|
||||
|
||||
#include "event_args.h"
|
||||
|
||||
struct event_info_s
|
||||
{
|
||||
unsigned short index; // 0 implies not in use
|
||||
|
||||
short packet_index; // Use data from state info for entity in delta_packet . -1 implies separate info based on event
|
||||
// parameter signature
|
||||
short entity_index; // The edict this event is associated with
|
||||
|
||||
float fire_time; // if non-zero, the time when the event should be fired ( fixed up on the client )
|
||||
|
||||
event_args_t args;
|
||||
|
||||
// CLIENT ONLY
|
||||
int flags; // Reliable or not, etc.
|
||||
|
||||
};
|
||||
|
||||
typedef struct event_state_s event_state_t;
|
||||
|
||||
struct event_state_s
|
||||
{
|
||||
struct event_info_s ei[ MAX_EVENT_QUEUE ];
|
||||
};
|
||||
|
||||
#if !defined( ENTITY_STATEH )
|
||||
#include "entity_state.h"
|
||||
#endif
|
||||
|
||||
#if !defined( EDICT_H )
|
||||
#include "edict.h"
|
||||
#endif
|
||||
|
||||
#define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m)))
|
||||
#define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
|
||||
|
||||
//============================================================================
|
||||
|
||||
extern char *pr_strings;
|
||||
extern globalvars_t gGlobalVariables;
|
||||
|
||||
//============================================================================
|
||||
|
||||
edict_t *ED_Alloc (void);
|
||||
void ED_Free (edict_t *ed);
|
||||
void ED_LoadFromFile (char *data);
|
||||
|
||||
edict_t *EDICT_NUM(int n);
|
||||
int NUM_FOR_EDICT(const edict_t *e);
|
||||
|
||||
#define PROG_TO_EDICT(e) ((edict_t *)((byte *)sv.edicts + e))
|
||||
|
||||
#endif // PROGS_H
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef PROGS_H
|
||||
#define PROGS_H
|
||||
|
||||
#include "progdefs.h"
|
||||
|
||||
// 16 simultaneous events, max
|
||||
#define MAX_EVENT_QUEUE 64
|
||||
|
||||
#define DEFAULT_EVENT_RESENDS 1
|
||||
|
||||
#include "event_flags.h"
|
||||
|
||||
typedef struct event_info_s event_info_t;
|
||||
|
||||
#include "event_args.h"
|
||||
|
||||
struct event_info_s
|
||||
{
|
||||
unsigned short index; // 0 implies not in use
|
||||
|
||||
short packet_index; // Use data from state info for entity in delta_packet . -1 implies separate info based on event
|
||||
// parameter signature
|
||||
short entity_index; // The edict this event is associated with
|
||||
|
||||
float fire_time; // if non-zero, the time when the event should be fired ( fixed up on the client )
|
||||
|
||||
event_args_t args;
|
||||
|
||||
// CLIENT ONLY
|
||||
int flags; // Reliable or not, etc.
|
||||
|
||||
};
|
||||
|
||||
typedef struct event_state_s event_state_t;
|
||||
|
||||
struct event_state_s
|
||||
{
|
||||
struct event_info_s ei[ MAX_EVENT_QUEUE ];
|
||||
};
|
||||
|
||||
#if !defined( ENTITY_STATEH )
|
||||
#include "entity_state.h"
|
||||
#endif
|
||||
|
||||
#if !defined( EDICT_H )
|
||||
#include "edict.h"
|
||||
#endif
|
||||
|
||||
#define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m)))
|
||||
#define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
|
||||
|
||||
//============================================================================
|
||||
|
||||
extern char *pr_strings;
|
||||
extern globalvars_t gGlobalVariables;
|
||||
|
||||
//============================================================================
|
||||
|
||||
edict_t *ED_Alloc (void);
|
||||
void ED_Free (edict_t *ed);
|
||||
void ED_LoadFromFile (char *data);
|
||||
|
||||
edict_t *EDICT_NUM(int n);
|
||||
int NUM_FOR_EDICT(const edict_t *e);
|
||||
|
||||
#define PROG_TO_EDICT(e) ((edict_t *)((byte *)sv.edicts + e))
|
||||
|
||||
#endif // PROGS_H
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef SHAKE_H
|
||||
#define SHAKE_H
|
||||
|
||||
// Screen / View effects
|
||||
|
||||
// screen shake
|
||||
extern int gmsgShake;
|
||||
|
||||
// This structure is sent over the net to describe a screen shake event
|
||||
typedef struct
|
||||
{
|
||||
unsigned short amplitude; // FIXED 4.12 amount of shake
|
||||
unsigned short duration; // FIXED 4.12 seconds duration
|
||||
unsigned short frequency; // FIXED 8.8 noise frequency (low frequency is a jerk,high frequency is a rumble)
|
||||
} ScreenShake;
|
||||
|
||||
extern void V_ApplyShake( float *origin, float *angles, float factor );
|
||||
extern void V_CalcShake( void );
|
||||
extern int V_ScreenShake( const char *pszName, int iSize, void *pbuf );
|
||||
extern int V_ScreenFade( const char *pszName, int iSize, void *pbuf );
|
||||
|
||||
|
||||
// Fade in/out
|
||||
extern int gmsgFade;
|
||||
|
||||
#define FFADE_IN 0x0000 // Just here so we don't pass 0 into the function
|
||||
#define FFADE_OUT 0x0001 // Fade out (not in)
|
||||
#define FFADE_MODULATE 0x0002 // Modulate (don't blend)
|
||||
#define FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received
|
||||
|
||||
// This structure is sent over the net to describe a screen fade event
|
||||
typedef struct
|
||||
{
|
||||
unsigned short duration; // FIXED 4.12 seconds duration
|
||||
unsigned short holdTime; // FIXED 4.12 seconds duration until reset (fade & hold)
|
||||
short fadeFlags; // flags
|
||||
byte r, g, b, a; // fade to color ( max alpha )
|
||||
} ScreenFade;
|
||||
|
||||
#endif // SHAKE_H
|
||||
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef SHAKE_H
|
||||
#define SHAKE_H
|
||||
|
||||
// Screen / View effects
|
||||
|
||||
// screen shake
|
||||
extern int gmsgShake;
|
||||
|
||||
// This structure is sent over the net to describe a screen shake event
|
||||
typedef struct
|
||||
{
|
||||
unsigned short amplitude; // FIXED 4.12 amount of shake
|
||||
unsigned short duration; // FIXED 4.12 seconds duration
|
||||
unsigned short frequency; // FIXED 8.8 noise frequency (low frequency is a jerk,high frequency is a rumble)
|
||||
} ScreenShake;
|
||||
|
||||
extern void V_ApplyShake( float *origin, float *angles, float factor );
|
||||
extern void V_CalcShake( void );
|
||||
extern int V_ScreenShake( const char *pszName, int iSize, void *pbuf );
|
||||
extern int V_ScreenFade( const char *pszName, int iSize, void *pbuf );
|
||||
|
||||
|
||||
// Fade in/out
|
||||
extern int gmsgFade;
|
||||
|
||||
#define FFADE_IN 0x0000 // Just here so we don't pass 0 into the function
|
||||
#define FFADE_OUT 0x0001 // Fade out (not in)
|
||||
#define FFADE_MODULATE 0x0002 // Modulate (don't blend)
|
||||
#define FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received
|
||||
|
||||
// This structure is sent over the net to describe a screen fade event
|
||||
typedef struct
|
||||
{
|
||||
unsigned short duration; // FIXED 4.12 seconds duration
|
||||
unsigned short holdTime; // FIXED 4.12 seconds duration until reset (fade & hold)
|
||||
short fadeFlags; // flags
|
||||
byte r, g, b, a; // fade to color ( max alpha )
|
||||
} ScreenFade;
|
||||
|
||||
#endif // SHAKE_H
|
||||
|
||||
|
||||
@@ -1,362 +1,362 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _STUDIO_H_
|
||||
#define _STUDIO_H_
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
STUDIO MODELS
|
||||
|
||||
Studio models are position independent, so the cache manager can move them.
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
#define MAXSTUDIOTRIANGLES 20000 // TODO: tune this
|
||||
#define MAXSTUDIOVERTS 2048 // TODO: tune this
|
||||
#define MAXSTUDIOSEQUENCES 256 // total animation sequences
|
||||
#define MAXSTUDIOSKINS 100 // total textures
|
||||
#define MAXSTUDIOSRCBONES 512 // bones allowed at source movement
|
||||
#define MAXSTUDIOBONES 128 // total bones actually used
|
||||
#define MAXSTUDIOMODELS 32 // sub-models per model
|
||||
#define MAXSTUDIOBODYPARTS 32
|
||||
#define MAXSTUDIOGROUPS 16
|
||||
#define MAXSTUDIOANIMATIONS 512 // per sequence
|
||||
#define MAXSTUDIOMESHES 256
|
||||
#define MAXSTUDIOEVENTS 1024
|
||||
#define MAXSTUDIOPIVOTS 256
|
||||
#define MAXSTUDIOCONTROLLERS 8
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
int version;
|
||||
|
||||
char name[64];
|
||||
int length;
|
||||
|
||||
vec3_t eyeposition; // ideal eye position
|
||||
vec3_t min; // ideal movement hull size
|
||||
vec3_t max;
|
||||
|
||||
vec3_t bbmin; // clipping bounding box
|
||||
vec3_t bbmax;
|
||||
|
||||
int flags;
|
||||
|
||||
int numbones; // bones
|
||||
int boneindex;
|
||||
|
||||
int numbonecontrollers; // bone controllers
|
||||
int bonecontrollerindex;
|
||||
|
||||
int numhitboxes; // complex bounding boxes
|
||||
int hitboxindex;
|
||||
|
||||
int numseq; // animation sequences
|
||||
int seqindex;
|
||||
|
||||
int numseqgroups; // demand loaded sequences
|
||||
int seqgroupindex;
|
||||
|
||||
int numtextures; // raw textures
|
||||
int textureindex;
|
||||
int texturedataindex;
|
||||
|
||||
int numskinref; // replaceable textures
|
||||
int numskinfamilies;
|
||||
int skinindex;
|
||||
|
||||
int numbodyparts;
|
||||
int bodypartindex;
|
||||
|
||||
int numattachments; // queryable attachable points
|
||||
int attachmentindex;
|
||||
|
||||
int soundtable;
|
||||
int soundindex;
|
||||
int soundgroups;
|
||||
int soundgroupindex;
|
||||
|
||||
int numtransitions; // animation node to animation node transition graph
|
||||
int transitionindex;
|
||||
} studiohdr_t;
|
||||
|
||||
// header for demand loaded sequence group data
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
int version;
|
||||
|
||||
char name[64];
|
||||
int length;
|
||||
} studioseqhdr_t;
|
||||
|
||||
// bones
|
||||
typedef struct
|
||||
{
|
||||
char name[32]; // bone name for symbolic links
|
||||
int parent; // parent bone
|
||||
int flags; // ??
|
||||
int bonecontroller[6]; // bone controller index, -1 == none
|
||||
float value[6]; // default DoF values
|
||||
float scale[6]; // scale for delta DoF values
|
||||
} mstudiobone_t;
|
||||
|
||||
|
||||
// bone controllers
|
||||
typedef struct
|
||||
{
|
||||
int bone; // -1 == 0
|
||||
int type; // X, Y, Z, XR, YR, ZR, M
|
||||
float start;
|
||||
float end;
|
||||
int rest; // byte index value at rest
|
||||
int index; // 0-3 user set controller, 4 mouth
|
||||
} mstudiobonecontroller_t;
|
||||
|
||||
// intersection boxes
|
||||
typedef struct
|
||||
{
|
||||
int bone;
|
||||
int group; // intersection group
|
||||
vec3_t bbmin; // bounding box
|
||||
vec3_t bbmax;
|
||||
} mstudiobbox_t;
|
||||
|
||||
#if !defined( CACHE_USER ) && !defined( QUAKEDEF_H )
|
||||
#define CACHE_USER
|
||||
typedef struct cache_user_s
|
||||
{
|
||||
void *data;
|
||||
} cache_user_t;
|
||||
#endif
|
||||
|
||||
// demand loaded sequence groups
|
||||
typedef struct
|
||||
{
|
||||
char label[32]; // textual name
|
||||
char name[64]; // file name
|
||||
cache_user_t cache; // cache index pointer
|
||||
int data; // hack for group 0
|
||||
} mstudioseqgroup_t;
|
||||
|
||||
// sequence descriptions
|
||||
typedef struct
|
||||
{
|
||||
char label[32]; // sequence label
|
||||
|
||||
float fps; // frames per second
|
||||
int flags; // looping/non-looping flags
|
||||
|
||||
int activity;
|
||||
int actweight;
|
||||
|
||||
int numevents;
|
||||
int eventindex;
|
||||
|
||||
int numframes; // number of frames per sequence
|
||||
|
||||
int numpivots; // number of foot pivots
|
||||
int pivotindex;
|
||||
|
||||
int motiontype;
|
||||
int motionbone;
|
||||
vec3_t linearmovement;
|
||||
int automoveposindex;
|
||||
int automoveangleindex;
|
||||
|
||||
vec3_t bbmin; // per sequence bounding box
|
||||
vec3_t bbmax;
|
||||
|
||||
int numblends;
|
||||
int animindex; // mstudioanim_t pointer relative to start of sequence group data
|
||||
// [blend][bone][X, Y, Z, XR, YR, ZR]
|
||||
|
||||
int blendtype[2]; // X, Y, Z, XR, YR, ZR
|
||||
float blendstart[2]; // starting value
|
||||
float blendend[2]; // ending value
|
||||
int blendparent;
|
||||
|
||||
int seqgroup; // sequence group for demand loading
|
||||
|
||||
int entrynode; // transition node at entry
|
||||
int exitnode; // transition node at exit
|
||||
int nodeflags; // transition rules
|
||||
|
||||
int nextseq; // auto advancing sequences
|
||||
} mstudioseqdesc_t;
|
||||
|
||||
// events
|
||||
#include "studio_event.h"
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
int frame;
|
||||
int event;
|
||||
int type;
|
||||
char options[64];
|
||||
} mstudioevent_t;
|
||||
*/
|
||||
|
||||
// pivots
|
||||
typedef struct
|
||||
{
|
||||
vec3_t org; // pivot point
|
||||
int start;
|
||||
int end;
|
||||
} mstudiopivot_t;
|
||||
|
||||
// attachment
|
||||
typedef struct
|
||||
{
|
||||
char name[32];
|
||||
int type;
|
||||
int bone;
|
||||
vec3_t org; // attachment point
|
||||
vec3_t vectors[3];
|
||||
} mstudioattachment_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short offset[6];
|
||||
} mstudioanim_t;
|
||||
|
||||
// animation frames
|
||||
typedef union
|
||||
{
|
||||
struct {
|
||||
byte valid;
|
||||
byte total;
|
||||
} num;
|
||||
short value;
|
||||
} mstudioanimvalue_t;
|
||||
|
||||
|
||||
|
||||
// body part index
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
int nummodels;
|
||||
int base;
|
||||
int modelindex; // index into models array
|
||||
} mstudiobodyparts_t;
|
||||
|
||||
|
||||
|
||||
// skin info
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
int flags;
|
||||
int width;
|
||||
int height;
|
||||
int index;
|
||||
} mstudiotexture_t;
|
||||
|
||||
|
||||
// skin families
|
||||
// short index[skinfamilies][skinref]
|
||||
|
||||
// studio models
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
|
||||
int type;
|
||||
|
||||
float boundingradius;
|
||||
|
||||
int nummesh;
|
||||
int meshindex;
|
||||
|
||||
int numverts; // number of unique vertices
|
||||
int vertinfoindex; // vertex bone info
|
||||
int vertindex; // vertex vec3_t
|
||||
int numnorms; // number of unique surface normals
|
||||
int norminfoindex; // normal bone info
|
||||
int normindex; // normal vec3_t
|
||||
|
||||
int numgroups; // deformation groups
|
||||
int groupindex;
|
||||
} mstudiomodel_t;
|
||||
|
||||
|
||||
// vec3_t boundingbox[model][bone][2]; // complex intersection info
|
||||
|
||||
|
||||
// meshes
|
||||
typedef struct
|
||||
{
|
||||
int numtris;
|
||||
int triindex;
|
||||
int skinref;
|
||||
int numnorms; // per mesh normals
|
||||
int normindex; // normal vec3_t
|
||||
} mstudiomesh_t;
|
||||
|
||||
// triangles
|
||||
#if 0
|
||||
typedef struct
|
||||
{
|
||||
short vertindex; // index into vertex array
|
||||
short normindex; // index into normal array
|
||||
short s,t; // s,t position on skin
|
||||
} mstudiotrivert_t;
|
||||
#endif
|
||||
|
||||
// lighting options
|
||||
#define STUDIO_NF_FLATSHADE 0x0001
|
||||
#define STUDIO_NF_CHROME 0x0002
|
||||
#define STUDIO_NF_FULLBRIGHT 0x0004
|
||||
|
||||
// motion flags
|
||||
#define STUDIO_X 0x0001
|
||||
#define STUDIO_Y 0x0002
|
||||
#define STUDIO_Z 0x0004
|
||||
#define STUDIO_XR 0x0008
|
||||
#define STUDIO_YR 0x0010
|
||||
#define STUDIO_ZR 0x0020
|
||||
#define STUDIO_LX 0x0040
|
||||
#define STUDIO_LY 0x0080
|
||||
#define STUDIO_LZ 0x0100
|
||||
#define STUDIO_AX 0x0200
|
||||
#define STUDIO_AY 0x0400
|
||||
#define STUDIO_AZ 0x0800
|
||||
#define STUDIO_AXR 0x1000
|
||||
#define STUDIO_AYR 0x2000
|
||||
#define STUDIO_AZR 0x4000
|
||||
#define STUDIO_TYPES 0x7FFF
|
||||
#define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance
|
||||
|
||||
// sequence flags
|
||||
#define STUDIO_LOOPING 0x0001
|
||||
|
||||
// bone flags
|
||||
#define STUDIO_HAS_NORMALS 0x0001
|
||||
#define STUDIO_HAS_VERTICES 0x0002
|
||||
#define STUDIO_HAS_BBOX 0x0004
|
||||
#define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them
|
||||
|
||||
#define RAD_TO_STUDIO (32768.0/M_PI)
|
||||
#define STUDIO_TO_RAD (M_PI/32768.0)
|
||||
|
||||
#endif
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _STUDIO_H_
|
||||
#define _STUDIO_H_
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
STUDIO MODELS
|
||||
|
||||
Studio models are position independent, so the cache manager can move them.
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
#define MAXSTUDIOTRIANGLES 20000 // TODO: tune this
|
||||
#define MAXSTUDIOVERTS 2048 // TODO: tune this
|
||||
#define MAXSTUDIOSEQUENCES 256 // total animation sequences
|
||||
#define MAXSTUDIOSKINS 100 // total textures
|
||||
#define MAXSTUDIOSRCBONES 512 // bones allowed at source movement
|
||||
#define MAXSTUDIOBONES 128 // total bones actually used
|
||||
#define MAXSTUDIOMODELS 32 // sub-models per model
|
||||
#define MAXSTUDIOBODYPARTS 32
|
||||
#define MAXSTUDIOGROUPS 16
|
||||
#define MAXSTUDIOANIMATIONS 512 // per sequence
|
||||
#define MAXSTUDIOMESHES 256
|
||||
#define MAXSTUDIOEVENTS 1024
|
||||
#define MAXSTUDIOPIVOTS 256
|
||||
#define MAXSTUDIOCONTROLLERS 8
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
int version;
|
||||
|
||||
char name[64];
|
||||
int length;
|
||||
|
||||
vec3_t eyeposition; // ideal eye position
|
||||
vec3_t min; // ideal movement hull size
|
||||
vec3_t max;
|
||||
|
||||
vec3_t bbmin; // clipping bounding box
|
||||
vec3_t bbmax;
|
||||
|
||||
int flags;
|
||||
|
||||
int numbones; // bones
|
||||
int boneindex;
|
||||
|
||||
int numbonecontrollers; // bone controllers
|
||||
int bonecontrollerindex;
|
||||
|
||||
int numhitboxes; // complex bounding boxes
|
||||
int hitboxindex;
|
||||
|
||||
int numseq; // animation sequences
|
||||
int seqindex;
|
||||
|
||||
int numseqgroups; // demand loaded sequences
|
||||
int seqgroupindex;
|
||||
|
||||
int numtextures; // raw textures
|
||||
int textureindex;
|
||||
int texturedataindex;
|
||||
|
||||
int numskinref; // replaceable textures
|
||||
int numskinfamilies;
|
||||
int skinindex;
|
||||
|
||||
int numbodyparts;
|
||||
int bodypartindex;
|
||||
|
||||
int numattachments; // queryable attachable points
|
||||
int attachmentindex;
|
||||
|
||||
int soundtable;
|
||||
int soundindex;
|
||||
int soundgroups;
|
||||
int soundgroupindex;
|
||||
|
||||
int numtransitions; // animation node to animation node transition graph
|
||||
int transitionindex;
|
||||
} studiohdr_t;
|
||||
|
||||
// header for demand loaded sequence group data
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
int version;
|
||||
|
||||
char name[64];
|
||||
int length;
|
||||
} studioseqhdr_t;
|
||||
|
||||
// bones
|
||||
typedef struct
|
||||
{
|
||||
char name[32]; // bone name for symbolic links
|
||||
int parent; // parent bone
|
||||
int flags; // ??
|
||||
int bonecontroller[6]; // bone controller index, -1 == none
|
||||
float value[6]; // default DoF values
|
||||
float scale[6]; // scale for delta DoF values
|
||||
} mstudiobone_t;
|
||||
|
||||
|
||||
// bone controllers
|
||||
typedef struct
|
||||
{
|
||||
int bone; // -1 == 0
|
||||
int type; // X, Y, Z, XR, YR, ZR, M
|
||||
float start;
|
||||
float end;
|
||||
int rest; // byte index value at rest
|
||||
int index; // 0-3 user set controller, 4 mouth
|
||||
} mstudiobonecontroller_t;
|
||||
|
||||
// intersection boxes
|
||||
typedef struct
|
||||
{
|
||||
int bone;
|
||||
int group; // intersection group
|
||||
vec3_t bbmin; // bounding box
|
||||
vec3_t bbmax;
|
||||
} mstudiobbox_t;
|
||||
|
||||
#if !defined( CACHE_USER ) && !defined( QUAKEDEF_H )
|
||||
#define CACHE_USER
|
||||
typedef struct cache_user_s
|
||||
{
|
||||
void *data;
|
||||
} cache_user_t;
|
||||
#endif
|
||||
|
||||
// demand loaded sequence groups
|
||||
typedef struct
|
||||
{
|
||||
char label[32]; // textual name
|
||||
char name[64]; // file name
|
||||
cache_user_t cache; // cache index pointer
|
||||
int data; // hack for group 0
|
||||
} mstudioseqgroup_t;
|
||||
|
||||
// sequence descriptions
|
||||
typedef struct
|
||||
{
|
||||
char label[32]; // sequence label
|
||||
|
||||
float fps; // frames per second
|
||||
int flags; // looping/non-looping flags
|
||||
|
||||
int activity;
|
||||
int actweight;
|
||||
|
||||
int numevents;
|
||||
int eventindex;
|
||||
|
||||
int numframes; // number of frames per sequence
|
||||
|
||||
int numpivots; // number of foot pivots
|
||||
int pivotindex;
|
||||
|
||||
int motiontype;
|
||||
int motionbone;
|
||||
vec3_t linearmovement;
|
||||
int automoveposindex;
|
||||
int automoveangleindex;
|
||||
|
||||
vec3_t bbmin; // per sequence bounding box
|
||||
vec3_t bbmax;
|
||||
|
||||
int numblends;
|
||||
int animindex; // mstudioanim_t pointer relative to start of sequence group data
|
||||
// [blend][bone][X, Y, Z, XR, YR, ZR]
|
||||
|
||||
int blendtype[2]; // X, Y, Z, XR, YR, ZR
|
||||
float blendstart[2]; // starting value
|
||||
float blendend[2]; // ending value
|
||||
int blendparent;
|
||||
|
||||
int seqgroup; // sequence group for demand loading
|
||||
|
||||
int entrynode; // transition node at entry
|
||||
int exitnode; // transition node at exit
|
||||
int nodeflags; // transition rules
|
||||
|
||||
int nextseq; // auto advancing sequences
|
||||
} mstudioseqdesc_t;
|
||||
|
||||
// events
|
||||
#include "studio_event.h"
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
int frame;
|
||||
int event;
|
||||
int type;
|
||||
char options[64];
|
||||
} mstudioevent_t;
|
||||
*/
|
||||
|
||||
// pivots
|
||||
typedef struct
|
||||
{
|
||||
vec3_t org; // pivot point
|
||||
int start;
|
||||
int end;
|
||||
} mstudiopivot_t;
|
||||
|
||||
// attachment
|
||||
typedef struct
|
||||
{
|
||||
char name[32];
|
||||
int type;
|
||||
int bone;
|
||||
vec3_t org; // attachment point
|
||||
vec3_t vectors[3];
|
||||
} mstudioattachment_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short offset[6];
|
||||
} mstudioanim_t;
|
||||
|
||||
// animation frames
|
||||
typedef union
|
||||
{
|
||||
struct {
|
||||
byte valid;
|
||||
byte total;
|
||||
} num;
|
||||
short value;
|
||||
} mstudioanimvalue_t;
|
||||
|
||||
|
||||
|
||||
// body part index
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
int nummodels;
|
||||
int base;
|
||||
int modelindex; // index into models array
|
||||
} mstudiobodyparts_t;
|
||||
|
||||
|
||||
|
||||
// skin info
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
int flags;
|
||||
int width;
|
||||
int height;
|
||||
int index;
|
||||
} mstudiotexture_t;
|
||||
|
||||
|
||||
// skin families
|
||||
// short index[skinfamilies][skinref]
|
||||
|
||||
// studio models
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
|
||||
int type;
|
||||
|
||||
float boundingradius;
|
||||
|
||||
int nummesh;
|
||||
int meshindex;
|
||||
|
||||
int numverts; // number of unique vertices
|
||||
int vertinfoindex; // vertex bone info
|
||||
int vertindex; // vertex vec3_t
|
||||
int numnorms; // number of unique surface normals
|
||||
int norminfoindex; // normal bone info
|
||||
int normindex; // normal vec3_t
|
||||
|
||||
int numgroups; // deformation groups
|
||||
int groupindex;
|
||||
} mstudiomodel_t;
|
||||
|
||||
|
||||
// vec3_t boundingbox[model][bone][2]; // complex intersection info
|
||||
|
||||
|
||||
// meshes
|
||||
typedef struct
|
||||
{
|
||||
int numtris;
|
||||
int triindex;
|
||||
int skinref;
|
||||
int numnorms; // per mesh normals
|
||||
int normindex; // normal vec3_t
|
||||
} mstudiomesh_t;
|
||||
|
||||
// triangles
|
||||
#if 0
|
||||
typedef struct
|
||||
{
|
||||
short vertindex; // index into vertex array
|
||||
short normindex; // index into normal array
|
||||
short s,t; // s,t position on skin
|
||||
} mstudiotrivert_t;
|
||||
#endif
|
||||
|
||||
// lighting options
|
||||
#define STUDIO_NF_FLATSHADE 0x0001
|
||||
#define STUDIO_NF_CHROME 0x0002
|
||||
#define STUDIO_NF_FULLBRIGHT 0x0004
|
||||
|
||||
// motion flags
|
||||
#define STUDIO_X 0x0001
|
||||
#define STUDIO_Y 0x0002
|
||||
#define STUDIO_Z 0x0004
|
||||
#define STUDIO_XR 0x0008
|
||||
#define STUDIO_YR 0x0010
|
||||
#define STUDIO_ZR 0x0020
|
||||
#define STUDIO_LX 0x0040
|
||||
#define STUDIO_LY 0x0080
|
||||
#define STUDIO_LZ 0x0100
|
||||
#define STUDIO_AX 0x0200
|
||||
#define STUDIO_AY 0x0400
|
||||
#define STUDIO_AZ 0x0800
|
||||
#define STUDIO_AXR 0x1000
|
||||
#define STUDIO_AYR 0x2000
|
||||
#define STUDIO_AZR 0x4000
|
||||
#define STUDIO_TYPES 0x7FFF
|
||||
#define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance
|
||||
|
||||
// sequence flags
|
||||
#define STUDIO_LOOPING 0x0001
|
||||
|
||||
// bone flags
|
||||
#define STUDIO_HAS_NORMALS 0x0001
|
||||
#define STUDIO_HAS_VERTICES 0x0002
|
||||
#define STUDIO_HAS_BBOX 0x0004
|
||||
#define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them
|
||||
|
||||
#define RAD_TO_STUDIO (32768.0/M_PI)
|
||||
#define STUDIO_TO_RAD (M_PI/32768.0)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user