Skip to content

Commit ab3f22d

Browse files
committed
particles: int -> unsigned short for vertex count
1 parent 80f844d commit ab3f22d

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

particles/builtin_particle_render_ops.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,19 +275,22 @@ class C_OP_RenderSprites : public C_OP_RenderPoints
275275
virtual void InitParams( CParticleSystemDefinition *pDef, CDmxElement *pElement );
276276
virtual int GetParticlesToRender( CParticleCollection *pParticles, void *pContext, int nFirstParticle, int nRemainingVertices, int nRemainingIndices, int *pVertsUsed, int *pIndicesUsed ) const;
277277
virtual void Render( IMatRenderContext *pRenderContext, CParticleCollection *pParticles, void *pContext ) const;
278-
virtual void RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const;
278+
// dimhotepus: int -> unsigned short.
279+
virtual void RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const;
279280
void RenderSpriteCard( CMeshBuilder &meshBuilder, C_OP_RenderSpritesContext_t *pCtx, SpriteRenderInfo_t& info, int hParticle, ParticleRenderData_t const *pSortList, Vector *pCamera ) const;
280281
void RenderTwoSequenceSpriteCard( CMeshBuilder &meshBuilder, C_OP_RenderSpritesContext_t *pCtx, SpriteRenderInfo_t& info, int hParticle, ParticleRenderData_t const *pSortList, Vector *pCamera ) const;
281282

282283
void RenderNonSpriteCardCameraFacing( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, IMaterial *pMaterial ) const;
283284

284285
void RenderNonSpriteCardZRotating( CMeshBuilder &meshBuilder, C_OP_RenderSpritesContext_t *pCtx, SpriteRenderInfo_t& info, int hParticle, const Vector& vecCameraPos, ParticleRenderData_t const *pSortList ) const;
285286
void RenderNonSpriteCardZRotating( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, IMaterial *pMaterial ) const;
286-
void RenderUnsortedNonSpriteCardZRotating( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const;
287+
// dimhotepus: int -> unsigned short.
288+
void RenderUnsortedNonSpriteCardZRotating( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const;
287289

288290
void RenderNonSpriteCardOriented( CMeshBuilder &meshBuilder, C_OP_RenderSpritesContext_t *pCtx, SpriteRenderInfo_t& info, int hParticle, const Vector& vecCameraPos, ParticleRenderData_t const *pSortList, bool bUseYaw ) const;
289291
void RenderNonSpriteCardOriented( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, IMaterial *pMaterial, bool bUseYaw ) const;
290-
void RenderUnsortedNonSpriteCardOriented( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const;
292+
// dimhotepus: int -> unsigned short.
293+
void RenderUnsortedNonSpriteCardOriented( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const;
291294

292295
// cycles per second
293296
float m_flAnimationRate;
@@ -682,7 +685,8 @@ void C_OP_RenderSprites::RenderNonSpriteCardZRotating( CParticleCollection *pPar
682685
}
683686
}
684687

685-
void C_OP_RenderSprites::RenderUnsortedNonSpriteCardZRotating( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const
688+
// dimhotepus: int -> unsigned short.
689+
void C_OP_RenderSprites::RenderUnsortedNonSpriteCardZRotating( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const
686690
{
687691
C_OP_RenderSpritesContext_t *pCtx = reinterpret_cast<C_OP_RenderSpritesContext_t *>( pContext );
688692
// NOTE: This is interesting to support because at first we won't have all the various
@@ -887,8 +891,8 @@ void C_OP_RenderSprites::RenderNonSpriteCardOriented( CParticleCollection *pPart
887891
pMesh->Draw();
888892
}
889893
}
890-
891-
void C_OP_RenderSprites::RenderUnsortedNonSpriteCardOriented( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const
894+
// dimhotepus: int -> unsigned short.
895+
void C_OP_RenderSprites::RenderUnsortedNonSpriteCardOriented( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const
892896
{
893897
C_OP_RenderSpritesContext_t *pCtx = reinterpret_cast<C_OP_RenderSpritesContext_t *>( pContext );
894898
// NOTE: This is interesting to support because at first we won't have all the various
@@ -1288,8 +1292,8 @@ void C_OP_RenderSprites::Render( IMatRenderContext *pRenderContext, CParticleCol
12881292
}
12891293
}
12901294

1291-
1292-
void C_OP_RenderSprites::RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const
1295+
// dimhotepus: int -> unsigned short.
1296+
void C_OP_RenderSprites::RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const
12931297
{
12941298
if ( !pParticles->m_pDef->GetMaterial()->IsSpriteCard() )
12951299
{
@@ -1353,7 +1357,8 @@ struct SpriteTrailRenderInfo_t : public SpriteRenderInfo_t
13531357
// size_t m_nCreationTimeStride;
13541358

13551359

1356-
void Init( CParticleCollection *pParticles, int nVertexOffset, float flAgeScale, CSheet *pSheet )
1360+
// dimhotepus: int -> unsigned short.
1361+
void Init( CParticleCollection *pParticles, unsigned short nVertexOffset, float flAgeScale, CSheet *pSheet )
13571362
{
13581363
SpriteRenderInfo_t::Init( pParticles, nVertexOffset, flAgeScale, 0, pSheet );
13591364
m_pParticles = pParticles;
@@ -1407,7 +1412,8 @@ class C_OP_RenderSpritesTrail : public CParticleRenderOperatorInstance
14071412

14081413
virtual int GetParticlesToRender( CParticleCollection *pParticles, void *pContext, int nFirstParticle, int nRemainingVertices, int nRemainingIndices, int *pVertsUsed, int *pIndicesUsed ) const ;
14091414
virtual void Render( IMatRenderContext *pRenderContext, CParticleCollection *pParticles, void *pContext ) const;
1410-
virtual void RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const;
1415+
// dimhotepus: int -> unsigned short.
1416+
virtual void RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const;
14111417

14121418
void RenderSpriteTrail( CMeshBuilder &meshBuilder, SpriteTrailRenderInfo_t& info, int hParticle, const Vector &vecCameraPos, float flOODt, ParticleRenderData_t const *pSortlist ) const;
14131419

@@ -1619,8 +1625,8 @@ void C_OP_RenderSpritesTrail::Render( IMatRenderContext *pRenderContext, CPartic
16191625
pMesh->Draw();
16201626
}
16211627
}
1622-
1623-
void C_OP_RenderSpritesTrail::RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, int nVertexOffset, int nFirstParticle, int nParticleCount ) const
1628+
// dimhotepus: int -> unsigned short.
1629+
void C_OP_RenderSpritesTrail::RenderUnsorted( CParticleCollection *pParticles, void *pContext, IMatRenderContext *pRenderContext, CMeshBuilder &meshBuilder, unsigned short nVertexOffset, int nFirstParticle, int nParticleCount ) const
16241630
{
16251631
C_OP_RenderSpriteTrailContext_t *pCtx = reinterpret_cast<C_OP_RenderSpriteTrailContext_t *>( pContext );
16261632
// NOTE: This is interesting to support because at first we won't have all the various

0 commit comments

Comments
 (0)