mirror of
https://github.com/id-Software/DOOM-3.git
synced 2026-03-19 16:39:27 +01:00
hello world
This commit is contained in:
2626
neo/d3xp/gamesys/Callbacks.cpp
Normal file
2626
neo/d3xp/gamesys/Callbacks.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1068
neo/d3xp/gamesys/Class.cpp
Normal file
1068
neo/d3xp/gamesys/Class.cpp
Normal file
File diff suppressed because it is too large
Load Diff
357
neo/d3xp/gamesys/Class.h
Normal file
357
neo/d3xp/gamesys/Class.h
Normal file
@@ -0,0 +1,357 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
/*
|
||||
|
||||
Base class for all game objects. Provides fast run-time type checking and run-time
|
||||
instancing of objects.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __SYS_CLASS_H__
|
||||
#define __SYS_CLASS_H__
|
||||
|
||||
class idClass;
|
||||
class idTypeInfo;
|
||||
|
||||
extern const idEventDef EV_Remove;
|
||||
extern const idEventDef EV_SafeRemove;
|
||||
|
||||
typedef void ( idClass::*eventCallback_t )( void );
|
||||
|
||||
template< class Type >
|
||||
struct idEventFunc {
|
||||
const idEventDef *event;
|
||||
eventCallback_t function;
|
||||
};
|
||||
|
||||
// added & so gcc could compile this
|
||||
#define EVENT( event, function ) { &( event ), ( void ( idClass::* )( void ) )( &function ) },
|
||||
#define END_CLASS { NULL, NULL } };
|
||||
|
||||
|
||||
class idEventArg {
|
||||
public:
|
||||
int type;
|
||||
int value;
|
||||
|
||||
idEventArg() { type = D_EVENT_INTEGER; value = 0; };
|
||||
idEventArg( int data ) { type = D_EVENT_INTEGER; value = data; };
|
||||
idEventArg( float data ) { type = D_EVENT_FLOAT; value = *reinterpret_cast<int *>( &data ); };
|
||||
idEventArg( idVec3 &data ) { type = D_EVENT_VECTOR; value = reinterpret_cast<int>( &data ); };
|
||||
idEventArg( const idStr &data ) { type = D_EVENT_STRING; value = reinterpret_cast<int>( data.c_str() ); };
|
||||
idEventArg( const char *data ) { type = D_EVENT_STRING; value = reinterpret_cast<int>( data ); };
|
||||
idEventArg( const class idEntity *data ) { type = D_EVENT_ENTITY; value = reinterpret_cast<int>( data ); };
|
||||
idEventArg( const struct trace_s *data ) { type = D_EVENT_TRACE; value = reinterpret_cast<int>( data ); };
|
||||
};
|
||||
|
||||
class idAllocError : public idException {
|
||||
public:
|
||||
idAllocError( const char *text = "" ) : idException( text ) {}
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
|
||||
idClass
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
/*
|
||||
================
|
||||
CLASS_PROTOTYPE
|
||||
|
||||
This macro must be included in the definition of any subclass of idClass.
|
||||
It prototypes variables used in class instanciation and type checking.
|
||||
Use this on single inheritance concrete classes only.
|
||||
================
|
||||
*/
|
||||
#define CLASS_PROTOTYPE( nameofclass ) \
|
||||
public: \
|
||||
static idTypeInfo Type; \
|
||||
static idClass *CreateInstance( void ); \
|
||||
virtual idTypeInfo *GetType( void ) const; \
|
||||
static idEventFunc<nameofclass> eventCallbacks[]
|
||||
|
||||
/*
|
||||
================
|
||||
CLASS_DECLARATION
|
||||
|
||||
This macro must be included in the code to properly initialize variables
|
||||
used in type checking and run-time instanciation. It also defines the list
|
||||
of events that the class responds to. Take special care to ensure that the
|
||||
proper superclass is indicated or the run-time type information will be
|
||||
incorrect. Use this on concrete classes only.
|
||||
================
|
||||
*/
|
||||
#define CLASS_DECLARATION( nameofsuperclass, nameofclass ) \
|
||||
idTypeInfo nameofclass::Type( #nameofclass, #nameofsuperclass, \
|
||||
( idEventFunc<idClass> * )nameofclass::eventCallbacks, nameofclass::CreateInstance, ( void ( idClass::* )( void ) )&nameofclass::Spawn, \
|
||||
( void ( idClass::* )( idSaveGame * ) const )&nameofclass::Save, ( void ( idClass::* )( idRestoreGame * ) )&nameofclass::Restore ); \
|
||||
idClass *nameofclass::CreateInstance( void ) { \
|
||||
try { \
|
||||
nameofclass *ptr = new nameofclass; \
|
||||
ptr->FindUninitializedMemory(); \
|
||||
return ptr; \
|
||||
} \
|
||||
catch( idAllocError & ) { \
|
||||
return NULL; \
|
||||
} \
|
||||
} \
|
||||
idTypeInfo *nameofclass::GetType( void ) const { \
|
||||
return &( nameofclass::Type ); \
|
||||
} \
|
||||
idEventFunc<nameofclass> nameofclass::eventCallbacks[] = {
|
||||
|
||||
/*
|
||||
================
|
||||
ABSTRACT_PROTOTYPE
|
||||
|
||||
This macro must be included in the definition of any abstract subclass of idClass.
|
||||
It prototypes variables used in class instanciation and type checking.
|
||||
Use this on single inheritance abstract classes only.
|
||||
================
|
||||
*/
|
||||
#define ABSTRACT_PROTOTYPE( nameofclass ) \
|
||||
public: \
|
||||
static idTypeInfo Type; \
|
||||
static idClass *CreateInstance( void ); \
|
||||
virtual idTypeInfo *GetType( void ) const; \
|
||||
static idEventFunc<nameofclass> eventCallbacks[]
|
||||
|
||||
/*
|
||||
================
|
||||
ABSTRACT_DECLARATION
|
||||
|
||||
This macro must be included in the code to properly initialize variables
|
||||
used in type checking. It also defines the list of events that the class
|
||||
responds to. Take special care to ensure that the proper superclass is
|
||||
indicated or the run-time tyep information will be incorrect. Use this
|
||||
on abstract classes only.
|
||||
================
|
||||
*/
|
||||
#define ABSTRACT_DECLARATION( nameofsuperclass, nameofclass ) \
|
||||
idTypeInfo nameofclass::Type( #nameofclass, #nameofsuperclass, \
|
||||
( idEventFunc<idClass> * )nameofclass::eventCallbacks, nameofclass::CreateInstance, ( void ( idClass::* )( void ) )&nameofclass::Spawn, \
|
||||
( void ( idClass::* )( idSaveGame * ) const )&nameofclass::Save, ( void ( idClass::* )( idRestoreGame * ) )&nameofclass::Restore ); \
|
||||
idClass *nameofclass::CreateInstance( void ) { \
|
||||
gameLocal.Error( "Cannot instanciate abstract class %s.", #nameofclass ); \
|
||||
return NULL; \
|
||||
} \
|
||||
idTypeInfo *nameofclass::GetType( void ) const { \
|
||||
return &( nameofclass::Type ); \
|
||||
} \
|
||||
idEventFunc<nameofclass> nameofclass::eventCallbacks[] = {
|
||||
|
||||
typedef void ( idClass::*classSpawnFunc_t )( void );
|
||||
|
||||
class idSaveGame;
|
||||
class idRestoreGame;
|
||||
|
||||
class idClass {
|
||||
public:
|
||||
ABSTRACT_PROTOTYPE( idClass );
|
||||
|
||||
#ifdef ID_REDIRECT_NEWDELETE
|
||||
#undef new
|
||||
#endif
|
||||
void * operator new( size_t );
|
||||
void * operator new( size_t s, int, int, char *, int );
|
||||
void operator delete( void * );
|
||||
void operator delete( void *, int, int, char *, int );
|
||||
#ifdef ID_REDIRECT_NEWDELETE
|
||||
#define new ID_DEBUG_NEW
|
||||
#endif
|
||||
|
||||
virtual ~idClass();
|
||||
|
||||
void Spawn( void );
|
||||
void CallSpawn( void );
|
||||
bool IsType( const idTypeInfo &c ) const;
|
||||
const char * GetClassname( void ) const;
|
||||
const char * GetSuperclass( void ) const;
|
||||
void FindUninitializedMemory( void );
|
||||
|
||||
void Save( idSaveGame *savefile ) const {};
|
||||
void Restore( idRestoreGame *savefile ) {};
|
||||
|
||||
bool RespondsTo( const idEventDef &ev ) const;
|
||||
|
||||
bool PostEventMS( const idEventDef *ev, int time );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7 );
|
||||
bool PostEventMS( const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8 );
|
||||
|
||||
bool PostEventSec( const idEventDef *ev, float time );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7 );
|
||||
bool PostEventSec( const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8 );
|
||||
|
||||
bool ProcessEvent( const idEventDef *ev );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8 );
|
||||
|
||||
bool ProcessEventArgPtr( const idEventDef *ev, int *data );
|
||||
void CancelEvents( const idEventDef *ev );
|
||||
|
||||
void Event_Remove( void );
|
||||
|
||||
// Static functions
|
||||
static void Init( void );
|
||||
static void Shutdown( void );
|
||||
static idTypeInfo * GetClass( const char *name );
|
||||
static void DisplayInfo_f( const idCmdArgs &args );
|
||||
static void ListClasses_f( const idCmdArgs &args );
|
||||
static idClass * CreateInstance( const char *name );
|
||||
static int GetNumTypes( void ) { return types.Num(); }
|
||||
static int GetTypeNumBits( void ) { return typeNumBits; }
|
||||
static idTypeInfo * GetType( int num );
|
||||
|
||||
private:
|
||||
classSpawnFunc_t CallSpawnFunc( idTypeInfo *cls );
|
||||
|
||||
bool PostEventArgs( const idEventDef *ev, int time, int numargs, ... );
|
||||
bool ProcessEventArgs( const idEventDef *ev, int numargs, ... );
|
||||
|
||||
void Event_SafeRemove( void );
|
||||
|
||||
static bool initialized;
|
||||
static idList<idTypeInfo *> types;
|
||||
static idList<idTypeInfo *> typenums;
|
||||
static int typeNumBits;
|
||||
static int memused;
|
||||
static int numobjects;
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
|
||||
idTypeInfo
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
class idTypeInfo {
|
||||
public:
|
||||
const char * classname;
|
||||
const char * superclass;
|
||||
idClass * ( *CreateInstance )( void );
|
||||
void ( idClass::*Spawn )( void );
|
||||
void ( idClass::*Save )( idSaveGame *savefile ) const;
|
||||
void ( idClass::*Restore )( idRestoreGame *savefile );
|
||||
|
||||
idEventFunc<idClass> * eventCallbacks;
|
||||
eventCallback_t * eventMap;
|
||||
idTypeInfo * super;
|
||||
idTypeInfo * next;
|
||||
bool freeEventMap;
|
||||
int typeNum;
|
||||
int lastChild;
|
||||
|
||||
idHierarchy<idTypeInfo> node;
|
||||
|
||||
idTypeInfo( const char *classname, const char *superclass,
|
||||
idEventFunc<idClass> *eventCallbacks, idClass *( *CreateInstance )( void ), void ( idClass::*Spawn )( void ),
|
||||
void ( idClass::*Save )( idSaveGame *savefile ) const, void ( idClass::*Restore )( idRestoreGame *savefile ) );
|
||||
~idTypeInfo();
|
||||
|
||||
void Init( void );
|
||||
void Shutdown( void );
|
||||
|
||||
bool IsType( const idTypeInfo &superclass ) const;
|
||||
bool RespondsTo( const idEventDef &ev ) const;
|
||||
};
|
||||
|
||||
/*
|
||||
================
|
||||
idTypeInfo::IsType
|
||||
|
||||
Checks if the object's class is a subclass of the class defined by the
|
||||
passed in idTypeInfo.
|
||||
================
|
||||
*/
|
||||
ID_INLINE bool idTypeInfo::IsType( const idTypeInfo &type ) const {
|
||||
return ( ( typeNum >= type.typeNum ) && ( typeNum <= type.lastChild ) );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idTypeInfo::RespondsTo
|
||||
================
|
||||
*/
|
||||
ID_INLINE bool idTypeInfo::RespondsTo( const idEventDef &ev ) const {
|
||||
assert( idEvent::initialized );
|
||||
if ( !eventMap[ ev.GetEventNum() ] ) {
|
||||
// we don't respond to this event
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idClass::IsType
|
||||
|
||||
Checks if the object's class is a subclass of the class defined by the
|
||||
passed in idTypeInfo.
|
||||
================
|
||||
*/
|
||||
ID_INLINE bool idClass::IsType( const idTypeInfo &superclass ) const {
|
||||
idTypeInfo *subclass;
|
||||
|
||||
subclass = GetType();
|
||||
return subclass->IsType( superclass );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idClass::RespondsTo
|
||||
================
|
||||
*/
|
||||
ID_INLINE bool idClass::RespondsTo( const idEventDef &ev ) const {
|
||||
const idTypeInfo *c;
|
||||
|
||||
assert( idEvent::initialized );
|
||||
c = GetType();
|
||||
return c->RespondsTo( ev );
|
||||
}
|
||||
|
||||
#endif /* !__SYS_CLASS_H__ */
|
||||
92
neo/d3xp/gamesys/DebugGraph.cpp
Normal file
92
neo/d3xp/gamesys/DebugGraph.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
#include "../../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "../Game_local.h"
|
||||
|
||||
/*
|
||||
================
|
||||
idDebugGraph::idDebugGraph
|
||||
================
|
||||
*/
|
||||
idDebugGraph::idDebugGraph() {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idDebugGraph::SetNumSamples
|
||||
================
|
||||
*/
|
||||
void idDebugGraph::SetNumSamples( int num ) {
|
||||
index = 0;
|
||||
samples.Clear();
|
||||
samples.SetNum( num );
|
||||
memset( samples.Ptr(), 0, samples.MemoryUsed() );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idDebugGraph::AddValue
|
||||
================
|
||||
*/
|
||||
void idDebugGraph::AddValue( float value ) {
|
||||
samples[ index ] = value;
|
||||
index++;
|
||||
if ( index >= samples.Num() ) {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idDebugGraph::Draw
|
||||
================
|
||||
*/
|
||||
void idDebugGraph::Draw( const idVec4 &color, float scale ) const {
|
||||
int i;
|
||||
float value1;
|
||||
float value2;
|
||||
idVec3 vec1;
|
||||
idVec3 vec2;
|
||||
|
||||
const idMat3 &axis = gameLocal.GetLocalPlayer()->viewAxis;
|
||||
const idVec3 pos = gameLocal.GetLocalPlayer()->GetPhysics()->GetOrigin() + axis[ 1 ] * samples.Num() * 0.5f;
|
||||
|
||||
value1 = samples[ index ] * scale;
|
||||
for( i = 1; i < samples.Num(); i++ ) {
|
||||
value2 = samples[ ( i + index ) % samples.Num() ] * scale;
|
||||
|
||||
vec1 = pos + axis[ 2 ] * value1 - axis[ 1 ] * ( i - 1 ) + axis[ 0 ] * samples.Num();
|
||||
vec2 = pos + axis[ 2 ] * value2 - axis[ 1 ] * i + axis[ 0 ] * samples.Num();
|
||||
|
||||
gameRenderWorld->DebugLine( color, vec1, vec2, gameLocal.msec, false );
|
||||
value1 = value2;
|
||||
}
|
||||
}
|
||||
39
neo/d3xp/gamesys/DebugGraph.h
Normal file
39
neo/d3xp/gamesys/DebugGraph.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
class idDebugGraph {
|
||||
public:
|
||||
idDebugGraph();
|
||||
void SetNumSamples( int num );
|
||||
void AddValue( float value );
|
||||
void Draw( const idVec4 &color, float scale ) const;
|
||||
|
||||
private:
|
||||
idList<float> samples;
|
||||
int index;
|
||||
};
|
||||
1068
neo/d3xp/gamesys/Event.cpp
Normal file
1068
neo/d3xp/gamesys/Event.cpp
Normal file
File diff suppressed because it is too large
Load Diff
212
neo/d3xp/gamesys/Event.h
Normal file
212
neo/d3xp/gamesys/Event.h
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
/*
|
||||
sys_event.h
|
||||
|
||||
Event are used for scheduling tasks and for linking script commands.
|
||||
*/
|
||||
#ifndef __SYS_EVENT_H__
|
||||
#define __SYS_EVENT_H__
|
||||
|
||||
#define D_EVENT_MAXARGS 8 // if changed, enable the CREATE_EVENT_CODE define in Event.cpp to generate switch statement for idClass::ProcessEventArgPtr.
|
||||
// running the game will then generate c:\doom\base\events.txt, the contents of which should be copied into the switch statement.
|
||||
|
||||
#define D_EVENT_VOID ( ( char )0 )
|
||||
#define D_EVENT_INTEGER 'd'
|
||||
#define D_EVENT_FLOAT 'f'
|
||||
#define D_EVENT_VECTOR 'v'
|
||||
#define D_EVENT_STRING 's'
|
||||
#define D_EVENT_ENTITY 'e'
|
||||
#define D_EVENT_ENTITY_NULL 'E' // event can handle NULL entity pointers
|
||||
#define D_EVENT_TRACE 't'
|
||||
|
||||
#define MAX_EVENTS 4096
|
||||
|
||||
class idClass;
|
||||
class idTypeInfo;
|
||||
|
||||
class idEventDef {
|
||||
private:
|
||||
const char *name;
|
||||
const char *formatspec;
|
||||
unsigned int formatspecIndex;
|
||||
int returnType;
|
||||
int numargs;
|
||||
size_t argsize;
|
||||
int argOffset[ D_EVENT_MAXARGS ];
|
||||
int eventnum;
|
||||
const idEventDef * next;
|
||||
|
||||
static idEventDef * eventDefList[MAX_EVENTS];
|
||||
static int numEventDefs;
|
||||
|
||||
public:
|
||||
idEventDef( const char *command, const char *formatspec = NULL, char returnType = 0 );
|
||||
|
||||
const char *GetName( void ) const;
|
||||
const char *GetArgFormat( void ) const;
|
||||
unsigned int GetFormatspecIndex( void ) const;
|
||||
char GetReturnType( void ) const;
|
||||
int GetEventNum( void ) const;
|
||||
int GetNumArgs( void ) const;
|
||||
size_t GetArgSize( void ) const;
|
||||
int GetArgOffset( int arg ) const;
|
||||
|
||||
static int NumEventCommands( void );
|
||||
static const idEventDef *GetEventCommand( int eventnum );
|
||||
static const idEventDef *FindEvent( const char *name );
|
||||
};
|
||||
|
||||
class idSaveGame;
|
||||
class idRestoreGame;
|
||||
|
||||
class idEvent {
|
||||
private:
|
||||
const idEventDef *eventdef;
|
||||
byte *data;
|
||||
int time;
|
||||
idClass *object;
|
||||
const idTypeInfo *typeinfo;
|
||||
|
||||
idLinkList<idEvent> eventNode;
|
||||
|
||||
static idDynamicBlockAlloc<byte, 16 * 1024, 256> eventDataAllocator;
|
||||
|
||||
|
||||
public:
|
||||
static bool initialized;
|
||||
|
||||
~idEvent();
|
||||
|
||||
static idEvent *Alloc( const idEventDef *evdef, int numargs, va_list args );
|
||||
static void CopyArgs( const idEventDef *evdef, int numargs, va_list args, int data[ D_EVENT_MAXARGS ] );
|
||||
|
||||
void Free( void );
|
||||
void Schedule( idClass *object, const idTypeInfo *cls, int time );
|
||||
byte *GetData( void );
|
||||
|
||||
static void CancelEvents( const idClass *obj, const idEventDef *evdef = NULL );
|
||||
static void ClearEventList( void );
|
||||
static void ServiceEvents( void );
|
||||
#ifdef _D3XP
|
||||
static void ServiceFastEvents();
|
||||
#endif
|
||||
static void Init( void );
|
||||
static void Shutdown( void );
|
||||
|
||||
// save games
|
||||
static void Save( idSaveGame *savefile ); // archives object for save game file
|
||||
static void Restore( idRestoreGame *savefile ); // unarchives object from save game file
|
||||
static void SaveTrace( idSaveGame *savefile, const trace_t &trace );
|
||||
static void RestoreTrace( idRestoreGame *savefile, trace_t &trace );
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
================
|
||||
idEvent::GetData
|
||||
================
|
||||
*/
|
||||
ID_INLINE byte *idEvent::GetData( void ) {
|
||||
return data;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetName
|
||||
================
|
||||
*/
|
||||
ID_INLINE const char *idEventDef::GetName( void ) const {
|
||||
return name;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetArgFormat
|
||||
================
|
||||
*/
|
||||
ID_INLINE const char *idEventDef::GetArgFormat( void ) const {
|
||||
return formatspec;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetFormatspecIndex
|
||||
================
|
||||
*/
|
||||
ID_INLINE unsigned int idEventDef::GetFormatspecIndex( void ) const {
|
||||
return formatspecIndex;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetReturnType
|
||||
================
|
||||
*/
|
||||
ID_INLINE char idEventDef::GetReturnType( void ) const {
|
||||
return returnType;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetNumArgs
|
||||
================
|
||||
*/
|
||||
ID_INLINE int idEventDef::GetNumArgs( void ) const {
|
||||
return numargs;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetArgSize
|
||||
================
|
||||
*/
|
||||
ID_INLINE size_t idEventDef::GetArgSize( void ) const {
|
||||
return argsize;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetArgOffset
|
||||
================
|
||||
*/
|
||||
ID_INLINE int idEventDef::GetArgOffset( int arg ) const {
|
||||
assert( ( arg >= 0 ) && ( arg < D_EVENT_MAXARGS ) );
|
||||
return argOffset[ arg ];
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idEventDef::GetEventNum
|
||||
================
|
||||
*/
|
||||
ID_INLINE int idEventDef::GetEventNum( void ) const {
|
||||
return eventnum;
|
||||
}
|
||||
|
||||
#endif /* !__SYS_EVENT_H__ */
|
||||
83
neo/d3xp/gamesys/NoGameTypeInfo.h
Normal file
83
neo/d3xp/gamesys/NoGameTypeInfo.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __GAMETYPEINFO_H__
|
||||
#define __GAMETYPEINFO_H__
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
|
||||
This file has been generated with the Type Info Generator v1.0 (c) 2004 id Software
|
||||
|
||||
===================================================================================
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
const char * name;
|
||||
const char * type;
|
||||
const char * value;
|
||||
} constantInfo_t;
|
||||
|
||||
typedef struct {
|
||||
const char * name;
|
||||
int value;
|
||||
} enumValueInfo_t;
|
||||
|
||||
typedef struct {
|
||||
const char * typeName;
|
||||
const enumValueInfo_t * values;
|
||||
} enumTypeInfo_t;
|
||||
|
||||
typedef struct {
|
||||
const char * type;
|
||||
const char * name;
|
||||
int offset;
|
||||
int size;
|
||||
} classVariableInfo_t;
|
||||
|
||||
typedef struct {
|
||||
const char * typeName;
|
||||
const char * superType;
|
||||
int size;
|
||||
const classVariableInfo_t * variables;
|
||||
} classTypeInfo_t;
|
||||
|
||||
|
||||
static constantInfo_t constantInfo[] = {
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
static enumTypeInfo_t enumTypeInfo[] = {
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
static classTypeInfo_t classTypeInfo[] = {
|
||||
{ NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
#endif /* !__GAMETYPEINFO_H__ */
|
||||
1557
neo/d3xp/gamesys/SaveGame.cpp
Normal file
1557
neo/d3xp/gamesys/SaveGame.cpp
Normal file
File diff suppressed because it is too large
Load Diff
164
neo/d3xp/gamesys/SaveGame.h
Normal file
164
neo/d3xp/gamesys/SaveGame.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __SAVEGAME_H__
|
||||
#define __SAVEGAME_H__
|
||||
|
||||
/*
|
||||
|
||||
Save game related helper classes.
|
||||
|
||||
*/
|
||||
|
||||
const int INITIAL_RELEASE_BUILD_NUMBER = 1262;
|
||||
|
||||
class idSaveGame {
|
||||
public:
|
||||
idSaveGame( idFile *savefile );
|
||||
~idSaveGame();
|
||||
|
||||
void Close( void );
|
||||
|
||||
void AddObject( const idClass *obj );
|
||||
void WriteObjectList( void );
|
||||
|
||||
void Write( const void *buffer, int len );
|
||||
void WriteInt( const int value );
|
||||
void WriteJoint( const jointHandle_t value );
|
||||
void WriteShort( const short value );
|
||||
void WriteByte( const byte value );
|
||||
void WriteSignedChar( const signed char value );
|
||||
void WriteFloat( const float value );
|
||||
void WriteBool( const bool value );
|
||||
void WriteString( const char *string );
|
||||
void WriteVec2( const idVec2 &vec );
|
||||
void WriteVec3( const idVec3 &vec );
|
||||
void WriteVec4( const idVec4 &vec );
|
||||
void WriteVec6( const idVec6 &vec );
|
||||
void WriteWinding( const idWinding &winding );
|
||||
void WriteBounds( const idBounds &bounds );
|
||||
void WriteMat3( const idMat3 &mat );
|
||||
void WriteAngles( const idAngles &angles );
|
||||
void WriteObject( const idClass *obj );
|
||||
void WriteStaticObject( const idClass &obj );
|
||||
void WriteDict( const idDict *dict );
|
||||
void WriteMaterial( const idMaterial *material );
|
||||
void WriteSkin( const idDeclSkin *skin );
|
||||
void WriteParticle( const idDeclParticle *particle );
|
||||
void WriteFX( const idDeclFX *fx );
|
||||
void WriteSoundShader( const idSoundShader *shader );
|
||||
void WriteModelDef( const class idDeclModelDef *modelDef );
|
||||
void WriteModel( const idRenderModel *model );
|
||||
void WriteUserInterface( const idUserInterface *ui, bool unique );
|
||||
void WriteRenderEntity( const renderEntity_t &renderEntity );
|
||||
void WriteRenderLight( const renderLight_t &renderLight );
|
||||
void WriteRefSound( const refSound_t &refSound );
|
||||
void WriteRenderView( const renderView_t &view );
|
||||
void WriteUsercmd( const usercmd_t &usercmd );
|
||||
void WriteContactInfo( const contactInfo_t &contactInfo );
|
||||
void WriteTrace( const trace_t &trace );
|
||||
void WriteTraceModel( const idTraceModel &trace );
|
||||
void WriteClipModel( const class idClipModel *clipModel );
|
||||
void WriteSoundCommands( void );
|
||||
|
||||
void WriteBuildNumber( const int value );
|
||||
|
||||
private:
|
||||
idFile * file;
|
||||
|
||||
idList<const idClass *> objects;
|
||||
|
||||
void CallSave_r( const idTypeInfo *cls, const idClass *obj );
|
||||
};
|
||||
|
||||
class idRestoreGame {
|
||||
public:
|
||||
idRestoreGame( idFile *savefile );
|
||||
~idRestoreGame();
|
||||
|
||||
void CreateObjects( void );
|
||||
void RestoreObjects( void );
|
||||
void DeleteObjects( void );
|
||||
|
||||
void Error( const char *fmt, ... ) id_attribute((format(printf,2,3)));
|
||||
|
||||
void Read( void *buffer, int len );
|
||||
void ReadInt( int &value );
|
||||
void ReadJoint( jointHandle_t &value );
|
||||
void ReadShort( short &value );
|
||||
void ReadByte( byte &value );
|
||||
void ReadSignedChar( signed char &value );
|
||||
void ReadFloat( float &value );
|
||||
void ReadBool( bool &value );
|
||||
void ReadString( idStr &string );
|
||||
void ReadVec2( idVec2 &vec );
|
||||
void ReadVec3( idVec3 &vec );
|
||||
void ReadVec4( idVec4 &vec );
|
||||
void ReadVec6( idVec6 &vec );
|
||||
void ReadWinding( idWinding &winding );
|
||||
void ReadBounds( idBounds &bounds );
|
||||
void ReadMat3( idMat3 &mat );
|
||||
void ReadAngles( idAngles &angles );
|
||||
void ReadObject( idClass *&obj );
|
||||
void ReadStaticObject( idClass &obj );
|
||||
void ReadDict( idDict *dict );
|
||||
void ReadMaterial( const idMaterial *&material );
|
||||
void ReadSkin( const idDeclSkin *&skin );
|
||||
void ReadParticle( const idDeclParticle *&particle );
|
||||
void ReadFX( const idDeclFX *&fx );
|
||||
void ReadSoundShader( const idSoundShader *&shader );
|
||||
void ReadModelDef( const idDeclModelDef *&modelDef );
|
||||
void ReadModel( idRenderModel *&model );
|
||||
void ReadUserInterface( idUserInterface *&ui );
|
||||
void ReadRenderEntity( renderEntity_t &renderEntity );
|
||||
void ReadRenderLight( renderLight_t &renderLight );
|
||||
void ReadRefSound( refSound_t &refSound );
|
||||
void ReadRenderView( renderView_t &view );
|
||||
void ReadUsercmd( usercmd_t &usercmd );
|
||||
void ReadContactInfo( contactInfo_t &contactInfo );
|
||||
void ReadTrace( trace_t &trace );
|
||||
void ReadTraceModel( idTraceModel &trace );
|
||||
void ReadClipModel( idClipModel *&clipModel );
|
||||
void ReadSoundCommands( void );
|
||||
|
||||
void ReadBuildNumber( void );
|
||||
|
||||
// Used to retrieve the saved game buildNumber from within class Restore methods
|
||||
int GetBuildNumber( void );
|
||||
|
||||
private:
|
||||
int buildNumber;
|
||||
|
||||
idFile * file;
|
||||
|
||||
idList<idClass *> objects;
|
||||
|
||||
void CallRestore_r( const idTypeInfo *cls, idClass *obj );
|
||||
};
|
||||
|
||||
#endif /* !__SAVEGAME_H__*/
|
||||
2510
neo/d3xp/gamesys/SysCmds.cpp
Normal file
2510
neo/d3xp/gamesys/SysCmds.cpp
Normal file
File diff suppressed because it is too large
Load Diff
34
neo/d3xp/gamesys/SysCmds.h
Normal file
34
neo/d3xp/gamesys/SysCmds.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __SYS_CMDS_H__
|
||||
#define __SYS_CMDS_H__
|
||||
|
||||
void D_DrawDebugLines( void );
|
||||
|
||||
#endif /* !__SYS_CMDS_H__ */
|
||||
415
neo/d3xp/gamesys/SysCvar.cpp
Normal file
415
neo/d3xp/gamesys/SysCvar.cpp
Normal file
@@ -0,0 +1,415 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "../../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "../Game_local.h"
|
||||
|
||||
#if defined( _DEBUG )
|
||||
#define BUILD_DEBUG "-debug"
|
||||
#else
|
||||
#define BUILD_DEBUG "-release"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
All game cvars should be defined here.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef CTF
|
||||
const char *si_gameTypeArgs[] = { "singleplayer", "deathmatch", "Tourney", "Team DM", "Last Man", "CTF", NULL };
|
||||
#else
|
||||
const char *si_gameTypeArgs[] = { "singleplayer", "deathmatch", "Tourney", "Team DM", "Last Man", NULL };
|
||||
#endif
|
||||
|
||||
const char *si_readyArgs[] = { "Not Ready", "Ready", NULL };
|
||||
const char *si_spectateArgs[] = { "Play", "Spectate", NULL };
|
||||
|
||||
#ifdef _D3XP
|
||||
const char *ui_skinArgs[] = { "skins/characters/player/marine_mp", "skins/characters/player/marine_mp_red", "skins/characters/player/marine_mp_blue", "skins/characters/player/marine_mp_green", "skins/characters/player/marine_mp_yellow", "skins/characters/player/marine_mp_purple", "skins/characters/player/marine_mp_grey", "skins/characters/player/marine_mp_orange", NULL };
|
||||
#else
|
||||
const char *ui_skinArgs[] = { "skins/characters/player/marine_mp", "skins/characters/player/marine_mp_red", "skins/characters/player/marine_mp_blue", "skins/characters/player/marine_mp_green", "skins/characters/player/marine_mp_yellow", NULL };
|
||||
#endif
|
||||
|
||||
const char *ui_teamArgs[] = { "Red", "Blue", NULL };
|
||||
|
||||
struct gameVersion_s {
|
||||
gameVersion_s( void ) { sprintf( string, "%s.%d%s %s %s", ENGINE_VERSION, BUILD_NUMBER, BUILD_DEBUG, BUILD_STRING, __DATE__, __TIME__ ); }
|
||||
char string[256];
|
||||
} gameVersion;
|
||||
|
||||
idCVar g_version( "g_version", gameVersion.string, CVAR_GAME | CVAR_ROM, "game version" );
|
||||
|
||||
// noset vars
|
||||
idCVar gamename( "gamename", GAME_VERSION, CVAR_GAME | CVAR_SERVERINFO | CVAR_ROM, "" );
|
||||
idCVar gamedate( "gamedate", __DATE__, CVAR_GAME | CVAR_ROM, "" );
|
||||
|
||||
// server info
|
||||
idCVar si_name( "si_name", "DOOM Server", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE, "name of the server" );
|
||||
|
||||
#ifdef CTF
|
||||
idCVar si_gameType( "si_gameType", si_gameTypeArgs[ 0 ], CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE, "game type - singleplayer, deathmatch, Tourney, Team DM, Last Man or CTF", si_gameTypeArgs, idCmdSystem::ArgCompletion_String<si_gameTypeArgs> );
|
||||
#else
|
||||
idCVar si_gameType( "si_gameType", si_gameTypeArgs[ 0 ], CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE, "game type - singleplayer, deathmatch, Tourney, Team DM or Last Man", si_gameTypeArgs, idCmdSystem::ArgCompletion_String<si_gameTypeArgs> );
|
||||
#endif
|
||||
|
||||
idCVar si_map( "si_map", "game/mp/d3dm1",CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE, "map to be played next on server", idCmdSystem::ArgCompletion_MapName );
|
||||
idCVar si_maxPlayers( "si_maxPlayers", "8", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "max number of players allowed on the server", 1, 8 );
|
||||
idCVar si_fragLimit( "si_fragLimit", "10", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "frag limit", 1, MP_PLAYER_MAXFRAGS );
|
||||
idCVar si_timeLimit( "si_timeLimit", "10", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "time limit in minutes", 0, 60 );
|
||||
idCVar si_teamDamage( "si_teamDamage", "0", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_BOOL, "enable team damage" );
|
||||
idCVar si_warmup( "si_warmup", "0", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_BOOL, "do pre-game warmup" );
|
||||
idCVar si_usePass( "si_usePass", "0", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_BOOL, "enable client password checking" );
|
||||
idCVar si_pure( "si_pure", "1", CVAR_GAME | CVAR_SERVERINFO | CVAR_BOOL, "server is pure and does not allow modified data" );
|
||||
idCVar si_spectators( "si_spectators", "1", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_BOOL, "allow spectators or require all clients to play" );
|
||||
idCVar si_serverURL( "si_serverURL", "", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE, "where to reach the server admins and get information about the server" );
|
||||
|
||||
#ifdef CTF
|
||||
//idCVar si_pointLimit( "si_pointlimit", "8", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "team points limit to win in CTF" );
|
||||
idCVar si_flagDropTimeLimit( "si_flagDropTimeLimit", "30", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "seconds before a dropped CTF flag is returned" );
|
||||
idCVar si_midnight( "si_midnight", "0", CVAR_GAME | CVAR_INTEGER | CVAR_SERVERINFO, "Start the game up in midnight CTF (completely dark)" );
|
||||
#endif
|
||||
|
||||
|
||||
// user info
|
||||
idCVar ui_name( "ui_name", "Player", CVAR_GAME | CVAR_USERINFO | CVAR_ARCHIVE, "player name" );
|
||||
idCVar ui_skin( "ui_skin", ui_skinArgs[ 0 ], CVAR_GAME | CVAR_USERINFO | CVAR_ARCHIVE, "player skin", ui_skinArgs, idCmdSystem::ArgCompletion_String<ui_skinArgs> );
|
||||
idCVar ui_team( "ui_team", ui_teamArgs[ 0 ], CVAR_GAME | CVAR_USERINFO | CVAR_ARCHIVE, "player team", ui_teamArgs, idCmdSystem::ArgCompletion_String<ui_teamArgs> );
|
||||
idCVar ui_autoSwitch( "ui_autoSwitch", "1", CVAR_GAME | CVAR_USERINFO | CVAR_ARCHIVE | CVAR_BOOL, "auto switch weapon" );
|
||||
idCVar ui_autoReload( "ui_autoReload", "1", CVAR_GAME | CVAR_USERINFO | CVAR_ARCHIVE | CVAR_BOOL, "auto reload weapon" );
|
||||
idCVar ui_showGun( "ui_showGun", "1", CVAR_GAME | CVAR_USERINFO | CVAR_ARCHIVE | CVAR_BOOL, "show gun" );
|
||||
idCVar ui_ready( "ui_ready", si_readyArgs[ 0 ], CVAR_GAME | CVAR_USERINFO, "player is ready to start playing", idCmdSystem::ArgCompletion_String<si_readyArgs> );
|
||||
idCVar ui_spectate( "ui_spectate", si_spectateArgs[ 0 ], CVAR_GAME | CVAR_USERINFO, "play or spectate", idCmdSystem::ArgCompletion_String<si_spectateArgs> );
|
||||
idCVar ui_chat( "ui_chat", "0", CVAR_GAME | CVAR_USERINFO | CVAR_BOOL | CVAR_ROM | CVAR_CHEAT, "player is chatting" );
|
||||
|
||||
// change anytime vars
|
||||
idCVar developer( "developer", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
|
||||
idCVar r_aspectRatio( "r_aspectRatio", "0", CVAR_RENDERER | CVAR_INTEGER | CVAR_ARCHIVE, "aspect ratio of view:\n0 = 4:3\n1 = 16:9\n2 = 16:10", 0, 2 );
|
||||
|
||||
idCVar g_cinematic( "g_cinematic", "1", CVAR_GAME | CVAR_BOOL, "skips updating entities that aren't marked 'cinematic' '1' during cinematics" );
|
||||
idCVar g_cinematicMaxSkipTime( "g_cinematicMaxSkipTime", "600", CVAR_GAME | CVAR_FLOAT, "# of seconds to allow game to run when skipping cinematic. prevents lock-up when cinematic doesn't end.", 0, 3600 );
|
||||
|
||||
idCVar g_muzzleFlash( "g_muzzleFlash", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "show muzzle flashes" );
|
||||
idCVar g_projectileLights( "g_projectileLights", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "show dynamic lights on projectiles" );
|
||||
idCVar g_bloodEffects( "g_bloodEffects", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "show blood splats, sprays and gibs" );
|
||||
idCVar g_doubleVision( "g_doubleVision", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "show double vision when taking damage" );
|
||||
idCVar g_monsters( "g_monsters", "1", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_decals( "g_decals", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "show decals such as bullet holes" );
|
||||
idCVar g_knockback( "g_knockback", "1000", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar g_skill( "g_skill", "1", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar g_nightmare( "g_nightmare", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "if nightmare mode is allowed" );
|
||||
idCVar g_gravity( "g_gravity", DEFAULT_GRAVITY_STRING, CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_skipFX( "g_skipFX", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_skipParticles( "g_skipParticles", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
|
||||
idCVar g_disasm( "g_disasm", "0", CVAR_GAME | CVAR_BOOL, "disassemble script into base/script/disasm.txt on the local drive when script is compiled" );
|
||||
idCVar g_debugBounds( "g_debugBounds", "0", CVAR_GAME | CVAR_BOOL, "checks for models with bounds > 2048" );
|
||||
idCVar g_debugAnim( "g_debugAnim", "-1", CVAR_GAME | CVAR_INTEGER, "displays information on which animations are playing on the specified entity number. set to -1 to disable." );
|
||||
idCVar g_debugMove( "g_debugMove", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugDamage( "g_debugDamage", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugWeapon( "g_debugWeapon", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugScript( "g_debugScript", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugMover( "g_debugMover", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugTriggers( "g_debugTriggers", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugCinematic( "g_debugCinematic", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_stopTime( "g_stopTime", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_damageScale( "g_damageScale", "1", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "scale final damage on player by this factor" );
|
||||
idCVar g_armorProtection( "g_armorProtection", "0.3", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "armor takes this percentage of damage" );
|
||||
idCVar g_armorProtectionMP( "g_armorProtectionMP", "0.6", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "armor takes this percentage of damage in mp" );
|
||||
idCVar g_useDynamicProtection( "g_useDynamicProtection", "1", CVAR_GAME | CVAR_BOOL | CVAR_ARCHIVE, "scale damage and armor dynamically to keep the player alive more often" );
|
||||
idCVar g_healthTakeTime( "g_healthTakeTime", "5", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "how often to take health in nightmare mode" );
|
||||
idCVar g_healthTakeAmt( "g_healthTakeAmt", "5", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "how much health to take in nightmare mode" );
|
||||
idCVar g_healthTakeLimit( "g_healthTakeLimit", "25", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "how low can health get taken in nightmare mode" );
|
||||
|
||||
|
||||
|
||||
idCVar g_showPVS( "g_showPVS", "0", CVAR_GAME | CVAR_INTEGER, "", 0, 2 );
|
||||
idCVar g_showTargets( "g_showTargets", "0", CVAR_GAME | CVAR_BOOL, "draws entities and thier targets. hidden entities are drawn grey." );
|
||||
idCVar g_showTriggers( "g_showTriggers", "0", CVAR_GAME | CVAR_BOOL, "draws trigger entities (orange) and thier targets (green). disabled triggers are drawn grey." );
|
||||
idCVar g_showCollisionWorld( "g_showCollisionWorld", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_showCollisionModels( "g_showCollisionModels", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_showCollisionTraces( "g_showCollisionTraces", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_maxShowDistance( "g_maxShowDistance", "128", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_showEntityInfo( "g_showEntityInfo", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_showviewpos( "g_showviewpos", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_showcamerainfo( "g_showcamerainfo", "0", CVAR_GAME | CVAR_ARCHIVE, "displays the current frame # for the camera when playing cinematics" );
|
||||
idCVar g_showTestModelFrame( "g_showTestModelFrame", "0", CVAR_GAME | CVAR_BOOL, "displays the current animation and frame # for testmodels" );
|
||||
idCVar g_showActiveEntities( "g_showActiveEntities", "0", CVAR_GAME | CVAR_BOOL, "draws boxes around thinking entities. dormant entities (outside of pvs) are drawn yellow. non-dormant are green." );
|
||||
idCVar g_showEnemies( "g_showEnemies", "0", CVAR_GAME | CVAR_BOOL, "draws boxes around monsters that have targeted the the player" );
|
||||
|
||||
idCVar g_frametime( "g_frametime", "0", CVAR_GAME | CVAR_BOOL, "displays timing information for each game frame" );
|
||||
idCVar g_timeentities( "g_timeEntities", "0", CVAR_GAME | CVAR_FLOAT, "when non-zero, shows entities whose think functions exceeded the # of milliseconds specified" );
|
||||
|
||||
#ifdef _D3XP
|
||||
idCVar g_testPistolFlashlight( "g_testPistolFlashlight", "1", CVAR_GAME | CVAR_BOOL, "Test out having a flashlight out with the pistol" );
|
||||
idCVar g_debugShockwave( "g_debugShockwave", "0", CVAR_GAME | CVAR_BOOL, "Debug the shockwave" );
|
||||
|
||||
idCVar g_enableSlowmo( "g_enableSlowmo", "0", CVAR_GAME | CVAR_BOOL, "for testing purposes only" );
|
||||
idCVar g_slowmoStepRate( "g_slowmoStepRate", "0.02", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
|
||||
idCVar g_enablePortalSky( "g_enablePortalSky", "1", CVAR_GAME | CVAR_BOOL, "enables the portal sky" );
|
||||
idCVar g_testFullscreenFX( "g_testFullscreenFX", "-1", CVAR_GAME | CVAR_INTEGER, "index will activate specific fx, -2 is for all on, -1 is off" );
|
||||
idCVar g_testHelltimeFX( "g_testHelltimeFX", "-1", CVAR_GAME | CVAR_INTEGER, "set to 0, 1, 2 to test helltime, -1 is off" );
|
||||
idCVar g_testMultiplayerFX( "g_testMultiplayerFX", "-1", CVAR_GAME | CVAR_INTEGER, "set to 0, 1, 2 to test multiplayer, -1 is off" );
|
||||
idCVar g_lowresFullscreenFX( "g_lowresFullscreenFX", "0", CVAR_GAME | CVAR_BOOL, "enable lores mode for fx" );
|
||||
|
||||
idCVar g_moveableDamageScale( "g_moveableDamageScale", "0.1", CVAR_GAME | CVAR_FLOAT, "scales damage wrt mass of object in multiplayer" );
|
||||
|
||||
idCVar g_testBloomSpeed( "g_testBloomSpeed", "1", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_testBloomIntensity( "g_testBloomIntensity", "-0.01", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_testBloomNumPasses( "g_testBloomNumPasses", "30", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
#endif
|
||||
|
||||
idCVar ai_debugScript( "ai_debugScript", "-1", CVAR_GAME | CVAR_INTEGER, "displays script calls for the specified monster entity number" );
|
||||
idCVar ai_debugMove( "ai_debugMove", "0", CVAR_GAME | CVAR_BOOL, "draws movement information for monsters" );
|
||||
idCVar ai_debugTrajectory( "ai_debugTrajectory", "0", CVAR_GAME | CVAR_BOOL, "draws trajectory tests for monsters" );
|
||||
idCVar ai_testPredictPath( "ai_testPredictPath", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar ai_showCombatNodes( "ai_showCombatNodes", "0", CVAR_GAME | CVAR_BOOL, "draws attack cones for monsters" );
|
||||
idCVar ai_showPaths( "ai_showPaths", "0", CVAR_GAME | CVAR_BOOL, "draws path_* entities" );
|
||||
idCVar ai_showObstacleAvoidance( "ai_showObstacleAvoidance", "0", CVAR_GAME | CVAR_INTEGER, "draws obstacle avoidance information for monsters. if 2, draws obstacles for player, as well", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
|
||||
idCVar ai_blockedFailSafe( "ai_blockedFailSafe", "1", CVAR_GAME | CVAR_BOOL, "enable blocked fail safe handling" );
|
||||
|
||||
#ifdef _D3XP
|
||||
idCVar ai_showHealth( "ai_showHealth", "0", CVAR_GAME | CVAR_BOOL, "Draws the AI's health above its head" );
|
||||
#endif
|
||||
|
||||
idCVar g_dvTime( "g_dvTime", "1", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_dvAmplitude( "g_dvAmplitude", "0.001", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_dvFrequency( "g_dvFrequency", "0.5", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
|
||||
idCVar g_kickTime( "g_kickTime", "1", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_kickAmplitude( "g_kickAmplitude", "0.0001", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_blobTime( "g_blobTime", "1", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_blobSize( "g_blobSize", "1", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
|
||||
idCVar g_testHealthVision( "g_testHealthVision", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_editEntityMode( "g_editEntityMode", "0", CVAR_GAME | CVAR_INTEGER, "0 = off\n"
|
||||
"1 = lights\n"
|
||||
"2 = sounds\n"
|
||||
"3 = articulated figures\n"
|
||||
"4 = particle systems\n"
|
||||
"5 = monsters\n"
|
||||
"6 = entity names\n"
|
||||
"7 = entity models", 0, 7, idCmdSystem::ArgCompletion_Integer<0,7> );
|
||||
idCVar g_dragEntity( "g_dragEntity", "0", CVAR_GAME | CVAR_BOOL, "allows dragging physics objects around by placing the crosshair over them and holding the fire button" );
|
||||
idCVar g_dragDamping( "g_dragDamping", "0.5", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_dragShowSelection( "g_dragShowSelection", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_dropItemRotation( "g_dropItemRotation", "", CVAR_GAME, "" );
|
||||
|
||||
#ifdef CTF
|
||||
// Note: These cvars do not necessarily need to be in the shipping game.
|
||||
idCVar g_flagAttachJoint( "g_flagAttachJoint", "Chest", CVAR_GAME | CVAR_CHEAT, "player joint to attach CTF flag to" );
|
||||
idCVar g_flagAttachOffsetX( "g_flagAttachOffsetX", "8", CVAR_GAME | CVAR_CHEAT, "X offset of CTF flag when carried" );
|
||||
idCVar g_flagAttachOffsetY( "g_flagAttachOffsetY", "4", CVAR_GAME | CVAR_CHEAT, "Y offset of CTF flag when carried" );
|
||||
idCVar g_flagAttachOffsetZ( "g_flagAttachOffsetZ", "-12", CVAR_GAME | CVAR_CHEAT, "Z offset of CTF flag when carried" );
|
||||
idCVar g_flagAttachAngleX( "g_flagAttachAngleX", "90", CVAR_GAME | CVAR_CHEAT, "X angle of CTF flag when carried" );
|
||||
idCVar g_flagAttachAngleY( "g_flagAttachAngleY", "25", CVAR_GAME | CVAR_CHEAT, "Y angle of CTF flag when carried" );
|
||||
idCVar g_flagAttachAngleZ( "g_flagAttachAngleZ", "-90", CVAR_GAME | CVAR_CHEAT, "Z angle of CTF flag when carried" );
|
||||
#endif
|
||||
|
||||
|
||||
idCVar g_vehicleVelocity( "g_vehicleVelocity", "1000", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_vehicleForce( "g_vehicleForce", "50000", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_vehicleSuspensionUp( "g_vehicleSuspensionUp", "32", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_vehicleSuspensionDown( "g_vehicleSuspensionDown", "20", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_vehicleSuspensionKCompress("g_vehicleSuspensionKCompress","200", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_vehicleSuspensionDamping( "g_vehicleSuspensionDamping","400", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_vehicleTireFriction( "g_vehicleTireFriction", "0.8", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
#ifdef _D3XP
|
||||
idCVar g_vehicleDebug( "g_vehicleDebug", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
#endif
|
||||
|
||||
idCVar ik_enable( "ik_enable", "1", CVAR_GAME | CVAR_BOOL, "enable IK" );
|
||||
idCVar ik_debug( "ik_debug", "0", CVAR_GAME | CVAR_BOOL, "show IK debug lines" );
|
||||
|
||||
idCVar af_useLinearTime( "af_useLinearTime", "1", CVAR_GAME | CVAR_BOOL, "use linear time algorithm for tree-like structures" );
|
||||
idCVar af_useImpulseFriction( "af_useImpulseFriction", "0", CVAR_GAME | CVAR_BOOL, "use impulse based contact friction" );
|
||||
idCVar af_useJointImpulseFriction( "af_useJointImpulseFriction","0", CVAR_GAME | CVAR_BOOL, "use impulse based joint friction" );
|
||||
idCVar af_useSymmetry( "af_useSymmetry", "1", CVAR_GAME | CVAR_BOOL, "use constraint matrix symmetry" );
|
||||
idCVar af_skipSelfCollision( "af_skipSelfCollision", "0", CVAR_GAME | CVAR_BOOL, "skip self collision detection" );
|
||||
idCVar af_skipLimits( "af_skipLimits", "0", CVAR_GAME | CVAR_BOOL, "skip joint limits" );
|
||||
idCVar af_skipFriction( "af_skipFriction", "0", CVAR_GAME | CVAR_BOOL, "skip friction" );
|
||||
idCVar af_forceFriction( "af_forceFriction", "-1", CVAR_GAME | CVAR_FLOAT, "force the given friction value" );
|
||||
idCVar af_maxLinearVelocity( "af_maxLinearVelocity", "128", CVAR_GAME | CVAR_FLOAT, "maximum linear velocity" );
|
||||
idCVar af_maxAngularVelocity( "af_maxAngularVelocity", "1.57", CVAR_GAME | CVAR_FLOAT, "maximum angular velocity" );
|
||||
idCVar af_timeScale( "af_timeScale", "1", CVAR_GAME | CVAR_FLOAT, "scales the time" );
|
||||
idCVar af_jointFrictionScale( "af_jointFrictionScale", "0", CVAR_GAME | CVAR_FLOAT, "scales the joint friction" );
|
||||
idCVar af_contactFrictionScale( "af_contactFrictionScale", "0", CVAR_GAME | CVAR_FLOAT, "scales the contact friction" );
|
||||
idCVar af_highlightBody( "af_highlightBody", "", CVAR_GAME, "name of the body to highlight" );
|
||||
idCVar af_highlightConstraint( "af_highlightConstraint", "", CVAR_GAME, "name of the constraint to highlight" );
|
||||
idCVar af_showTimings( "af_showTimings", "0", CVAR_GAME | CVAR_BOOL, "show articulated figure cpu usage" );
|
||||
idCVar af_showConstraints( "af_showConstraints", "0", CVAR_GAME | CVAR_BOOL, "show constraints" );
|
||||
idCVar af_showConstraintNames( "af_showConstraintNames", "0", CVAR_GAME | CVAR_BOOL, "show constraint names" );
|
||||
idCVar af_showConstrainedBodies( "af_showConstrainedBodies", "0", CVAR_GAME | CVAR_BOOL, "show the two bodies contrained by the highlighted constraint" );
|
||||
idCVar af_showPrimaryOnly( "af_showPrimaryOnly", "0", CVAR_GAME | CVAR_BOOL, "show primary constraints only" );
|
||||
idCVar af_showTrees( "af_showTrees", "0", CVAR_GAME | CVAR_BOOL, "show tree-like structures" );
|
||||
idCVar af_showLimits( "af_showLimits", "0", CVAR_GAME | CVAR_BOOL, "show joint limits" );
|
||||
idCVar af_showBodies( "af_showBodies", "0", CVAR_GAME | CVAR_BOOL, "show bodies" );
|
||||
idCVar af_showBodyNames( "af_showBodyNames", "0", CVAR_GAME | CVAR_BOOL, "show body names" );
|
||||
idCVar af_showMass( "af_showMass", "0", CVAR_GAME | CVAR_BOOL, "show the mass of each body" );
|
||||
idCVar af_showTotalMass( "af_showTotalMass", "0", CVAR_GAME | CVAR_BOOL, "show the total mass of each articulated figure" );
|
||||
idCVar af_showInertia( "af_showInertia", "0", CVAR_GAME | CVAR_BOOL, "show the inertia tensor of each body" );
|
||||
idCVar af_showVelocity( "af_showVelocity", "0", CVAR_GAME | CVAR_BOOL, "show the velocity of each body" );
|
||||
idCVar af_showActive( "af_showActive", "0", CVAR_GAME | CVAR_BOOL, "show tree-like structures of articulated figures not at rest" );
|
||||
idCVar af_testSolid( "af_testSolid", "1", CVAR_GAME | CVAR_BOOL, "test for bodies initially stuck in solid" );
|
||||
|
||||
idCVar rb_showTimings( "rb_showTimings", "0", CVAR_GAME | CVAR_BOOL, "show rigid body cpu usage" );
|
||||
idCVar rb_showBodies( "rb_showBodies", "0", CVAR_GAME | CVAR_BOOL, "show rigid bodies" );
|
||||
idCVar rb_showMass( "rb_showMass", "0", CVAR_GAME | CVAR_BOOL, "show the mass of each rigid body" );
|
||||
idCVar rb_showInertia( "rb_showInertia", "0", CVAR_GAME | CVAR_BOOL, "show the inertia tensor of each rigid body" );
|
||||
idCVar rb_showVelocity( "rb_showVelocity", "0", CVAR_GAME | CVAR_BOOL, "show the velocity of each rigid body" );
|
||||
idCVar rb_showActive( "rb_showActive", "0", CVAR_GAME | CVAR_BOOL, "show rigid bodies that are not at rest" );
|
||||
|
||||
// The default values for player movement cvars are set in def/player.def
|
||||
idCVar pm_jumpheight( "pm_jumpheight", "48", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "approximate hieght the player can jump" );
|
||||
idCVar pm_stepsize( "pm_stepsize", "16", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "maximum height the player can step up without jumping" );
|
||||
idCVar pm_crouchspeed( "pm_crouchspeed", "80", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while crouched" );
|
||||
idCVar pm_walkspeed( "pm_walkspeed", "140", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while walking" );
|
||||
idCVar pm_runspeed( "pm_runspeed", "220", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while running" );
|
||||
idCVar pm_noclipspeed( "pm_noclipspeed", "200", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while in noclip" );
|
||||
idCVar pm_spectatespeed( "pm_spectatespeed", "450", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while spectating" );
|
||||
idCVar pm_spectatebbox( "pm_spectatebbox", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "size of the spectator bounding box" );
|
||||
idCVar pm_usecylinder( "pm_usecylinder", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "use a cylinder approximation instead of a bounding box for player collision detection" );
|
||||
idCVar pm_minviewpitch( "pm_minviewpitch", "-89", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "amount player's view can look up (negative values are up)" );
|
||||
idCVar pm_maxviewpitch( "pm_maxviewpitch", "89", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "amount player's view can look down" );
|
||||
idCVar pm_stamina( "pm_stamina", "24", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "length of time player can run" );
|
||||
idCVar pm_staminathreshold( "pm_staminathreshold", "45", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "when stamina drops below this value, player gradually slows to a walk" );
|
||||
idCVar pm_staminarate( "pm_staminarate", "0.75", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "rate that player regains stamina. divide pm_stamina by this value to determine how long it takes to fully recharge." );
|
||||
idCVar pm_crouchheight( "pm_crouchheight", "38", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's bounding box while crouched" );
|
||||
idCVar pm_crouchviewheight( "pm_crouchviewheight", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's view while crouched" );
|
||||
idCVar pm_normalheight( "pm_normalheight", "74", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's bounding box while standing" );
|
||||
idCVar pm_normalviewheight( "pm_normalviewheight", "68", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's view while standing" );
|
||||
idCVar pm_deadheight( "pm_deadheight", "20", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's bounding box while dead" );
|
||||
idCVar pm_deadviewheight( "pm_deadviewheight", "10", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's view while dead" );
|
||||
idCVar pm_crouchrate( "pm_crouchrate", "0.87", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "time it takes for player's view to change from standing to crouching" );
|
||||
idCVar pm_bboxwidth( "pm_bboxwidth", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "x/y size of player's bounding box" );
|
||||
idCVar pm_crouchbob( "pm_crouchbob", "0.5", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "bob much faster when crouched" );
|
||||
idCVar pm_walkbob( "pm_walkbob", "0.3", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "bob slowly when walking" );
|
||||
idCVar pm_runbob( "pm_runbob", "0.4", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "bob faster when running" );
|
||||
idCVar pm_runpitch( "pm_runpitch", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_runroll( "pm_runroll", "0.005", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobup( "pm_bobup", "0.005", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobpitch( "pm_bobpitch", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobroll( "pm_bobroll", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_thirdPersonRange( "pm_thirdPersonRange", "80", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "camera distance from player in 3rd person" );
|
||||
idCVar pm_thirdPersonHeight( "pm_thirdPersonHeight", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of camera from normal view height in 3rd person" );
|
||||
idCVar pm_thirdPersonAngle( "pm_thirdPersonAngle", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "direction of camera from player in 3rd person in degrees (0 = behind player, 180 = in front)" );
|
||||
idCVar pm_thirdPersonClip( "pm_thirdPersonClip", "1", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "clip third person view into world space" );
|
||||
idCVar pm_thirdPerson( "pm_thirdPerson", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "enables third person view" );
|
||||
idCVar pm_thirdPersonDeath( "pm_thirdPersonDeath", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "enables third person view when player dies" );
|
||||
idCVar pm_modelView( "pm_modelView", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER, "draws camera from POV of player model (1 = always, 2 = when dead)", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
|
||||
idCVar pm_airTics( "pm_air", "1800", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER, "how long in milliseconds the player can go without air before he starts taking damage" );
|
||||
|
||||
idCVar g_showPlayerShadow( "g_showPlayerShadow", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables shadow of player model" );
|
||||
idCVar g_showHud( "g_showHud", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "" );
|
||||
idCVar g_showProjectilePct( "g_showProjectilePct", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables display of player hit percentage" );
|
||||
idCVar g_showBrass( "g_showBrass", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables ejected shells from weapon" );
|
||||
idCVar g_gun_x( "g_gunX", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_gun_y( "g_gunY", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_gun_z( "g_gunZ", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_viewNodalX( "g_viewNodalX", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_viewNodalZ( "g_viewNodalZ", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_fov( "g_fov", "90", CVAR_GAME | CVAR_INTEGER | CVAR_NOCHEAT, "" );
|
||||
idCVar g_skipViewEffects( "g_skipViewEffects", "0", CVAR_GAME | CVAR_BOOL, "skip damage and other view effects" );
|
||||
idCVar g_mpWeaponAngleScale( "g_mpWeaponAngleScale", "0", CVAR_GAME | CVAR_FLOAT, "Control the weapon sway in MP" );
|
||||
|
||||
idCVar g_testParticle( "g_testParticle", "0", CVAR_GAME | CVAR_INTEGER, "test particle visualation, set by the particle editor" );
|
||||
idCVar g_testParticleName( "g_testParticleName", "", CVAR_GAME, "name of the particle being tested by the particle editor" );
|
||||
idCVar g_testModelRotate( "g_testModelRotate", "0", CVAR_GAME, "test model rotation speed" );
|
||||
idCVar g_testPostProcess( "g_testPostProcess", "", CVAR_GAME, "name of material to draw over screen" );
|
||||
idCVar g_testModelAnimate( "g_testModelAnimate", "0", CVAR_GAME | CVAR_INTEGER, "test model animation,\n"
|
||||
"0 = cycle anim with origin reset\n"
|
||||
"1 = cycle anim with fixed origin\n"
|
||||
"2 = cycle anim with continuous origin\n"
|
||||
"3 = frame by frame with continuous origin\n"
|
||||
"4 = play anim once", 0, 4, idCmdSystem::ArgCompletion_Integer<0,4> );
|
||||
idCVar g_testModelBlend( "g_testModelBlend", "0", CVAR_GAME | CVAR_INTEGER, "number of frames to blend" );
|
||||
idCVar g_testDeath( "g_testDeath", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_exportMask( "g_exportMask", "", CVAR_GAME, "" );
|
||||
idCVar g_flushSave( "g_flushSave", "0", CVAR_GAME | CVAR_BOOL, "1 = don't buffer file writing for save games." );
|
||||
|
||||
idCVar aas_test( "aas_test", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar aas_showAreas( "aas_showAreas", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar aas_showPath( "aas_showPath", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar aas_showFlyPath( "aas_showFlyPath", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar aas_showWallEdges( "aas_showWallEdges", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar aas_showHideArea( "aas_showHideArea", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar aas_pullPlayer( "aas_pullPlayer", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar aas_randomPullPlayer( "aas_randomPullPlayer", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar aas_goalArea( "aas_goalArea", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
idCVar aas_showPushIntoArea( "aas_showPushIntoArea", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
|
||||
idCVar g_password( "g_password", "", CVAR_GAME | CVAR_ARCHIVE, "game password" );
|
||||
idCVar password( "password", "", CVAR_GAME | CVAR_NOCHEAT, "client password used when connecting" );
|
||||
|
||||
idCVar g_countDown( "g_countDown", "10", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "pregame countdown in seconds", 4, 3600 );
|
||||
idCVar g_gameReviewPause( "g_gameReviewPause", "10", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER | CVAR_ARCHIVE, "scores review time in seconds (at end game)", 2, 3600 );
|
||||
idCVar g_TDMArrows( "g_TDMArrows", "1", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "draw arrows over teammates in team deathmatch" );
|
||||
idCVar g_balanceTDM( "g_balanceTDM", "1", CVAR_GAME | CVAR_BOOL, "maintain even teams" );
|
||||
#ifdef CTF
|
||||
idCVar g_CTFArrows( "g_CTFArrows", "1", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "draw arrows over teammates in CTF" );
|
||||
#endif
|
||||
|
||||
idCVar net_clientPredictGUI( "net_clientPredictGUI", "1", CVAR_GAME | CVAR_BOOL, "test guis in networking without prediction" );
|
||||
|
||||
idCVar g_voteFlags( "g_voteFlags", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER | CVAR_ARCHIVE, "vote flags. bit mask of votes not allowed on this server\n"
|
||||
"bit 0 (+1) restart now\n"
|
||||
"bit 1 (+2) time limit\n"
|
||||
"bit 2 (+4) frag limit\n"
|
||||
"bit 3 (+8) game type\n"
|
||||
"bit 4 (+16) kick player\n"
|
||||
"bit 5 (+32) change map\n"
|
||||
"bit 6 (+64) spectators\n"
|
||||
"bit 7 (+128) next map" );
|
||||
idCVar g_mapCycle( "g_mapCycle", "mapcycle", CVAR_GAME | CVAR_ARCHIVE, "map cycling script for multiplayer games - see mapcycle.scriptcfg" );
|
||||
|
||||
#ifdef _D3XP
|
||||
idCVar mod_validSkins( "mod_validSkins", "skins/characters/player/marine_mp;skins/characters/player/marine_mp_green;skins/characters/player/marine_mp_blue;skins/characters/player/marine_mp_red;skins/characters/player/marine_mp_yellow;skins/characters/player/marine_mp_purple;skins/characters/player/marine_mp_grey;skins/characters/player/marine_mp_orange", CVAR_GAME | CVAR_ARCHIVE, "valid skins for the game" );
|
||||
#else
|
||||
idCVar mod_validSkins( "mod_validSkins", "skins/characters/player/marine_mp;skins/characters/player/marine_mp_green;skins/characters/player/marine_mp_blue;skins/characters/player/marine_mp_red;skins/characters/player/marine_mp_yellow", CVAR_GAME | CVAR_ARCHIVE, "valid skins for the game" );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _D3XP
|
||||
idCVar g_grabberHoldSeconds( "g_grabberHoldSeconds", "3", CVAR_GAME | CVAR_FLOAT | CVAR_CHEAT, "number of seconds to hold object" );
|
||||
idCVar g_grabberEnableShake( "g_grabberEnableShake", "1", CVAR_GAME | CVAR_BOOL | CVAR_CHEAT, "enable the grabber shake" );
|
||||
idCVar g_grabberRandomMotion( "g_grabberRandomMotion", "1", CVAR_GAME | CVAR_BOOL | CVAR_CHEAT, "enable random motion on the grabbed object" );
|
||||
idCVar g_grabberHardStop( "g_grabberHardStop", "1", CVAR_GAME | CVAR_BOOL | CVAR_CHEAT, "hard stops object if too fast" );
|
||||
idCVar g_grabberDamping( "g_grabberDamping", "0.5", CVAR_GAME | CVAR_FLOAT | CVAR_CHEAT, "damping of grabber" );
|
||||
#endif
|
||||
|
||||
#ifdef _D3XP
|
||||
idCVar g_xp_bind_run_once( "g_xp_bind_run_once", "0", CVAR_GAME | CVAR_BOOL | CVAR_ARCHIVE, "Rebind all controls once for D3XP." );
|
||||
#endif
|
||||
|
||||
idCVar net_serverDownload( "net_serverDownload", "0", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "enable server download redirects. 0: off 1: redirect to si_serverURL 2: use builtin download. see net_serverDl cvars for configuration" );
|
||||
idCVar net_serverDlBaseURL( "net_serverDlBaseURL", "", CVAR_GAME | CVAR_ARCHIVE, "base URL for the download redirection" );
|
||||
idCVar net_serverDlTable( "net_serverDlTable", "", CVAR_GAME | CVAR_ARCHIVE, "pak names for which download is provided, seperated by ;" );
|
||||
304
neo/d3xp/gamesys/SysCvar.h
Normal file
304
neo/d3xp/gamesys/SysCvar.h
Normal file
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __SYS_CVAR_H__
|
||||
#define __SYS_CVAR_H__
|
||||
|
||||
extern idCVar developer;
|
||||
|
||||
extern idCVar g_cinematic;
|
||||
extern idCVar g_cinematicMaxSkipTime;
|
||||
|
||||
extern idCVar r_aspectRatio;
|
||||
|
||||
extern idCVar g_monsters;
|
||||
extern idCVar g_decals;
|
||||
extern idCVar g_knockback;
|
||||
extern idCVar g_skill;
|
||||
extern idCVar g_gravity;
|
||||
extern idCVar g_skipFX;
|
||||
extern idCVar g_skipParticles;
|
||||
extern idCVar g_bloodEffects;
|
||||
extern idCVar g_projectileLights;
|
||||
extern idCVar g_doubleVision;
|
||||
extern idCVar g_muzzleFlash;
|
||||
|
||||
extern idCVar g_disasm;
|
||||
extern idCVar g_debugBounds;
|
||||
extern idCVar g_debugAnim;
|
||||
extern idCVar g_debugMove;
|
||||
extern idCVar g_debugDamage;
|
||||
extern idCVar g_debugWeapon;
|
||||
extern idCVar g_debugScript;
|
||||
extern idCVar g_debugMover;
|
||||
extern idCVar g_debugTriggers;
|
||||
extern idCVar g_debugCinematic;
|
||||
extern idCVar g_stopTime;
|
||||
extern idCVar g_armorProtection;
|
||||
extern idCVar g_armorProtectionMP;
|
||||
extern idCVar g_damageScale;
|
||||
extern idCVar g_useDynamicProtection;
|
||||
extern idCVar g_healthTakeTime;
|
||||
extern idCVar g_healthTakeAmt;
|
||||
extern idCVar g_healthTakeLimit;
|
||||
|
||||
extern idCVar g_showPVS;
|
||||
extern idCVar g_showTargets;
|
||||
extern idCVar g_showTriggers;
|
||||
extern idCVar g_showCollisionWorld;
|
||||
extern idCVar g_showCollisionModels;
|
||||
extern idCVar g_showCollisionTraces;
|
||||
extern idCVar g_maxShowDistance;
|
||||
extern idCVar g_showEntityInfo;
|
||||
extern idCVar g_showviewpos;
|
||||
extern idCVar g_showcamerainfo;
|
||||
extern idCVar g_showTestModelFrame;
|
||||
extern idCVar g_showActiveEntities;
|
||||
extern idCVar g_showEnemies;
|
||||
|
||||
extern idCVar g_frametime;
|
||||
extern idCVar g_timeentities;
|
||||
|
||||
extern idCVar ai_debugScript;
|
||||
extern idCVar ai_debugMove;
|
||||
extern idCVar ai_debugTrajectory;
|
||||
extern idCVar ai_testPredictPath;
|
||||
extern idCVar ai_showCombatNodes;
|
||||
extern idCVar ai_showPaths;
|
||||
extern idCVar ai_showObstacleAvoidance;
|
||||
extern idCVar ai_blockedFailSafe;
|
||||
#ifdef _D3XP
|
||||
extern idCVar ai_showHealth;
|
||||
#endif
|
||||
|
||||
extern idCVar g_dvTime;
|
||||
extern idCVar g_dvAmplitude;
|
||||
extern idCVar g_dvFrequency;
|
||||
|
||||
extern idCVar g_kickTime;
|
||||
extern idCVar g_kickAmplitude;
|
||||
extern idCVar g_blobTime;
|
||||
extern idCVar g_blobSize;
|
||||
|
||||
extern idCVar g_testHealthVision;
|
||||
extern idCVar g_editEntityMode;
|
||||
extern idCVar g_dragEntity;
|
||||
extern idCVar g_dragDamping;
|
||||
extern idCVar g_dragShowSelection;
|
||||
extern idCVar g_dropItemRotation;
|
||||
|
||||
extern idCVar g_vehicleVelocity;
|
||||
extern idCVar g_vehicleForce;
|
||||
extern idCVar g_vehicleSuspensionUp;
|
||||
extern idCVar g_vehicleSuspensionDown;
|
||||
extern idCVar g_vehicleSuspensionKCompress;
|
||||
extern idCVar g_vehicleSuspensionDamping;
|
||||
extern idCVar g_vehicleTireFriction;
|
||||
#ifdef _D3XP
|
||||
extern idCVar g_vehicleDebug;
|
||||
extern idCVar g_debugShockwave;
|
||||
extern idCVar g_enablePortalSky;
|
||||
#endif
|
||||
|
||||
extern idCVar ik_enable;
|
||||
extern idCVar ik_debug;
|
||||
|
||||
extern idCVar af_useLinearTime;
|
||||
extern idCVar af_useImpulseFriction;
|
||||
extern idCVar af_useJointImpulseFriction;
|
||||
extern idCVar af_useSymmetry;
|
||||
extern idCVar af_skipSelfCollision;
|
||||
extern idCVar af_skipLimits;
|
||||
extern idCVar af_skipFriction;
|
||||
extern idCVar af_forceFriction;
|
||||
extern idCVar af_maxLinearVelocity;
|
||||
extern idCVar af_maxAngularVelocity;
|
||||
extern idCVar af_timeScale;
|
||||
extern idCVar af_jointFrictionScale;
|
||||
extern idCVar af_contactFrictionScale;
|
||||
extern idCVar af_highlightBody;
|
||||
extern idCVar af_highlightConstraint;
|
||||
extern idCVar af_showTimings;
|
||||
extern idCVar af_showConstraints;
|
||||
extern idCVar af_showConstraintNames;
|
||||
extern idCVar af_showConstrainedBodies;
|
||||
extern idCVar af_showPrimaryOnly;
|
||||
extern idCVar af_showTrees;
|
||||
extern idCVar af_showLimits;
|
||||
extern idCVar af_showBodies;
|
||||
extern idCVar af_showBodyNames;
|
||||
extern idCVar af_showMass;
|
||||
extern idCVar af_showTotalMass;
|
||||
extern idCVar af_showInertia;
|
||||
extern idCVar af_showVelocity;
|
||||
extern idCVar af_showActive;
|
||||
extern idCVar af_testSolid;
|
||||
|
||||
extern idCVar rb_showTimings;
|
||||
extern idCVar rb_showBodies;
|
||||
extern idCVar rb_showMass;
|
||||
extern idCVar rb_showInertia;
|
||||
extern idCVar rb_showVelocity;
|
||||
extern idCVar rb_showActive;
|
||||
|
||||
extern idCVar pm_jumpheight;
|
||||
extern idCVar pm_stepsize;
|
||||
extern idCVar pm_crouchspeed;
|
||||
extern idCVar pm_walkspeed;
|
||||
extern idCVar pm_runspeed;
|
||||
extern idCVar pm_noclipspeed;
|
||||
extern idCVar pm_spectatespeed;
|
||||
extern idCVar pm_spectatebbox;
|
||||
extern idCVar pm_usecylinder;
|
||||
extern idCVar pm_minviewpitch;
|
||||
extern idCVar pm_maxviewpitch;
|
||||
extern idCVar pm_stamina;
|
||||
extern idCVar pm_staminathreshold;
|
||||
extern idCVar pm_staminarate;
|
||||
extern idCVar pm_crouchheight;
|
||||
extern idCVar pm_crouchviewheight;
|
||||
extern idCVar pm_normalheight;
|
||||
extern idCVar pm_normalviewheight;
|
||||
extern idCVar pm_deadheight;
|
||||
extern idCVar pm_deadviewheight;
|
||||
extern idCVar pm_crouchrate;
|
||||
extern idCVar pm_bboxwidth;
|
||||
extern idCVar pm_crouchbob;
|
||||
extern idCVar pm_walkbob;
|
||||
extern idCVar pm_runbob;
|
||||
extern idCVar pm_runpitch;
|
||||
extern idCVar pm_runroll;
|
||||
extern idCVar pm_bobup;
|
||||
extern idCVar pm_bobpitch;
|
||||
extern idCVar pm_bobroll;
|
||||
extern idCVar pm_thirdPersonRange;
|
||||
extern idCVar pm_thirdPersonHeight;
|
||||
extern idCVar pm_thirdPersonAngle;
|
||||
extern idCVar pm_thirdPersonClip;
|
||||
extern idCVar pm_thirdPerson;
|
||||
extern idCVar pm_thirdPersonDeath;
|
||||
extern idCVar pm_modelView;
|
||||
extern idCVar pm_airTics;
|
||||
|
||||
extern idCVar g_showPlayerShadow;
|
||||
extern idCVar g_showHud;
|
||||
extern idCVar g_showProjectilePct;
|
||||
extern idCVar g_showBrass;
|
||||
extern idCVar g_gun_x;
|
||||
extern idCVar g_gun_y;
|
||||
extern idCVar g_gun_z;
|
||||
extern idCVar g_viewNodalX;
|
||||
extern idCVar g_viewNodalZ;
|
||||
extern idCVar g_fov;
|
||||
extern idCVar g_testDeath;
|
||||
extern idCVar g_skipViewEffects;
|
||||
extern idCVar g_mpWeaponAngleScale;
|
||||
|
||||
extern idCVar g_testParticle;
|
||||
extern idCVar g_testParticleName;
|
||||
|
||||
extern idCVar g_testPostProcess;
|
||||
|
||||
extern idCVar g_testModelRotate;
|
||||
extern idCVar g_testModelAnimate;
|
||||
extern idCVar g_testModelBlend;
|
||||
extern idCVar g_exportMask;
|
||||
extern idCVar g_flushSave;
|
||||
|
||||
#ifdef _D3XP
|
||||
extern idCVar g_enableSlowmo;
|
||||
extern idCVar g_slowmoStepRate;
|
||||
extern idCVar g_testFullscreenFX;
|
||||
extern idCVar g_testHelltimeFX;
|
||||
extern idCVar g_testMultiplayerFX;
|
||||
extern idCVar g_lowresFullscreenFX;
|
||||
extern idCVar g_moveableDamageScale;
|
||||
extern idCVar g_testBloomSpeed;
|
||||
extern idCVar g_testBloomIntensity;
|
||||
extern idCVar g_testBloomNumPasses;
|
||||
#endif
|
||||
|
||||
#ifdef _D3XP
|
||||
extern idCVar g_grabberHoldSeconds;
|
||||
extern idCVar g_grabberEnableShake;
|
||||
extern idCVar g_grabberRandomMotion;
|
||||
extern idCVar g_grabberHardStop;
|
||||
extern idCVar g_grabberDamping;
|
||||
#endif
|
||||
|
||||
#ifdef _D3XP
|
||||
extern idCVar g_xp_bind_run_once;
|
||||
#endif
|
||||
|
||||
extern idCVar aas_test;
|
||||
extern idCVar aas_showAreas;
|
||||
extern idCVar aas_showPath;
|
||||
extern idCVar aas_showFlyPath;
|
||||
extern idCVar aas_showWallEdges;
|
||||
extern idCVar aas_showHideArea;
|
||||
extern idCVar aas_pullPlayer;
|
||||
extern idCVar aas_randomPullPlayer;
|
||||
extern idCVar aas_goalArea;
|
||||
extern idCVar aas_showPushIntoArea;
|
||||
|
||||
extern idCVar net_clientPredictGUI;
|
||||
|
||||
extern idCVar g_voteFlags;
|
||||
extern idCVar g_mapCycle;
|
||||
extern idCVar g_balanceTDM;
|
||||
|
||||
extern idCVar si_timeLimit;
|
||||
extern idCVar si_fragLimit;
|
||||
extern idCVar si_gameType;
|
||||
extern idCVar si_map;
|
||||
extern idCVar si_spectators;
|
||||
|
||||
#ifdef CTF
|
||||
extern idCVar si_flagDropTimeLimit;
|
||||
extern idCVar si_midnight;
|
||||
|
||||
extern idCVar g_flagAttachJoint;
|
||||
extern idCVar g_flagAttachOffsetX;
|
||||
extern idCVar g_flagAttachOffsetY;
|
||||
extern idCVar g_flagAttachOffsetZ;
|
||||
extern idCVar g_flagAttachAngleX;
|
||||
extern idCVar g_flagAttachAngleY;
|
||||
extern idCVar g_flagAttachAngleZ;
|
||||
|
||||
extern idCVar g_CTFArrows;
|
||||
|
||||
#endif
|
||||
|
||||
extern idCVar net_clientSelfSmoothing;
|
||||
extern idCVar net_clientLagOMeter;
|
||||
|
||||
extern const char *si_gameTypeArgs[];
|
||||
|
||||
extern const char *ui_skinArgs[];
|
||||
|
||||
#endif /* !__SYS_CVAR_H__ */
|
||||
1431
neo/d3xp/gamesys/TypeInfo.cpp
Normal file
1431
neo/d3xp/gamesys/TypeInfo.cpp
Normal file
File diff suppressed because it is too large
Load Diff
52
neo/d3xp/gamesys/TypeInfo.h
Normal file
52
neo/d3xp/gamesys/TypeInfo.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __SYS_TYPEINFO_H__
|
||||
#define __SYS_TYPEINFO_H__
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
|
||||
Game Type Info
|
||||
|
||||
===================================================================================
|
||||
*/
|
||||
|
||||
const char * GetTypeVariableName( const char *typeName, int offset );
|
||||
|
||||
void PrintType( const void *typePtr, const char *typeName );
|
||||
void WriteTypeToFile( idFile *fp, const void *typePtr, const char *typeName );
|
||||
void InitTypeVariables( const void *typePtr, const char *typeName, int value );
|
||||
|
||||
void ListTypeInfo_f( const idCmdArgs &args );
|
||||
|
||||
void WriteGameState_f( const idCmdArgs &args );
|
||||
void CompareGameState_f( const idCmdArgs &args );
|
||||
void TestSaveGame_f( const idCmdArgs &args );
|
||||
|
||||
#endif /* !__SYS_TYPEINFO_H__ */
|
||||
Reference in New Issue
Block a user