Compiling under VS2002

From Valve Developer Community
Revision as of 16:16, 8 August 2006 by Ts2do (talk | contribs)
Jump to navigation Jump to search

The Visual Studio project files provided in the Source SDK are VS2003 project files. This page details the changes to these files necessary to allow them to be opened and compiled in Visual Studio 2002.

Open the following files in a text editor and make these three changes:

  • For the solution file src/Game_sdk.sln change the first line from:
Microsoft Visual Studio Solution File, Format Version 8.00
to:
Microsoft Visual Studio Solution File, Format Version 7.00
  • For the C++ project file src/cl_dll/client_sdk.vcproj change the version on line 4 from:
Version="7.10"
to:
Version="7.00"
  • For the C++ project file src/dlls/hl_sdk.vcproj change the version on line 4 from:
Version="7.10"
to:
Version="7.00"

To verify that you have successfully made these changes, open the src/Game_sdk.sln file in VS2002 and compile the solution.

Code Changes

c_baseentity.h (99)
#define DECLARE_INTERPOLATION
#define DECLARE_INTERPOLATION()

utlsymbol.h (149)
friend class CUtlSymbolTable::CLess; // Needed to allow CLess to calculate pointer to symbol table
friend class CLess; // Needed to allow CLess to calculate pointer to symbol table

entity_client_tools.cpp (135)
CClientTools::CClientTools() : m_Handles( 0, 0, HandleLessFunc )
CClientTools::CClientTools() : m_Handles( 0, 0, (CUtlRBTree< HToolEntry_t >::LessFunc_t)HandleLessFunc )

mempool.h (151)
byte		reserved[ BLOCK_SIZE - sizeof( FreeBlock_t *) ];
byte		reserved[ abs(BLOCK_SIZE - sizeof( FreeBlock_t *)) ];

view_scene.cpp (2363)
	{PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,1,1,scale,scale}
	PostProcessingPass(PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,1,1,scale,scale)

view_scene.cpp (2365)
	{PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,scale,scale,1,1}
	PostProcessingPass(PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,scale,scale,1,1)

view_scene.cpp (2367)
	{PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,destscale,destscale,srcscale,srcscale}
	PostProcessingPass(PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,destscale,destscale,srcscale,srcscale)

view_scene.cpp (2368)
#define PPP_END 	{PPP_ALWAYS,0,NULL,NULL,0,0,0,0,0}
#define PPP_END 	PostProcessingPass(PPP_ALWAYS,0,NULL,NULL,0,0,0,0,0)

view_scene.cpp (2369)
#define PPP_PROCESS(srcmatname,dest_rt_name) {PPP_ALWAYS,0,srcmatname,dest_rt_name,0,1,1,1,1}
#define PPP_PROCESS(srcmatname,dest_rt_name) PostProcessingPass(PPP_ALWAYS,0,srcmatname,dest_rt_name,0,1,1,1,1)

view_scene.cpp (2371)
	{PPP_IF_COND_VAR,cvarptr,srcmatname,dest_rt_name,0,1,1,1,1}
	PostProcessingPass(PPP_IF_COND_VAR,cvarptr,srcmatname,dest_rt_name,0,1,1,1,1)

view_scene.cpp (2373)
	{PPP_IF_NOT_COND_VAR,cvarptr,srcmatname,dest_rt_name,0,1,1,1,1}
	PostProcessingPass(PPP_IF_NOT_COND_VAR,cvarptr,srcmatname,dest_rt_name,0,1,1,1,1)

view_scene.cpp (2375)
	{PPP_IF_NOT_COND_VAR,cvarptr,srcmatname,dest_rt_name,src_tname,1,1,1,1}
	PostProcessingPass(PPP_IF_NOT_COND_VAR,cvarptr,srcmatname,dest_rt_name,src_tname,1,1,1,1)

view_scene.cpp (2377)
	{PPP_IF_COND_VAR,cvarptr,srcmatname,dest_rt_name,src_txtrname,1,1,1,1}
	PostProcessingPass(PPP_IF_COND_VAR,cvarptr,srcmatname,dest_rt_name,src_txtrname,1,1,1,1)

