* @brief Blit CL2 sprite, and apply lighting, to the back buffer at the given coordinates * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param pCelBuff CL2 buffer * @param nCel CL2 frame number * @param nWidth Width of sprite */
| 1410 | * @param nWidth Width of sprite |
| 1411 | */ |
| 1412 | void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) |
| 1413 | { |
| 1414 | int nDataSize; |
| 1415 | BYTE *pRLEBytes, *pDecodeTo; |
| 1416 | |
| 1417 | assert(gpBuffer != NULL); |
| 1418 | assert(pCelBuff != NULL); |
| 1419 | assert(nCel > 0); |
| 1420 | |
| 1421 | pRLEBytes = CelGetFrameClipped(pCelBuff, nCel, &nDataSize); |
| 1422 | pDecodeTo = &gpBuffer[sx + BUFFER_WIDTH * sy]; |
| 1423 | |
| 1424 | if (light_table_index) |
| 1425 | Cl2BlitLightSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth, &pLightTbl[light_table_index * 256]); |
| 1426 | else |
| 1427 | Cl2BlitSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth); |
| 1428 | } |
| 1429 | |
| 1430 | /** |
| 1431 | * @brief Fade to black and play a video |
no test coverage detected