MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / DrawPlayerIconHelper

Function DrawPlayerIconHelper

Source/engine/render/scrollrt.cpp:389–406  ·  view source on GitHub ↗

* @brief Helper for rendering a specific player icon (Mana Shield or Reflect) */

Source from the content-addressed store, hash-verified

387 * @brief Helper for rendering a specific player icon (Mana Shield or Reflect)
388 */
389void DrawPlayerIconHelper(const Surface &out, MissileGraphicID missileGraphicId, Point position, bool lighting, bool infraVision)
390{
391 position.x -= GetMissileSpriteData(missileGraphicId).animWidth2;
392
393 const ClxSprite sprite = (*GetMissileSpriteData(missileGraphicId).sprites).list()[0];
394
395 if (!lighting) {
396 ClxDraw(out, position, sprite);
397 return;
398 }
399
400 if (infraVision) {
401 ClxDrawTRN(out, position, sprite, GetInfravisionTRN());
402 return;
403 }
404
405 ClxDrawLight(out, position, sprite, LightTableIndex);
406}
407
408/**
409 * @brief Helper for rendering player icons (Mana Shield and Reflect)

Callers 1

DrawPlayerIconsFunction · 0.85

Calls 5

ClxDrawFunction · 0.85
ClxDrawTRNFunction · 0.85
GetInfravisionTRNFunction · 0.85
ClxDrawLightFunction · 0.85
listMethod · 0.45

Tested by

no test coverage detected