MCPcopy Create free account
hub / github.com/diasurgical/devilution / CelClippedDraw

Function CelClippedDraw

Source/engine.cpp:65–80  ·  view source on GitHub ↗

* @brief Same as CelDraw but with the option to skip parts of the top and bottom of the sprite * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param pCelBuff Cel data * @param nCel CEL frame number * @param nWidth Width of sprite */

Source from the content-addressed store, hash-verified

63 * @param nWidth Width of sprite
64 */
65void CelClippedDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
66{
67 BYTE *pRLEBytes;
68 int nDataSize;
69
70 assert(gpBuffer);
71 assert(pCelBuff != NULL);
72
73 pRLEBytes = CelGetFrameClipped(pCelBuff, nCel, &nDataSize);
74
75 CelBlitSafe(
76 &gpBuffer[sx + BUFFER_WIDTH * sy],
77 pRLEBytes,
78 nDataSize,
79 nWidth);
80}
81
82/**
83 * @brief Blit CEL sprite, and apply lighting, to the back buffer at the given coordinates

Callers 5

DrawInvFunction · 0.85
DrawInvBeltFunction · 0.85
DrawObjectFunction · 0.85
DrawMonsterHelperFunction · 0.85
scrollrt_draw_dungeonFunction · 0.85

Calls 2

CelGetFrameClippedFunction · 0.85
CelBlitSafeFunction · 0.85

Tested by

no test coverage detected