mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
NEVERHOOD: Add drawDoubleSurface2Alpha
This commit is contained in:
parent
03a59a2953
commit
f4da2d054a
@ -276,6 +276,31 @@ void Screen::drawDoubleSurface2(const Graphics::Surface *surface, NDrawRect &dra
|
||||
|
||||
}
|
||||
|
||||
void Screen::drawDoubleSurface2Alpha(const Graphics::Surface *surface, NDrawRect &drawRect, byte alphaColor) {
|
||||
|
||||
const byte *source = (const byte*)surface->getPixels();
|
||||
byte *dest = (byte*)_backScreen->getBasePtr(drawRect.x, drawRect.y);
|
||||
|
||||
for (int16 yc = 0; yc < surface->h; yc++) {
|
||||
byte *row = dest;
|
||||
for (int16 xc = 0; xc < surface->w; xc++) {
|
||||
if (*source != alphaColor) {
|
||||
row[0] = *source;
|
||||
row[1] = *source;
|
||||
row[_backScreen->pitch] = *source;
|
||||
row[_backScreen->pitch + 1] = *source;
|
||||
}
|
||||
source++;
|
||||
row += 2;
|
||||
}
|
||||
dest += _backScreen->pitch;
|
||||
dest += _backScreen->pitch;
|
||||
}
|
||||
|
||||
_fullRefresh = true; // See Screen::update
|
||||
|
||||
}
|
||||
|
||||
void Screen::drawUnk(const Graphics::Surface *surface, NDrawRect &drawRect, NDrawRect &sysRect, NRect &clipRect, bool transparent, byte version) {
|
||||
|
||||
int16 x, y;
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
const Graphics::Surface *shadowSurface = NULL, byte alphaColor = 0);
|
||||
void drawSurface3(const Graphics::Surface *surface, int16 x, int16 y, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version);
|
||||
void drawDoubleSurface2(const Graphics::Surface *surface, NDrawRect &drawRect);
|
||||
void drawDoubleSurface2Alpha(const Graphics::Surface *surface, NDrawRect &drawRect, byte alphaColor);
|
||||
void drawUnk(const Graphics::Surface *surface, NDrawRect &drawRect, NDrawRect &sysRect, NRect &clipRect, bool transparent, byte version);
|
||||
void drawSurfaceClipRects(const Graphics::Surface *surface, NDrawRect &drawRect, NRect *clipRects, uint clipRectsCount, bool transparent, byte version);
|
||||
void setSmackerDecoder(Video::SmackerDecoder *smackerDecoder) { _smackerDecoder = smackerDecoder; }
|
||||
|
Loading…
Reference in New Issue
Block a user