Added typeinfogen with state system

This commit is contained in:
Justin Marshall
2026-05-18 21:35:07 -07:00
parent 4686349b62
commit b841fcb33b
27 changed files with 21899 additions and 194 deletions
+15
View File
@@ -30,6 +30,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "quake4", "quake4", "{F95A59
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q4game", "quake4\game.vcxproj", "{57CFA45E-E1FD-4DFF-997D-68DD2700C7D7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TypeInfo", "engine\typeinfo.vcxproj", "{6EA6406F-3E65-47D9-8246-D6660A81606F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -126,6 +128,18 @@ Global
{57CFA45E-E1FD-4DFF-997D-68DD2700C7D7}.Q4 Debug|x64.Build.0 = DebugInline|x64
{57CFA45E-E1FD-4DFF-997D-68DD2700C7D7}.Release|x64.ActiveCfg = Release|x64
{57CFA45E-E1FD-4DFF-997D-68DD2700C7D7}.Release|x64.Build.0 = Release|x64
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Debug|x64.ActiveCfg = Debug|x64
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Debug|x64.Build.0 = Debug|x64
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Dedicated Debug|x64.ActiveCfg = Dedicated Debug|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Dedicated Debug|x64.Build.0 = Dedicated Debug|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Dedicated Release|x64.ActiveCfg = Dedicated Release|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Dedicated Release|x64.Build.0 = Dedicated Release|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Prey Debug|x64.ActiveCfg = Debug with inlines|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Prey Debug|x64.Build.0 = Debug with inlines|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Q4 Debug|x64.ActiveCfg = Debug with inlines|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Q4 Debug|x64.Build.0 = Debug with inlines|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Release|x64.ActiveCfg = Release|Win32
{6EA6406F-3E65-47D9-8246-D6660A81606F}.Release|x64.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -141,6 +155,7 @@ Global
{58320C19-5139-47C5-AAFE-4CAD2C8ED14D} = {003B01AB-152D-45C8-BF45-E5A035042D7F}
{6CD8E46D-E28E-493F-BB06-537A637A68C2} = {F65E2305-0208-4A25-BEB0-038C92484211}
{57CFA45E-E1FD-4DFF-997D-68DD2700C7D7} = {F95A59F2-59F4-4BB0-B425-2FD31547988D}
{6EA6406F-3E65-47D9-8246-D6660A81606F} = {003B01AB-152D-45C8-BF45-E5A035042D7F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {822AE68E-37FD-4947-AC78-29CFA29E613F}
+32 -18
View File
@@ -194,8 +194,9 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -209,8 +210,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Q4 Debug|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -224,8 +226,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Prey Debug|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -239,8 +242,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -254,8 +258,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -269,8 +274,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -284,8 +290,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -299,8 +306,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -314,8 +322,9 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>
</Command>
<Command>cd..
cd..
typeinfo.exe</Command>
</PreBuildEvent>
<Link>
<OutputFile>../../base/gamex64.dll</OutputFile>
@@ -344,6 +353,7 @@
<ClCompile Include="game\gamesys\Class.cpp" />
<ClCompile Include="game\gamesys\DebugGraph.cpp" />
<ClCompile Include="game\gamesys\Event.cpp" />
<ClCompile Include="game\gamesys\GameTypeInfo.cpp" />
<ClCompile Include="game\gamesys\SaveGame.cpp" />
<ClCompile Include="game\gamesys\SysCmds.cpp" />
<ClCompile Include="game\gamesys\SysCvar.cpp" />
@@ -418,6 +428,7 @@
<ClInclude Include="game\gamesys\Class.h" />
<ClInclude Include="game\gamesys\DebugGraph.h" />
<ClInclude Include="game\gamesys\Event.h" />
<ClInclude Include="game\gamesys\GameTypeInfo.h" />
<ClInclude Include="game\gamesys\NoGameTypeInfo.h" />
<ClInclude Include="game\gamesys\SaveGame.h" />
<ClInclude Include="game\gamesys\SysCmds.h" />
@@ -481,6 +492,9 @@
<ProjectReference Include="..\engine\idlib.vcxproj">
<Project>{49bec5c6-b964-417a-851e-808886b57400}</Project>
</ProjectReference>
<ProjectReference Include="..\engine\typeinfo.vcxproj">
<Project>{6ea6406f-3e65-47d9-8246-d6660a81606f}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
+6
View File
@@ -165,6 +165,9 @@
<ClCompile Include="game\Weapon.cpp" />
<ClCompile Include="game\WorldSpawn.cpp" />
<ClCompile Include="..\engine\idlib\precompiled.cpp" />
<ClCompile Include="game\gamesys\GameTypeInfo.cpp">
<Filter>GameSys</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="game\ai\AAS.h">
@@ -296,6 +299,9 @@
<ClInclude Include="game\Weapon.h" />
<ClInclude Include="game\WorldSpawn.h" />
<ClInclude Include="..\engine\idlib\precompiled.h" />
<ClInclude Include="game\gamesys\GameTypeInfo.h">
<Filter>GameSys</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="game\Game.def" />
+1
View File
@@ -90,6 +90,7 @@ class idLocationEntity;
void gameError( const char *fmt, ... );
#include "gamesys/Event.h"
#include "gamesys/State.h"
#include "gamesys/Class.h"
#include "gamesys/SysCvar.h"
#include "gamesys/SysCmds.h"
-2
View File
@@ -747,8 +747,6 @@ public:
private:
void Event_Activate( idEntity *activator );
void Event_Throw( void );
void Event_ShakeObject( idEntity *object, int starttime );
int end_time;
float throw_time;
-2
View File
@@ -229,8 +229,6 @@ public:
protected:
virtual void DoneMoving( void );
virtual void BeginMove( idThread *thread = NULL );
void SpawnTrigger( const idVec3 &pos );
void GetLocalTriggerPosition();
void Event_Touch( idEntity *other, trace_t *trace );
private:
-2
View File
@@ -639,7 +639,6 @@ private:
idAngles GunTurningOffset( void );
idVec3 GunAcceleratingOffset( void );
void UseObjects( void );
void CrashLand( const idVec3 &oldOrigin, const idVec3 &oldVelocity );
void BobCycle( const idVec3 &pushVelocity );
void UpdateViewAngles( void );
@@ -676,7 +675,6 @@ private:
void Event_SelectWeapon( const char *weaponName );
void Event_GetWeaponEntity( void );
void Event_OpenPDA( void );
void Event_PDAAvailable( void );
void Event_InPDA( void );
void Event_ExitTeleporter( void );
void Event_HideTip( void );
-1
View File
@@ -221,7 +221,6 @@ private:
void FreeBeams();
void Event_RemoveBeams();
void ApplyDamage();
};
/*
+10 -2
View File
@@ -422,7 +422,6 @@ protected:
void Think(void);
void Activate(idEntity* activator);
int ReactionTo(const idEntity* ent);
bool CheckForEnemy(void);
void EnemyDead(void);
virtual bool CanPlayChatterSounds(void) const;
void SetChatSound(void);
@@ -485,7 +484,6 @@ protected:
// effects
const idDeclParticle* SpawnParticlesOnJoint(particleEmitter_t& pe, const char* particleName, const char* jointName);
void SpawnParticles(const char* keyName);
bool ParticlesActive(void);
// turning
bool FacingIdeal(void);
@@ -801,4 +799,14 @@ private:
void Event_MarkUsed(void);
};
class idAI_Vagary : public idAI {
public:
CLASS_PROTOTYPE(idAI_Vagary);
private:
void Event_ChooseObjectToThrow(const idVec3& mins, const idVec3& maxs, float speed, float minDist, float offset);
void Event_ThrowObjectAtEnemy(idEntity* ent, float speed);
};
#endif /* !__AI_H__ */
-9
View File
@@ -38,15 +38,6 @@ Vagary specific AI code
#include "../Game_local.h"
class idAI_Vagary : public idAI {
public:
CLASS_PROTOTYPE( idAI_Vagary );
private:
void Event_ChooseObjectToThrow( const idVec3 &mins, const idVec3 &maxs, float speed, float minDist, float offset );
void Event_ThrowObjectAtEnemy( idEntity *ent, float speed );
};
const idEventDef AI_Vagary_ChooseObjectToThrow( "vagary_ChooseObjectToThrow", "vvfff", 'e' );
const idEventDef AI_Vagary_ThrowObjectAtEnemy( "vagary_ThrowObjectAtEnemy", "ef" );
+24
View File
@@ -97,6 +97,8 @@ public: \
static idClass *CreateInstance( void ); \
virtual idTypeInfo *GetType( void ) const; \
static idTypeInfo &GetClassType( void ); \
virtual intptr_t Invoke(const char* functionName, void *param1) override; \
virtual bool HasNativeFunction(const char* functionName) override; \
static idEventFunc<nameofclass> eventCallbacks[]
/*
@@ -205,6 +207,28 @@ public:
const char* GetSuperclass(void) const;
void FindUninitializedMemory(void);
// jmarshall
template< typename T >
T* Cast(void)
{
return this ? (IsType(T::Type) ? static_cast<T*>(this) : NULL) : NULL;
}
template< typename T >
const T* Cast(void) const
{
return this ? (IsType(T::Type) ? static_cast<const T*>(this) : NULL) : NULL;
}
virtual void StateThreadChanged(void) {};
virtual idClass* InvokeChild()
{
return NULL;
}
virtual intptr_t Invoke(const char* functionName, void* param1);
virtual bool HasNativeFunction(const char* functionName);
// jmarshall end
void Save(idSaveGame* savefile) const {};
void Restore(idRestoreGame* savefile) {};
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+496
View File
@@ -0,0 +1,496 @@
#include "precompiled.h"
#include "../Game_local.h"
const int HISTORY_COUNT = 50;
/*
=====================
stateParms_t::Wait
=====================
*/
void stateParms_t::Wait( float seconds )
{
time = gameLocal.time + SEC2MS( seconds );
}
/*
=====================
stateParms_t::Save
=====================
*/
void stateParms_t::Save( idSaveGame* saveFile ) const
{
saveFile->WriteInt( blendFrames );
saveFile->WriteInt( time );
saveFile->WriteInt( stage );
}
/*
=====================
stateParms_t::Restore
=====================
*/
void stateParms_t::Restore( idRestoreGame* saveFile )
{
saveFile->ReadInt( blendFrames );
saveFile->ReadInt( time );
saveFile->ReadInt( stage );
}
/*
=====================
stateCall_t::Save
=====================
*/
void stateCall_t::Save( idSaveGame* saveFile ) const
{
saveFile->WriteString( state );
// TOSAVE: idLinkList<stateCall_t> node;
saveFile->WriteInt( flags );
saveFile->WriteInt( delay );
parms.Save( saveFile );
}
/*
=====================
stateCall_t::Save
=====================
*/
void stateCall_t::Restore( idRestoreGame* saveFile, const idClass* owner )
{
saveFile->ReadString( state );
saveFile->ReadInt( flags );
saveFile->ReadInt( delay );
parms.Restore( saveFile );
}
/*
=====================
rvStateThread::rvStateThread
=====================
*/
rvStateThread::rvStateThread( void )
{
owner = NULL;
insertAfter = NULL;
lastResult = SRESULT_DONE;
states.Clear( );
interrupted.Clear( );
memset( &fl, 0, sizeof( fl ) );
}
/*
=====================
rvStateThread::~rvStateThread
=====================
*/
rvStateThread::~rvStateThread( void )
{
Clear( true );
}
/*
=====================
rvStateThread::SetOwner
=====================
*/
void rvStateThread::SetOwner( idClass* _owner )
{
owner = _owner;
}
/*
=====================
rvStateThread::Post
=====================
*/
stateResult_t rvStateThread::PostState( const char* name, int blendFrames, int delay, int flags )
{
stateCall_t* call;
call = new stateCall_t;
call->state = name;
call->delay = delay;
call->flags = flags;
call->parms.blendFrames = blendFrames;
call->parms.time = -1;
call->parms.stage = 0;
call->parms.substage = 0;
call->parms.param1 = 0;
call->parms.param2 = 0;
call->parms.subparam1 = 0;
call->parms.subparam2 = 0;
call->node.SetOwner( call );
if( fl.executing && insertAfter )
{
call->node.InsertAfter( insertAfter->node );
}
else
{
call->node.AddToEnd( states );
}
insertAfter = call;
return SRESULT_OK;
}
/*
=====================
rvStateThread::Set
=====================
*/
stateResult_t rvStateThread::SetState( const char* name, int blendFrames, int delay, int flags )
{
Clear( );
return PostState( name, blendFrames, delay, flags );
}
/*
=====================
rvStateThread::InterruptState
=====================
*/
stateResult_t rvStateThread::InterruptState( const char* name, int blendFrames, int delay, int flags )
{
stateCall_t* call;
// Move all states to the front of the interrupted list in the same order
for( call = states.Prev(); call; call = states.Prev() )
{
call->node.Remove( );
call->node.AddToFront( interrupted );
}
// Nothing to insert after anymore
insertAfter = NULL;
fl.stateInterrupted = true;
// Post the state now
return PostState( name, blendFrames, delay, flags );
}
/*
=====================
rvStateThread::CurrentStateIs
=====================
*/
bool rvStateThread::CurrentStateIs( const char* name ) const
{
return ( !IsIdle() ) ? name == GetState()->state : false;
}
/*
=====================
rvStateThread::Clear
=====================
*/
void rvStateThread::Clear( bool ignoreStateCalls )
{
stateCall_t* call;
// Clear all states from the main state list
for( call = states.Next(); call != NULL; call = states.Next() )
{
if( !ignoreStateCalls && ( call->flags & ( SFLAG_ONCLEAR | SFLAG_ONCLEARONLY ) ) )
{
//owner->ProcessState ( call->state, call->parms );
//owner->SetStateParms(call->parms);
owner->Invoke( call->state, &call->parms );
}
call->node.Remove();
delete call;
}
// Clear all interrupted states
for( call = interrupted.Next(); call != NULL; call = interrupted.Next() )
{
if( !ignoreStateCalls && ( call->flags & ( SFLAG_ONCLEAR | SFLAG_ONCLEARONLY ) ) )
{
//owner->ProcessState ( call->state, call->parms );
// owner->SetStateParms(call->parms);
owner->Invoke( call->state, &call->parms );
}
call->node.Remove();
delete call;
}
insertAfter = NULL;
fl.stateCleared = true;
states.Clear( );
interrupted.Clear( );
}
/*
=====================
rvStateThread::Execute
=====================
*/
stateResult_t rvStateThread::Execute( void )
{
stateCall_t* call = NULL;
int count;
const char* stateName;
int stateStage;
const char* historyState[HISTORY_COUNT];
int historyStage[HISTORY_COUNT];
int historyStart;
int historyEnd;
// If our main state loop is empty copy over any states in the interrupted state
if( !states.Next( ) )
{
for( call = interrupted.Next(); call; call = interrupted.Next() )
{
call->node.Remove( );
call->node.AddToEnd( states );
}
assert( !interrupted.Next( ) );
}
// State thread is idle if there are no states
if( !states.Next() )
{
return SRESULT_IDLE;
}
fl.executing = true;
// Run through the states until there are no more or one of them tells us to wait
count = 0;
historyStart = 0;
historyEnd = 0;
for( call = states.Next(); call && count < HISTORY_COUNT; call = states.Next(), ++count )
{
insertAfter = call;
fl.stateCleared = false;
fl.stateInterrupted = false;
// If this state is only called when being cleared then just skip it
if( call->flags & SFLAG_ONCLEARONLY )
{
call->node.Remove( );
delete call;
continue;
}
// If the call has a delay on it the time will be set to negative initially and then
// converted to game time.
if( call->parms.time <= 0 )
{
call->parms.time = gameLocal.time;
}
// Check for delayed states
if( gameLocal.time < call->parms.time + call->delay )
{
fl.executing = false;
return SRESULT_WAIT;
}
// Debugging
if( lastResult != SRESULT_WAIT )
{
// Keep a history of the called states so we can dump them on an overflow
historyState[historyEnd] = call->state;
historyStage[historyEnd] = call->parms.stage;
historyEnd = ( historyEnd + 1 ) % HISTORY_COUNT;
if( historyEnd == historyStart )
{
historyStart = ( historyEnd + 1 ) % HISTORY_COUNT;
}
}
// Cache name and stage for error messages
stateName = call->state;
stateStage = call->parms.stage;
if( g_debugState.GetBool() )
{
if( call->parms.stage )
{
gameLocal.Printf( "%s: %s (%d)\n", ((idEntity *)owner)->GetClassname(), call->state.c_str(), call->parms.stage );
}
else
{
gameLocal.Printf( "%s: %s\n", ((idEntity*)owner)->GetClassname(), call->state.c_str() );
}
}
// Actually call the state function
lastResult = ( stateResult_t )owner->Invoke( call->state, &call->parms );
switch( lastResult )
{
case SRESULT_DONE_FRAME:
fl.executing = false;
return SRESULT_DONE;
case SRESULT_WAIT:
fl.executing = false;
return SRESULT_WAIT;
case SRESULT_ERROR:
gameLocal.Error( "rvStateThread: error reported by state '%s (%d)'", stateName, stateStage );
fl.executing = false;
return SRESULT_ERROR;
}
if (lastResult == SRESULT_DONE) {
owner->StateThreadChanged();
}
// Dont remove the node if it was interrupted or cleared in the last process
if( !fl.stateCleared && !fl.stateInterrupted )
{
if( lastResult >= SRESULT_SETDELAY )
{
call->delay = lastResult - SRESULT_SETDELAY;
call->parms.time = gameLocal.GetTime();
continue;
}
else if( lastResult >= SRESULT_SETSTAGE )
{
call->parms.stage = lastResult - SRESULT_SETSTAGE;
continue;
}
// Done with state so remove it from list
call->node.Remove( );
delete call;
}
// Finished the last state but wait a frame for next one
if( lastResult == SRESULT_DONE_WAIT )
{
fl.executing = false;
return SRESULT_WAIT;
}
}
// Runaway state loop?
if( count >= HISTORY_COUNT )
{
idFile* file;
fileSystem->RemoveFile( "statedump.txt" );
file = fileSystem->OpenFileWrite( "statedump.txt" );
for( ; historyStart != historyEnd; historyStart = ( historyStart + 1 ) % HISTORY_COUNT )
{
if( historyStage[historyStart] )
{
gameLocal.Printf( "rvStateThread: %s (%d)\n", historyState[historyStart], historyStage[historyStart] );
}
else
{
gameLocal.Printf( "rvStateThread: %s\n", historyState[historyStart] );
}
if( file )
{
if( historyStage[historyStart] )
{
file->Printf( "rvStateThread: %s (%d)\n", historyState[historyStart], historyStage[historyStart] );
}
else
{
file->Printf( "rvStateThread: %s\n", historyState[historyStart] );
}
}
}
if( file )
{
fileSystem->CloseFile( file );
}
gameLocal.Error( "rvStateThread: run away state loop '%s'", name.c_str() );
}
insertAfter = NULL;
fl.executing = false;
// Move interrupted states back into the main state list when the main state list is empty
if( !states.Next() && interrupted.Next( ) )
{
return Execute( );
}
return lastResult;
}
/*
=====================
rvStateThread::Save
=====================
*/
void rvStateThread::Save( idSaveGame* saveFile ) const
{
saveFile->WriteString( name.c_str() );
// No need to save owner, its setup in restore
saveFile->WriteInt( lastResult );
saveFile->Write( &fl, sizeof( fl ) );
saveFile->WriteInt( states.Num() );
for( idLinkList<stateCall_t>* node = states.NextNode(); node; node = node->NextNode() )
{
node->Owner()->Save( saveFile );
}
saveFile->WriteInt( interrupted.Num() );
for( idLinkList<stateCall_t>* node = interrupted.NextNode(); node; node = node->NextNode() )
{
node->Owner()->Save( saveFile );
}
// TOSAVE: stateCall_t* insertAfter;
// TOSAVE: stateResult_t lastResult;
}
/*
=====================
rvStateThread::Restore
=====================
*/
void rvStateThread::Restore( idRestoreGame* saveFile, idClass* owner )
{
int numStates;
stateCall_t* call = NULL;
saveFile->ReadString( name );
this->owner = owner;
saveFile->ReadInt( ( int& )lastResult );
saveFile->Read( &fl, sizeof( fl ) );
saveFile->ReadInt( numStates );
for( ; numStates > 0; numStates-- )
{
call = new stateCall_t;
assert( call );
call->Restore( saveFile, owner );
call->node.SetOwner( call );
call->node.AddToEnd( states );
}
saveFile->ReadInt( numStates );
for( ; numStates > 0; numStates-- )
{
call = new stateCall_t;
assert( call );
call->Restore( saveFile, owner );
call->node.SetOwner( call );
call->node.AddToEnd( interrupted );
}
}
+168
View File
@@ -0,0 +1,168 @@
#ifndef __SYS_STATE_H__
#define __SYS_STATE_H__
typedef enum
{
SRESULT_OK, // Call was made successfully
SRESULT_ERROR, // An unrecoverable error occurred
SRESULT_DONE, // Done with current state, move to next
SRESULT_DONE_WAIT, // Done with current state, wait a frame then move to next
SRESULT_WAIT, // Wait a frame and re-run current state
SRESULT_IDLE, // State thread is currently idle (ie. no states)
SRESULT_SETSTAGE, // Sets the current stage of the current state and reruns the state
SRESULT_DONE_FRAME,
// NOTE: this has to be the last result becuase the stage is added to
// the result.
SRESULT_SETDELAY = SRESULT_SETSTAGE + 20
} stateResult_t;
#define MAX_STATE_CALLS 50
#define SRESULT_STAGE(x) ((stateResult_t)((int)SRESULT_SETSTAGE + (int)(x)))
#define SRESULT_DELAY(x) ((stateResult_t)((int)SRESULT_SETDELAY + (int)(x)))
struct stateParms_t
{
int blendFrames;
int time;
int stage;
int substage;
float param1;
float param2;
float subparam1;
float subparam2;
void Wait( float seconds );
void Save( idSaveGame* saveFile ) const;
void Restore( idRestoreGame* saveFile );
};
/*
================
CLASS_STATES_PROTOTYPE
This macro must be included in the definition of any subclass of idClass that
wishes to have its own custom states. Its prototypes variables used in the process
of managing states.
================
*/
#define CLASS_STATES_PROTOTYPE(nameofclass) \
protected: \
static rvStateFunc<nameofclass> stateCallbacks[]
/*
================
CLASS_STATES_DECLARATION
This macro must be included in the code to properly initialize variables
used in state processing for a idClass dervied class
================
*/
#define CLASS_STATES_DECLARATION(nameofclass) \
rvStateFunc<nameofclass> nameofclass::stateCallbacks[] = {
/*
================
STATE
This macro declares a single state. It must be surrounded by the CLASS_STATES_DECLARATION
and END_CLASS_STATES macros.
================
*/
#define STATE(statename,function) { statename, (stateCallback_t)( &function ) },
/*
================
END_CLASS_STATES
Terminates a state block
================
*/
#define END_CLASS_STATES { NULL, NULL } };
struct stateCall_t
{
idStr state;
idLinkList<stateCall_t> node;
int flags;
int delay;
stateParms_t parms;
void Save( idSaveGame* saveFile ) const;
void Restore( idRestoreGame* saveFile, const idClass* owner );
};
class idClass;
const int SFLAG_ONCLEAR = BIT( 0 ); // Executes, even if the state queue is cleared
const int SFLAG_ONCLEARONLY = BIT( 1 ); // Executes only if the state queue is cleared
class rvStateThread
{
public:
rvStateThread( void );
~rvStateThread( void );
void SetName( const char* name );
void SetOwner( idClass* owner );
bool Interrupt( void );
stateResult_t InterruptState( const char* state, int blendFrames = 0, int delay = 0, int flags = 0 );
stateResult_t PostState( const char* state, int blendFrames = 0, int delay = 0, int flags = 0 );
stateResult_t SetState( const char* state, int blendFrames = 0, int delay = 0, int flags = 0 );
stateCall_t* GetState( void ) const;
bool CurrentStateIs( const char* name ) const;
stateResult_t Execute( void );
void Clear( bool ignoreStateCalls = false );
bool IsIdle( void ) const;
bool IsExecuting( void ) const;
void Save( idSaveGame* saveFile ) const;
void Restore( idRestoreGame* saveFile, idClass* owner );
protected:
struct flags
{
bool stateCleared : 1; // State list was cleared
bool stateInterrupted : 1; // State list was interrupted
bool executing : 1; // Execute is currently processing states
} fl;
idStr name;
idClass* owner;
idLinkList<stateCall_t> states;
idLinkList<stateCall_t> interrupted;
stateCall_t* insertAfter;
stateResult_t lastResult;
};
ID_INLINE void rvStateThread::SetName( const char* _name )
{
name = _name;
}
ID_INLINE stateCall_t* rvStateThread::GetState( void ) const
{
return states.Next();
}
ID_INLINE bool rvStateThread::IsIdle( void ) const
{
return !states.Next() && !interrupted.Next();
}
ID_INLINE bool rvStateThread::IsExecuting( void ) const
{
return fl.executing;
}
#endif // __SYS_STATE_H__
+4
View File
@@ -355,6 +355,7 @@
<ClInclude Include="framework\BuildVersion.h" />
<ClInclude Include="framework\CmdSystem.h" />
<ClInclude Include="framework\Common.h" />
<ClInclude Include="framework\Common_local.h" />
<ClInclude Include="framework\Compressor.h" />
<ClInclude Include="framework\Console.h" />
<ClInclude Include="framework\CVarSystem.h" />
@@ -3091,6 +3092,9 @@
<ProjectReference Include="opengl\opengl.vcxproj">
<Project>{58320c19-5139-47c5-aafe-4cad2c8ed14d}</Project>
</ProjectReference>
<ProjectReference Include="typeinfo.vcxproj">
<Project>{6ea6406f-3e65-47d9-8246-d6660a81606f}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Image Include="sys\win32\rc\res\prey.ico" />
+3
View File
@@ -603,6 +603,9 @@
<ClInclude Include="framework\DeclModelDefInterface.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="framework\Common_local.h">
<Filter>Framework</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="cm\CollisionModel_contacts.cpp">
+1 -151
View File
@@ -221,157 +221,7 @@ MemInfo::MemInfo( void ) {
}
#endif
class idCommonLocal : public idCommon {
public:
idCommonLocal( void );
virtual void Init( int argc, const char **argv, const char *cmdline );
virtual void Shutdown( void );
virtual void Quit( void );
virtual bool IsInitialized( void ) const;
virtual void Frame( void );
virtual void GUIFrame( bool execCmd, bool network );
virtual void StartupVariable( const char *match, bool once );
#ifdef QUAKE4
virtual int GetUserCmdHz( void ) const;
virtual int GetUserCmdMSec( void ) const;
virtual int GetFrameTime( void ) const;
virtual bool IsRenderableGameFrame( void ) const;
virtual void SetRenderableGameFrame( bool in );
virtual const char * GetErrorMessage( void ) const;
virtual bool IsToolActive( void ) const;
#ifdef _RV_MEM_SYS_SUPPORT
virtual void InitHeaps( void );
virtual void ShutdownHeaps( void );
#endif
virtual void RunAlwaysThinkGUIs( int time );
virtual bool DoingDeclValidation( void );
virtual void SetCrashReportAutoSendString( const char *psString );
#endif
virtual void InitTool( const toolFlag_t tool, const idDict *dict );
virtual void ActivateTool( bool active );
virtual void WriteConfigToFile( const char *filename );
virtual void WriteFlaggedCVarsToFile( const char *filename, int flags, const char *setCmd );
#ifdef QUAKE4
virtual void BeginRedirect( char *buffer, int buffersize, void (*flush)( const char * ), bool rcon = false );
#else
virtual void BeginRedirect( char *buffer, int buffersize, void (*flush)( const char * ) );
#endif
virtual void EndRedirect( void );
virtual void SetRefreshOnPrint( bool set );
virtual void Printf( const char *fmt, ... ) id_attribute((format(printf,2,3)));
virtual void VPrintf( const char *fmt, va_list arg );
virtual void DPrintf( const char *fmt, ... ) id_attribute((format(printf,2,3)));
virtual void Warning( const char *fmt, ... ) id_attribute((format(printf,2,3)));
virtual void DWarning( const char *fmt, ...) id_attribute((format(printf,2,3)));
virtual void PrintWarnings( void );
virtual void ClearWarnings( const char *reason );
virtual void Error( const char *fmt, ... ) id_attribute((format(printf,2,3)));
virtual void FatalError( const char *fmt, ... ) id_attribute((format(printf,2,3)));
virtual const idLangDict * GetLanguageDict( void );
#ifdef QUAKE4
virtual void DumpWarnings( void );
virtual const char * GetLocalizedString( const char *token, int langIndex = -1 );
virtual const idLangKeyValue *GetLocalizedString( int index, int langIndex = -1 );
virtual int GetNumLanguages( void ) const;
virtual int GetNumLocalizedStrings( void ) const;
virtual const char * GetLanguage( int index ) const;
virtual bool LanguageHasVO( int index ) const;
#endif
#ifdef PREY
virtual void MaterialKeyForBinding(const char* binding, char* materialName, char* keyText, bool* wideKey);
#endif
virtual const char * KeysFromBinding( const char *bind );
virtual const char * BindingFromKey( const char *key );
virtual int ButtonState( int key );
virtual int KeyState( int key );
#ifdef QUAKE4
virtual int GetRModeForMachineSpec( int machineSpec ) const;
virtual void SetDesiredMachineSpec( int machineSpec );
virtual bool IsRCon( void ) const;
#endif
void InitGame( void );
void ShutdownGame( bool reloading );
// localization
void InitLanguageDict( void );
void LocalizeGui( const char *fileName, idLangDict &langDict );
void LocalizeMapData( const char *fileName, idLangDict &langDict );
void LocalizeSpecificMapData( const char *fileName, idLangDict &langDict, const idLangDict &replaceArgs );
void SetMachineSpec( void );
private:
void InitCommands( void );
void InitRenderSystem( void );
void InitSIMD( void );
bool AddStartupCommands( void );
void ParseCommandLine( int argc, const char **argv );
void ClearCommandLine( void );
bool SafeMode( void );
void CheckToolMode( void );
void CloseLogFile( void );
void WriteConfiguration( void );
#ifndef QUAKE4
void DumpWarnings( void );
#endif
void LoadGameDLL( void );
void UnloadGameDLL( void );
void PrintLoadingMessage( const char *msg );
void FilterLangList( idStrList* list, idStr lang );
#ifdef QUAKE4
bool AddLanguage( const idStr &language );
void SetActiveLanguage( void );
void ApplyVideoSettings( void );
void SingleAsyncTic( void );
#endif
bool com_fullyInitialized;
bool com_refreshOnPrint; // update the screen every print for dmap
int com_errorEntered; // 0, ERP_DROP, etc
bool com_shuttingDown;
idFile * logFile;
char errorMessage[MAX_PRINT_MSG_SIZE];
char * rd_buffer;
int rd_buffersize;
void (*rd_flush)( const char *buffer );
#ifdef QUAKE4
bool rd_rcon;
#endif
idStr warningCaption;
idStrList warningList;
idStrList errorList;
#ifdef QUAKE4
int warningCount[MAX_WARNING_LIST];
#endif
INT_PTR gameDLL;
idLangDict languageDict;
#ifdef QUAKE4
idList<rvLanguage> languages;
int languageDictIndex;
int desiredMachineSpec;
bool com_renderableGameFrame;
#endif
#ifdef ID_WRITE_VERSION
idCompressor * config_compressor;
#endif
int gameFrame; // Frame number of the local game
double gameTimeResidual; // left over msec from the last game frame
virtual float Get_com_engineHz_latched(void);
virtual int64_t Get_com_engineHz_numerator(void);
virtual int64_t Get_com_engineHz_denominator(void);
};
#include "Common_local.h"
idCommonLocal commonLocal;
idCommon * common = &commonLocal;
+154
View File
@@ -0,0 +1,154 @@
#pragma once
class idCommonLocal : public idCommon {
public:
idCommonLocal(void);
virtual void Init(int argc, const char** argv, const char* cmdline);
virtual void Shutdown(void);
virtual void Quit(void);
virtual bool IsInitialized(void) const;
virtual void Frame(void);
virtual void GUIFrame(bool execCmd, bool network);
virtual void StartupVariable(const char* match, bool once);
#ifdef QUAKE4
virtual int GetUserCmdHz(void) const;
virtual int GetUserCmdMSec(void) const;
virtual int GetFrameTime(void) const;
virtual bool IsRenderableGameFrame(void) const;
virtual void SetRenderableGameFrame(bool in);
virtual const char* GetErrorMessage(void) const;
virtual bool IsToolActive(void) const;
#ifdef _RV_MEM_SYS_SUPPORT
virtual void InitHeaps(void);
virtual void ShutdownHeaps(void);
#endif
virtual void RunAlwaysThinkGUIs(int time);
virtual bool DoingDeclValidation(void);
virtual void SetCrashReportAutoSendString(const char* psString);
#endif
virtual void InitTool(const toolFlag_t tool, const idDict* dict);
virtual void ActivateTool(bool active);
virtual void WriteConfigToFile(const char* filename);
virtual void WriteFlaggedCVarsToFile(const char* filename, int flags, const char* setCmd);
#ifdef QUAKE4
virtual void BeginRedirect(char* buffer, int buffersize, void (*flush)(const char*), bool rcon = false);
#else
virtual void BeginRedirect(char* buffer, int buffersize, void (*flush)(const char*));
#endif
virtual void EndRedirect(void);
virtual void SetRefreshOnPrint(bool set);
virtual void Printf(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
virtual void VPrintf(const char* fmt, va_list arg);
virtual void DPrintf(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
virtual void Warning(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
virtual void DWarning(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
virtual void PrintWarnings(void);
virtual void ClearWarnings(const char* reason);
virtual void Error(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
virtual void FatalError(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
virtual const idLangDict* GetLanguageDict(void);
#ifdef QUAKE4
virtual void DumpWarnings(void);
virtual const char* GetLocalizedString(const char* token, int langIndex = -1);
virtual const idLangKeyValue* GetLocalizedString(int index, int langIndex = -1);
virtual int GetNumLanguages(void) const;
virtual int GetNumLocalizedStrings(void) const;
virtual const char* GetLanguage(int index) const;
virtual bool LanguageHasVO(int index) const;
#endif
#ifdef PREY
virtual void MaterialKeyForBinding(const char* binding, char* materialName, char* keyText, bool* wideKey);
#endif
virtual const char* KeysFromBinding(const char* bind);
virtual const char* BindingFromKey(const char* key);
virtual int ButtonState(int key);
virtual int KeyState(int key);
#ifdef QUAKE4
virtual int GetRModeForMachineSpec(int machineSpec) const;
virtual void SetDesiredMachineSpec(int machineSpec);
virtual bool IsRCon(void) const;
#endif
void InitGame(void);
void ShutdownGame(bool reloading);
// localization
void InitLanguageDict(void);
void LocalizeGui(const char* fileName, idLangDict& langDict);
void LocalizeMapData(const char* fileName, idLangDict& langDict);
void LocalizeSpecificMapData(const char* fileName, idLangDict& langDict, const idLangDict& replaceArgs);
void SetMachineSpec(void);
private:
void InitCommands(void);
void InitRenderSystem(void);
void InitSIMD(void);
bool AddStartupCommands(void);
void ParseCommandLine(int argc, const char** argv);
void ClearCommandLine(void);
bool SafeMode(void);
void CheckToolMode(void);
void CloseLogFile(void);
void WriteConfiguration(void);
#ifndef QUAKE4
void DumpWarnings(void);
#endif
void LoadGameDLL(void);
void UnloadGameDLL(void);
void PrintLoadingMessage(const char* msg);
void FilterLangList(idStrList* list, idStr lang);
#ifdef QUAKE4
bool AddLanguage(const idStr& language);
void SetActiveLanguage(void);
void ApplyVideoSettings(void);
void SingleAsyncTic(void);
#endif
bool com_fullyInitialized;
bool com_refreshOnPrint; // update the screen every print for dmap
int com_errorEntered; // 0, ERP_DROP, etc
bool com_shuttingDown;
idFile* logFile;
char errorMessage[MAX_PRINT_MSG_SIZE];
char* rd_buffer;
int rd_buffersize;
void (*rd_flush)(const char* buffer);
#ifdef QUAKE4
bool rd_rcon;
#endif
idStr warningCaption;
idStrList warningList;
idStrList errorList;
#ifdef QUAKE4
int warningCount[MAX_WARNING_LIST];
#endif
INT_PTR gameDLL;
idLangDict languageDict;
#ifdef QUAKE4
idList<rvLanguage> languages;
int languageDictIndex;
int desiredMachineSpec;
bool com_renderableGameFrame;
#endif
#ifdef ID_WRITE_VERSION
idCompressor* config_compressor;
#endif
int gameFrame; // Frame number of the local game
double gameTimeResidual; // left over msec from the last game frame
virtual float Get_com_engineHz_latched(void);
virtual int64_t Get_com_engineHz_numerator(void);
virtual int64_t Get_com_engineHz_denominator(void);
};
-7
View File
@@ -80,15 +80,8 @@ static const int SSF_HILITE = BIT(16); // display debug info for this emitter
static const int SSF_VOICEAMPLITUDE = BIT(10); // HUMANHEAD pdm: include in findamplitude queries
static const int SSF_OMNI_WHEN_CLOSE = BIT(11); // HUMANHEAD pdm: make omni when within the mindistance
static const int SSF_NOREVERB = BIT(12); // HUMANHEAD pdm: reverb exclusion
#ifndef GAMEPORTAL_SOUND
#define GAMEPORTAL_SOUND 1
#endif
#if GAMEPORTAL_SOUND
static const int SSF_NOPORTALFLOW = BIT(13); // don't allow sounds to flow through game portals
#endif
#endif
// these options can be overriden from sound shader defaults on a per-emitter and per-channel basis
typedef struct {
File diff suppressed because it is too large Load Diff
+426
View File
@@ -0,0 +1,426 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug with inlines and memory log|Win32">
<Configuration>Debug with inlines and memory log</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug with inlines and memory log|x64">
<Configuration>Debug with inlines and memory log</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug with inlines|Win32">
<Configuration>Debug with inlines</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug with inlines|x64">
<Configuration>Debug with inlines</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Dedicated Debug with inlines|Win32">
<Configuration>Dedicated Debug with inlines</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Dedicated Debug with inlines|x64">
<Configuration>Dedicated Debug with inlines</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Dedicated Debug|Win32">
<Configuration>Dedicated Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Dedicated Debug|x64">
<Configuration>Dedicated Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Dedicated Release|Win32">
<Configuration>Dedicated Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Dedicated Release|x64">
<Configuration>Dedicated Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>TypeInfo</ProjectName>
<ProjectGuid>{6EA6406F-3E65-47D9-8246-D6660A81606F}</ProjectGuid>
<RootNamespace>TypeInfo</RootNamespace>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccProvider>
</SccProvider>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Dedicated.props" />
<Import Project="_Release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Dedicated.props" />
<Import Project="_Release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Dedicated.props" />
<Import Project="_Debug.props" />
<Import Project="_WithInlines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Dedicated.props" />
<Import Project="_Debug.props" />
<Import Project="_WithInlines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Dedicated.props" />
<Import Project="_Debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Dedicated.props" />
<Import Project="_Debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Debug.props" />
<Import Project="_WithInlines.props" />
<Import Project="_WithMemoryLog.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Debug.props" />
<Import Project="_WithInlines.props" />
<Import Project="_WithMemoryLog.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Debug.props" />
<Import Project="_WithInlines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Debug.props" />
<Import Project="_WithInlines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="_Common.props" />
<Import Project="_TypeInfo.props" />
<Import Project="_Debug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'">
<Link>
<AdditionalDependencies>nafxcwd.lib;libcmtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'">
<Link>
<AdditionalDependencies>nafxcwd.lib;libcmtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<OutputFile>../../typeinfo.exe</OutputFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\shared\game_typetemplate.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="idlib\precompiled.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="tools\engine_stubs.cpp" />
<ClCompile Include="TypeInfo\main.cpp" />
<ClCompile Include="TypeInfo\TypeInfoGen.cpp" />
<ClCompile Include="framework\CmdSystem.cpp" />
<ClCompile Include="framework\CVarSystem.cpp" />
<ClCompile Include="framework\File.cpp" />
<ClCompile Include="framework\FileSystem.cpp" />
<ClCompile Include="framework\Unzip.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="idlib\precompiled.h" />
<ClInclude Include="TypeInfo\TypeInfoGen.h" />
<ClInclude Include="framework\CmdSystem.h" />
<ClInclude Include="framework\CVarSystem.h" />
<ClInclude Include="framework\File.h" />
<ClInclude Include="framework\FileSystem.h" />
<ClInclude Include="framework\Licensee.h" />
<ClInclude Include="framework\Unzip.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="idlib.vcxproj">
<Project>{49bec5c6-b964-417a-851e-808886b57400}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="TypeInfo">
<UniqueIdentifier>{2ba46bfc-0458-4729-89bf-a9ca1bbc49cb}</UniqueIdentifier>
</Filter>
<Filter Include="Framework">
<UniqueIdentifier>{40a69fce-c497-466a-ad0d-cc5a4293aab0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="TypeInfo\main.cpp">
<Filter>TypeInfo</Filter>
</ClCompile>
<ClCompile Include="TypeInfo\TypeInfoGen.cpp">
<Filter>TypeInfo</Filter>
</ClCompile>
<ClCompile Include="framework\CmdSystem.cpp">
<Filter>Framework</Filter>
</ClCompile>
<ClCompile Include="framework\CVarSystem.cpp">
<Filter>Framework</Filter>
</ClCompile>
<ClCompile Include="framework\File.cpp">
<Filter>Framework</Filter>
</ClCompile>
<ClCompile Include="framework\FileSystem.cpp">
<Filter>Framework</Filter>
</ClCompile>
<ClCompile Include="framework\Unzip.cpp">
<Filter>Framework</Filter>
</ClCompile>
<ClCompile Include="idlib\precompiled.cpp">
<Filter>Framework</Filter>
</ClCompile>
<ClCompile Include="tools\engine_stubs.cpp">
<Filter>TypeInfo</Filter>
</ClCompile>
<ClCompile Include="..\shared\game_typetemplate.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="TypeInfo\TypeInfoGen.h">
<Filter>TypeInfo</Filter>
</ClInclude>
<ClInclude Include="framework\CmdSystem.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="framework\CVarSystem.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="framework\File.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="framework\FileSystem.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="framework\Licensee.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="framework\Unzip.h">
<Filter>Framework</Filter>
</ClInclude>
<ClInclude Include="idlib\precompiled.h">
<Filter>Framework</Filter>
</ClInclude>
</ItemGroup>
</Project>
File diff suppressed because it is too large Load Diff
+135
View File
@@ -0,0 +1,135 @@
/*
===========================================================================
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 __TYPEINFOGEN_H__
#define __TYPEINFOGEN_H__
/*
===================================================================================
Type Info Generator
- template classes are commented out (different instantiations are not identified)
- bit fields are commented out (cannot get the address of bit fields)
- multiple inheritance is not supported (only tracks a single super type)
===================================================================================
*/
class idConstantInfo
{
public:
idStr name;
idStr type;
idStr value;
};
class idEnumValueInfo
{
public:
idStr name;
int value;
};
class idEnumTypeInfo
{
public:
idStr typeName;
idStr scope;
bool unnamed;
bool isTemplate;
idList<idEnumValueInfo> values;
};
class idClassVariableInfo
{
public:
idStr name;
idStr type;
int bits;
};
class rvmClassFunctionInfo
{
public:
idStr returnType;
idStr name;
bool isConst;
bool isStatic;
idStr paramStateInput;
bool isValidFunction;
};
class idClassTypeInfo
{
public:
idStr typeName;
idStr superType;
idStr scope;
bool unnamed;
bool isTemplate;
idList<idClassVariableInfo> variables;
idList< rvmClassFunctionInfo> functions;
};
class idTypeInfoGen
{
public:
idTypeInfoGen( void );
~idTypeInfoGen( void );
void AddDefine( const char* define );
void CreateTypeInfo( const char* path );
void WriteTypeInfo( const char* fileName ) const;
private:
idStrList defines;
idList<idConstantInfo*> constants;
idList<idEnumTypeInfo*> enums;
idList<idClassTypeInfo*> classes;
int numTemplates;
int maxInheritance;
idStr maxInheritanceClass;
int GetInheritance( const char* typeName ) const;
int EvaluateIntegerString( const idStr& string );
float EvaluateFloatString( const idStr& string );
idConstantInfo* FindConstant( const char* name );
int GetIntegerConstant( const char* scope, const char* name, idParser& src );
float GetFloatConstant( const char* scope, const char* name, idParser& src );
int ParseArraySize( const char* scope, idParser& src );
void ParseConstantValue( const char* scope, idParser& src, idStr& value );
idEnumTypeInfo* ParseEnumType( const char* scope, bool isTemplate, bool typeDef, idParser& src );
idClassTypeInfo* ParseClassType( const char* scope, const char* templateArgs, bool isTemplate, bool typeDef, idParser& src );
void ParseScope( const char* scope, bool isTemplate, idParser& src, idClassTypeInfo* typeInfo );
};
#endif /* !__TYPEINFOGEN_H__ */
+92
View 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 "precompiled.h"
#include "../sys/sys_local.h"
#pragma hdrstop
#include "TypeInfoGen.h"
#define SOURCE_CODE_BASE_FOLDER "neo"
idSession* session = NULL;
/*
==============================================================
main
==============================================================
*/
int main( int argc, char** argv )
{
idStr fileName, sourcePath;
idTypeInfoGen* generator;
idLib::common = common;
idLib::cvarSystem = cvarSystem;
idLib::fileSystem = fileSystem;
//idLib::sys = sys;
idLib::Init();
cmdSystem->Init();
cvarSystem->Init();
idCVar::RegisterStaticVars();
cvarSystem->SetCVarString( "fs_game", "neo" );
fileSystem->Init();
generator = new idTypeInfoGen;
sourcePath = "doom3/game";
fileName = "doom3/game/gamesys/GameTypeInfo";
generator->AddDefine( "__cplusplus" );
generator->AddDefine( "GAME_DLL" );
generator->AddDefine( "ID_TYPEINFO" );
generator->AddDefine( "TYPEINFO" );
generator->AddDefine( "__TYPEINFOGEN__" );
generator->AddDefine( "_WIN32" );
generator->AddDefine("_D3SDK");
generator->CreateTypeInfo( sourcePath );
generator->WriteTypeInfo( fileName );
delete generator;
fileName.Clear();
sourcePath.Clear();
fileSystem->Shutdown( false );
cvarSystem->Shutdown();
cmdSystem->Shutdown();
idLib::ShutDown();
return 0;
}
+7
View File
@@ -0,0 +1,7 @@
#include "../engine/idlib/precompiled.h"
#ifdef _D3SDK
#include "../doom3/game/game_local.h"
#else
#error "missing game definition!"
#endif