inventory items rendering cleanup (#1938)
This commit is contained in:
parent
8ac9047b4f
commit
89c40eaa7b
4 changed files with 37 additions and 39 deletions
|
|
@ -647,12 +647,20 @@ void CelClippedDrawLightTo(const CelOutputBuffer &out, int sx, int sy, const Cel
|
|||
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;
|
||||
const auto *pRLEBytes = CelGetFrameClipped(cel.Data(), frame, &nDataSize);
|
||||
const std::uint8_t *tbl = GetLightTable(light);
|
||||
RenderCelWithLightTable(out, { sx, sy }, pRLEBytes, nDataSize, cel.Width(frame), tbl);
|
||||
RenderCelWithLightTable(out, { sx, sy }, pRLEBytes, nDataSize, cel.Width(frame), GetLightTable(1));
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
@ -678,11 +686,11 @@ void CelClippedBlitLightTransTo(const CelOutputBuffer &out, int sx, int sy, cons
|
|||
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;
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue