Skip to content

Commit 4e0ed4d

Browse files
committed
hammer: Use x86-64 counters in some places
1 parent a8df03e commit 4e0ed4d

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

hammer/Selection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ void CSelection::SelectObjectList( const CMapObjectList *pList, int cmd )
602602

603603
if ( pList != NULL )
604604
{
605-
for (int pos=0;pos<pList->Count();pos++)
605+
for (intp pos=0;pos<pList->Count();pos++)
606606
{
607607
CMapClass *pObject = pList->Element(pos);
608608
CMapClass *pSelObject = pObject->PrepareSelection( m_eSelectMode );

hammer/render3dms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ void CRender3D::RenderCone( Vector const &vBasePt, Vector const &vTipPt, float f
20672067
// set to a flat shaded render mode
20682068
PushRenderMode( RENDER_MODE_FLAT );
20692069

2070-
for ( int i = 0; i < m_Faces.Count(); i++ )
2070+
for ( intp i = 0; i < m_Faces.Count(); i++ )
20712071
{
20722072
CMapFace *pFace = m_Faces.Element( i );
20732073
if( !pFace )

hammer/studiomodel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void CStudioFileChangeWatcher::Update()
354354
}
355355
}
356356

357-
m_ChangedModels.Purge();
357+
m_ChangedModels.Purge();
358358

359359
for ( int i=0; i < CMapDoc::GetDocumentCount(); i++ )
360360
{
@@ -1088,8 +1088,8 @@ int StudioModel::SetSkin( int iValue )
10881088
{
10891089
GetTriangles_MaterialBatch_t &materialBatch = tris.m_MaterialBatches[batchID];
10901090
1091-
int numStrips = materialBatch.m_TriListIndices.Count() / 3;
1092-
int numVertices = materialBatch.m_Verts.Count();
1091+
intp numStrips = materialBatch.m_TriListIndices.Count() / 3;
1092+
intp numVertices = materialBatch.m_Verts.Count();
10931093
10941094
POINT *points = (POINT*)_alloca( sizeof(POINT) * numVertices );
10951095

hammer/texturebrowser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void CTextureBrowser::SetUsed(BOOL bUsed)
193193
GetActiveWorld()->GetUsedTextures(Used);
194194

195195
m_TextureSubList.RemoveAll();
196-
for (int i = 0; i < Used.Count(); i++)
196+
for (intp i = 0; i < Used.Count(); i++)
197197
{
198198
TextureWindowTex_t Tex;
199199
Tex.pTex = Used.Element(i).pTex;

hammer/texturesystem.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,25 +140,25 @@ void CTextureSystem::FreeAllTextures()
140140
m_pCubemapTexture = NULL;
141141
}
142142

143-
int nContextCount = m_TextureContexts.Count();
144-
for (int nContext = 0; nContext < nContextCount; nContext++)
143+
intp nContextCount = m_TextureContexts.Count();
144+
for (intp nContext = 0; nContext < nContextCount; nContext++)
145145
{
146146
TextureContext_t *pContext = &m_TextureContexts.Element(nContext);
147147

148148
//
149149
// Delete all the texture groups for this context.
150150
//
151-
int nGroupCount = pContext->Groups.Count();
152-
for (int nGroup = 0; nGroup < nGroupCount; nGroup++)
151+
intp nGroupCount = pContext->Groups.Count();
152+
for (intp nGroup = 0; nGroup < nGroupCount; nGroup++)
153153
{
154154
delete pContext->Groups.Element(nGroup);
155155
}
156156

157157
//
158158
// Delete dummy textures.
159159
//
160-
int nDummyCount = pContext->Dummies.Count();
161-
for (int nDummy = 0; nDummy < nDummyCount; nDummy++)
160+
intp nDummyCount = pContext->Dummies.Count();
161+
for (intp nDummy = 0; nDummy < nDummyCount; nDummy++)
162162
{
163163
IEditorTexture *pTex = pContext->Dummies.Element(nDummy);
164164
delete pTex;
@@ -168,7 +168,7 @@ void CTextureSystem::FreeAllTextures()
168168
//
169169
// Delete all the textures from the master list.
170170
//
171-
for (int i = 0; i < m_Textures.Count(); i++)
171+
for (intp i = 0; i < m_Textures.Count(); i++)
172172
{
173173
IEditorTexture *pTex = m_Textures[i];
174174
delete pTex;
@@ -369,8 +369,8 @@ IEditorTexture *CTextureSystem::FindActiveTexture(LPCSTR pszInputName, int *piIn
369369
//
370370
if (m_pActiveContext)
371371
{
372-
int nDummyCount = m_pActiveContext->Dummies.Count();
373-
for (int nDummy = 0; nDummy < nDummyCount; nDummy++)
372+
intp nDummyCount = m_pActiveContext->Dummies.Count();
373+
for (intp nDummy = 0; nDummy < nDummyCount; nDummy++)
374374
{
375375
IEditorTexture *pTexDummy = m_pActiveContext->Dummies.Element(nDummy);
376376
if (!strcmpi(pszName, pTexDummy->GetName()))
@@ -1020,7 +1020,7 @@ DWORD CTextureSystem::LoadGraphicsFile(const char *pFilename)
10201020
//
10211021
// Make sure it's not already there.
10221022
//
1023-
int i = m_GraphicsFiles.Count() - 1;
1023+
intp i = m_GraphicsFiles.Count() - 1;
10241024
while (i > -1)
10251025
{
10261026
if (!strcmp(m_GraphicsFiles[i].filename, pFilename))
@@ -1177,7 +1177,7 @@ void CTextureSystem::RegisterTextureKeywords( IEditorTexture *pTexture )
11771177
// dvs: hide in a Find function
11781178
bool bFound = false;
11791179

1180-
for( int pos=0; pos < m_Keywords.Count(); pos++ )
1180+
for( intp pos=0; pos < m_Keywords.Count(); pos++ )
11811181
{
11821182
const char *pszTest = m_Keywords.Element(pos);
11831183
if (!stricmp(pszTest, pch))
@@ -1282,7 +1282,7 @@ void CTextureGroup::Sort(void)
12821282

12831283
// Redo the name map.
12841284
m_TextureNameMap.RemoveAll();
1285-
for ( int i=0; i < m_Textures.Count(); i++ )
1285+
for ( intp i=0; i < m_Textures.Count(); i++ )
12861286
{
12871287
IEditorTexture *pTex = m_Textures[i];
12881288
m_TextureNameMap.Insert( pTex->GetName(), i );
@@ -1297,7 +1297,7 @@ void CTextureGroup::Sort(void)
12971297
// Purpose: Retrieves a texture by index.
12981298
// Input : nIndex - Index of the texture in this group.
12991299
//-----------------------------------------------------------------------------
1300-
IEditorTexture *CTextureGroup::GetTexture(int nIndex)
1300+
IEditorTexture *CTextureGroup::GetTexture(intp nIndex)
13011301
{
13021302
if ((nIndex >= m_Textures.Count()) || (nIndex < 0))
13031303
{

hammer/texturesystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CTextureGroup
5454
void AddTexture(IEditorTexture *pTexture);
5555
void Sort(void);
5656

57-
IEditorTexture *GetTexture(int nIndex);
57+
IEditorTexture *GetTexture(intp nIndex);
5858
IEditorTexture* GetTexture( char const* pName );
5959

6060
// Fast find texture..
@@ -71,7 +71,7 @@ class CTextureGroup
7171
CUtlDict<intp,intp> m_TextureNameMap; // Maps the texture name to an index into m_Textures (the key is IEditorTexture::GetName).
7272

7373
// Used to lazily load the textures in the group
74-
int m_nTextureToLoad;
74+
intp m_nTextureToLoad;
7575
};
7676

7777

0 commit comments

Comments
 (0)