view_scene.cpp (2379)
	{PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,1,1,1,1}
	PostProcessingPass(PPP_ALWAYS,0,srcmatname,dest_rt_name,src_tname,1,1,1,1)

hud_closecaption.h (32)
		m_RequestedBlocks( 0, 0, BlockInfo_t::Less )
		m_RequestedBlocks( 0, 0, (CUtlRBTree< BlockInfo_t >::LessFunc_t)BlockInfo_t::Less )

view_beams.cpp (2123)
	beamInfo.m_nStartFrame = pbeam->m_fStartFrame;
	beamInfo.m_nStartFrame = pbeam->m_fStartFrame;

utlrbtree.h (44)
	RBTree.SetLessFunc( DefLessFunc( RBTREE_T::KeyType_t ) );
	RBTree.SetLessFunc( (RBTREE_T::LessFunc_t)DefLessFunc( RBTREE_T::KeyType_t ) );

proxyplayer.cpp (304)
: m_Logos( 0, 0, LogoLessFunc )
: m_Logos( 0, 0, (CUtlRBTree< PlayerLogo >::LessFunc_t)LogoLessFunc )

hud_closecaption.cpp (831)
	m_CloseCaptionRepeats( 0, 0, CaptionTokenLessFunc ),
	m_CloseCaptionRepeats( 0, 0, (CUtlRBTree< CaptionRepeat, int >::LessFunc_t)CaptionTokenLessFunc ),

hud_closecaption.cpp (835)
	, m_TokenNameLookup( 0, 0, TokenNameLessFunc )
	, m_TokenNameLookup( 0, 0, (CUtlRBTree< TokenNameLookup, int >::LessFunc_t)TokenNameLessFunc )

physics_main_shared.cpp (1791)
	  m_Thinkers( 0, 0, ThinkLessFunc )
	  m_Thinkers( 0, 0, (CUtlRBTree<ThinkSync>::LessFunc_t)ThinkLessFunc )

ClientShadowMgr.cpp (948)
	m_DirtyShadows( 0, 0, ShadowHandleCompareFunc ),
	m_DirtyShadows( 0, 0, (CUtlRBTree<ClientShadowHandle_t>::LessFunc_t)ShadowHandleCompareFunc ),

cdll_client_int.cpp (316)
CUtlRBTree<CBoneSetupEnt> g_BoneSetupEnts( BoneSetupCompare );
CUtlRBTree<CBoneSetupEnt> g_BoneSetupEnts( (CUtlRBTree<CBoneSetupEnt>::LessFunc_t)BoneSetupCompare );

c_entityparticletrail.cpp (152)
	pParticle->m_uchStartSize	= m_Info.m_flStartSize;
	pParticle->m_uchStartSize	= (unsigned char)m_Info.m_flStartSize;

c_entityparticletrail.cpp (153)
	pParticle->m_uchEndSize		= m_Info.m_flEndSize;
	pParticle->m_uchEndSize		= (unsigned char)m_Info.m_flEndSize;

c_baseflex.cpp (68)
	m_LocalToGlobal( 0, 0, FlexSettingLessFunc )
	m_LocalToGlobal( 0, 0, (CUtlRBTree<FS_LocalToGlobal_t>::LessFunc_t)FlexSettingLessFunc )

choreochannel.cpp (211)
	CUtlRBTree< CChoreoEvent * >  sortedGestures( 0, 0, ChoreEventStartTimeLessFunc );
	CUtlRBTree< CChoreoEvent * >  sortedGestures( 0, 0, (CUtlRBTree< CChoreoEvent * >::LessFunc_t)ChoreEventStartTimeLessFunc );

choreochannel.cpp (337)
		timeSortedEvents( 0, 0, ChoreEventStartTimeLessFunc )
		timeSortedEvents( 0, 0, (CUtlRBTree< CChoreoEvent * >::LessFunc_t)ChoreEventStartTimeLessFunc )

choreochannel.cpp (343)
		timeSortedEvents( 0, 0, ChoreEventStartTimeLessFunc )
		timeSortedEvents( 0, 0, (CUtlRBTree< CChoreoEvent * >::LessFunc_t)ChoreEventStartTimeLessFunc )

