* @brief Same as CelClippedDraw but checks for drawing outside the buffer * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param pCelBuff Cel data * @param nCel CEL frame number * @param nWidth Width of sprite */
| 230 | * @param nWidth Width of sprite |
| 231 | */ |
| 232 | void CelClippedDrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) |
| 233 | { |
| 234 | BYTE *pRLEBytes; |
| 235 | int nDataSize; |
| 236 | |
| 237 | assert(gpBuffer); |
| 238 | assert(pCelBuff != NULL); |
| 239 | |
| 240 | pRLEBytes = CelGetFrameClipped(pCelBuff, nCel, &nDataSize); |
| 241 | |
| 242 | CelBlitSafe( |
| 243 | &gpBuffer[sx + BUFFER_WIDTH * sy], |
| 244 | pRLEBytes, |
| 245 | nDataSize, |
| 246 | nWidth); |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * @brief Blit CEL sprite, and apply lighting, to the given buffer, checks for drawing outside the buffer |
no test coverage detected