|
|
|
@ -647,12 +647,20 @@ void CelClippedDrawLightTo(const CelOutputBuffer &out, int sx, int sy, const Cel |
|
|
|
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, cel.Width(frame)); |
|
|
|
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, cel.Width(frame)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CelDrawLightRedTo(const CelOutputBuffer &out, int sx, int sy, const CelSprite &cel, int frame, char light) |
|
|
|
void CelDrawLightRedTo(const CelOutputBuffer &out, int sx, int sy, const CelSprite &cel, int frame) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int nDataSize; |
|
|
|
int nDataSize; |
|
|
|
const auto *pRLEBytes = CelGetFrameClipped(cel.Data(), frame, &nDataSize); |
|
|
|
const auto *pRLEBytes = CelGetFrameClipped(cel.Data(), frame, &nDataSize); |
|
|
|
const std::uint8_t *tbl = GetLightTable(light); |
|
|
|
RenderCelWithLightTable(out, { sx, sy }, pRLEBytes, nDataSize, cel.Width(frame), GetLightTable(1)); |
|
|
|
RenderCelWithLightTable(out, { sx, sy }, pRLEBytes, nDataSize, cel.Width(frame), tbl); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CelDrawItem(bool usable, const CelOutputBuffer &out, int x, int y, const CelSprite &cel, int frame) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (usable) { |
|
|
|
|
|
|
|
CelDrawLightRedTo(out, x, y, cel, frame); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
CelClippedDrawTo(out, x, y, cel, frame); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CelClippedDrawSafeTo(const CelOutputBuffer &out, int sx, int sy, const CelSprite &cel, int frame) |
|
|
|
void CelClippedDrawSafeTo(const CelOutputBuffer &out, int sx, int sy, const CelSprite &cel, int frame) |
|
|
|
@ -678,11 +686,11 @@ void CelClippedBlitLightTransTo(const CelOutputBuffer &out, int sx, int sy, cons |
|
|
|
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, cel.Width(frame)); |
|
|
|
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, cel.Width(frame)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CelDrawLightRedSafeTo(const CelOutputBuffer &out, int sx, int sy, const CelSprite &cel, int frame, char light) |
|
|
|
void CelDrawLightRedSafeTo(const CelOutputBuffer &out, int sx, int sy, const CelSprite &cel, int frame) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int nDataSize; |
|
|
|
int nDataSize; |
|
|
|
const auto *pRLEBytes = CelGetFrameClipped(cel.Data(), frame, &nDataSize); |
|
|
|
const auto *pRLEBytes = CelGetFrameClipped(cel.Data(), frame, &nDataSize); |
|
|
|
RenderCelWithLightTable(out, { sx, sy }, pRLEBytes, nDataSize, cel.Width(frame), GetLightTable(light)); |
|
|
|
RenderCelWithLightTable(out, { sx, sy }, pRLEBytes, nDataSize, cel.Width(frame), GetLightTable(1)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CelDrawUnsafeTo(const CelOutputBuffer &out, int x, int y, const CelSprite &cel, int frame) |
|
|
|
void CelDrawUnsafeTo(const CelOutputBuffer &out, int x, int y, const CelSprite &cel, int frame) |
|
|
|
|