MCPcopy Create free account
hub / github.com/ddnet/ddnet / RenderIcon

Method RenderIcon

src/game/client/render.cpp:143–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void CRenderTools::RenderIcon(int ImageId, int SpriteId, const CUIRect *pRect, const ColorRGBA *pColor) const
144{
145 Graphics()->TextureSet(g_pData->m_aImages[ImageId].m_Id);
146 Graphics()->QuadsBegin();
147 Graphics()->SelectSprite(SpriteId);
148 if(pColor)
149 Graphics()->SetColor(pColor->r * pColor->a, pColor->g * pColor->a, pColor->b * pColor->a, pColor->a);
150 IGraphics::CQuadItem QuadItem(pRect->x, pRect->y, pRect->w, pRect->h);
151 Graphics()->QuadsDrawTL(&QuadItem, 1);
152 Graphics()->QuadsEnd();
153}
154
155void CRenderTools::GetRenderTeeAnimScaleAndBaseSize(const CTeeRenderInfo *pInfo, float &AnimScale, float &BaseSize)
156{

Callers 1

RenderPlayersMethod · 0.80

Calls 7

GraphicsFunction · 0.85
TextureSetMethod · 0.80
QuadsBeginMethod · 0.80
SelectSpriteMethod · 0.80
QuadsDrawTLMethod · 0.80
QuadsEndMethod · 0.80
SetColorMethod · 0.45

Tested by

no test coverage detected