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

Function Cl2DrawOutline

Source/engine.cpp:1184–1203  ·  view source on GitHub ↗

* @brief Blit a solid colder shape one pixel larger then the given sprite shape, to the back buffer at the given coordianates * @param col Color index from current palette * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param pCelBuff CL2 buffer * @param nCel CL2 frame number * @param nWidth Width of sprite */

Source from the content-addressed store, hash-verified

1182 * @param nWidth Width of sprite
1183 */
1184void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
1185{
1186 int nDataSize;
1187 BYTE *pRLEBytes;
1188
1189 assert(gpBuffer != NULL);
1190 assert(pCelBuff != NULL);
1191 assert(nCel > 0);
1192
1193 pRLEBytes = CelGetFrameClipped(pCelBuff, nCel, &nDataSize);
1194
1195 gpBufEnd -= BUFFER_WIDTH;
1196 Cl2BlitOutlineSafe(
1197 &gpBuffer[sx + BUFFER_WIDTH * sy],
1198 pRLEBytes,
1199 nDataSize,
1200 nWidth,
1201 col);
1202 gpBufEnd += BUFFER_WIDTH;
1203}
1204
1205/**
1206 * @brief Blit a solid colder shape one pixel larger then the given sprite shape, to the given buffer

Callers 2

DrawPlayerFunction · 0.85
DrawMonsterHelperFunction · 0.85

Calls 2

CelGetFrameClippedFunction · 0.85
Cl2BlitOutlineSafeFunction · 0.85

Tested by

no test coverage detected