mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
const-correctness
This was SVN commit r7355.
This commit is contained in:
parent
5293aee71d
commit
79ea8213e5
4 changed files with 6 additions and 6 deletions
|
|
@ -158,7 +158,7 @@ void CMaterial::SetPlayerColor(size_t id)
|
|||
m_PlayerID = id;
|
||||
}
|
||||
|
||||
void CMaterial::SetPlayerColor(CColor& colour)
|
||||
void CMaterial::SetPlayerColor(const CColor& colour)
|
||||
{
|
||||
m_TextureColor = SMaterialColor(colour.r, colour.g, colour.b, colour.a);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
void SetPlayerColor_PerPlayer() { m_PlayerID = PLAYER_ID_COMING_SOON; }
|
||||
void SetPlayerColor_PerObject() { m_PlayerID = PLAYER_ID_OTHER; }
|
||||
void SetPlayerColor(size_t id);
|
||||
void SetPlayerColor(CColor &colour);
|
||||
void SetPlayerColor(const CColor &colour);
|
||||
|
||||
void SetTexture(const CStr& texture);
|
||||
void SetVertexProgram(const CStr& prog);
|
||||
|
|
|
|||
|
|
@ -509,12 +509,12 @@ void CModel::SetPlayerID(size_t id)
|
|||
it->m_Model->SetPlayerID(id);
|
||||
}
|
||||
|
||||
void CModel::SetPlayerColor(CColor& colour)
|
||||
void CModel::SetPlayerColor(const CColor& colour)
|
||||
{
|
||||
m_Material.SetPlayerColor(colour);
|
||||
}
|
||||
|
||||
void CModel::SetShadingColor(CColor& colour)
|
||||
void CModel::SetShadingColor(const CColor& colour)
|
||||
{
|
||||
m_ShadingColor = colour;
|
||||
for( std::vector<Prop>::iterator it = m_Props.begin(); it != m_Props.end(); ++it )
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ public:
|
|||
// should normally be used instead.
|
||||
void SetPlayerID(size_t id);
|
||||
// set the model's player colour
|
||||
void SetPlayerColor(CColor& colour);
|
||||
void SetPlayerColor(const CColor& colour);
|
||||
// set the models mod color
|
||||
void SetShadingColor(CColor& colour);
|
||||
void SetShadingColor(const CColor& colour);
|
||||
// get the model's texture
|
||||
CTexture* GetTexture() { return &m_Texture; }
|
||||
// get the models material
|
||||
|
|
|
|||
Loading…
Reference in a new issue