* @brief Same as CelDrawLight 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 */
| 113 | * @param nWidth Width of sprite |
| 114 | */ |
| 115 | void CelClippedDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) |
| 116 | { |
| 117 | int nDataSize; |
| 118 | BYTE *pRLEBytes, *pDecodeTo; |
| 119 | |
| 120 | assert(gpBuffer); |
| 121 | assert(pCelBuff != NULL); |
| 122 | |
| 123 | pRLEBytes = CelGetFrameClipped(pCelBuff, nCel, &nDataSize); |
| 124 | pDecodeTo = &gpBuffer[sx + BUFFER_WIDTH * sy]; |
| 125 | |
| 126 | if (light_table_index) |
| 127 | CelBlitLightSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth, NULL); |
| 128 | else |
| 129 | CelBlitSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth); |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * @brief Blit CEL sprite, and apply lighting, to the back buffer at the given coordinates, translated to a red hue |
no test coverage detected