choreoscene.cpp (2644)
	CUtlRBTree< ActiveList, int > pending(0,0,EventLess);
	CUtlRBTree< ActiveList, int > pending(0,0,(CUtlRBTree< ActiveList, int >::LessFunc_t)EventLess);

hltvdirector.cpp (102)
	m_EventHistory.SetLessFunc( GameEventLessFunc );
	m_EventHistory.SetLessFunc( (CUtlRBTree<CGameEvent>::LessFunc_t)GameEventLessFunc );

props.cpp (3134)
		m_modelList.SetLessFunc( BreakLessFunc );
		m_modelList.SetLessFunc( (CUtlRBTree<breakable_precache_t>::LessFunc_t)BreakLessFunc );

SoundEmitterSystem.cpp (70)
static CUtlRBTree< TokenNameLookup, int > g_CloseCaptionCRCToTokenLookup( 0, 0, TokenCRCLessFunc );
static CUtlRBTree< TokenNameLookup, int > g_CloseCaptionCRCToTokenLookup( 0, 0, (CUtlRBTree< TokenNameLookup, int >::LessFunc_t)TokenCRCLessFunc );

SceneEntity.cpp (2333)
	CUtlRBTree< SpeakEventSound_t > soundnames( 0, 0, SpeakEventSoundLessFunc );
	CUtlRBTree< SpeakEventSound_t > soundnames( 0, 0, (CUtlRBTree< SpeakEventSound_t >::LessFunc_t)SpeakEventSoundLessFunc );

UtlCachedFileData.h (60)
		: m_Elements( 0, 0, FileNameHandleLessFunc ),
		: m_Elements( 0, 0, (CUtlRBTree< ElementType_t >::LessFunc_t)FileNameHandleLessFunc ),

AI_Criteria.cpp (20)
AI_CriteriaSet::AI_CriteriaSet() : m_Lookup( 0, 0, CritEntry_t::LessFunc )
AI_CriteriaSet::AI_CriteriaSet() : m_Lookup( 0, 0, (CUtlRBTree<CritEntry_t>::LessFunc_t)CritEntry_t::LessFunc )

AI_Criteria.cpp (28)
AI_CriteriaSet::AI_CriteriaSet( const AI_CriteriaSet& src ) : m_Lookup( 0, 0, CritEntry_t::LessFunc )
AI_CriteriaSet::AI_CriteriaSet( const AI_CriteriaSet& src ) : m_Lookup( 0, 0, (CUtlRBTree<CritEntry_t>::LessFunc_t)CritEntry_t::LessFunc )

BaseFlex.cpp (97)
	m_LocalToGlobal( 0, 0, FlexSettingLessFunc )
	m_LocalToGlobal( 0, 0, (CUtlRBTree<FS_LocalToGlobal_t>::LessFunc_t)FlexSettingLessFunc )

player.cpp (1006)
			flArmor = m_ArmorValue;
			flArmor = (float)m_ArmorValue;

player.cpp (1009)
			m_DmgSave = m_ArmorValue;
			m_DmgSave = (float)m_ArmorValue;

BaseEntity.cpp (886)
		iAttachment = m_iParentAttachment;
		iAttachment = (int)m_iParentAttachment;

stringpool.cpp (30)
  : m_Strings( 32, 256, StrLess )
  : m_Strings( 32, 256, (CStrSet::LessFunc_t)StrLess )

New Code

view_scene.cpp (2347) +
	PostProcessingPass(PostProcessingCondition a,ConVar const *b, char const *c, char const *d, char const *e, int f, int g, int h, int i )
	{
		ppp_test = a;
		cvar_to_test = b;
		material_name = c;
		dest_rendering_target = d;
		src_rendering_target = e;
		xdest_scale = f;
		ydest_scale = g;
		xsrc_scale = h;
		ysrc_scale = i;
	}

Alternative

A program on Code Source entitled "Visual Studio Converter 2.0" will also do the trick to convert from 2003 to 2002 VS file format.

See Also