* @brief Blit CEL sprite, and apply lighting, to the back buffer at the given coordinates * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param pCelBuff Cel data * @param nCel CEL frame number * @param nWidth Width of sprite */
| 88 | * @param nWidth Width of sprite |
| 89 | */ |
| 90 | void CelDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, BYTE *tbl) |
| 91 | { |
| 92 | int nDataSize; |
| 93 | BYTE *pDecodeTo, *pRLEBytes; |
| 94 | |
| 95 | assert(gpBuffer); |
| 96 | assert(pCelBuff != NULL); |
| 97 | |
| 98 | pRLEBytes = CelGetFrame(pCelBuff, nCel, &nDataSize); |
| 99 | pDecodeTo = &gpBuffer[sx + BUFFER_WIDTH * sy]; |
| 100 | |
| 101 | if (light_table_index || tbl) |
| 102 | CelBlitLightSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth, tbl); |
| 103 | else |
| 104 | CelBlitSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * @brief Same as CelDrawLight but with the option to skip parts of the top and bottom of the sprite |
no test coverage detected