diff options
author | Eugene Sandulenko | 2016-12-26 19:13:07 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-12-26 19:13:28 +0100 |
commit | d4313bf6b50fe57f949ccb6dfd9f2accd885ed94 (patch) | |
tree | 1c5219e98c12cbe13c2ef038ba87ab578a85874f /engines/fullpipe/gfx.cpp | |
parent | 403d9538f2a59fa2b6858197935c218d67d9e158 (diff) | |
download | scummvm-rg350-d4313bf6b50fe57f949ccb6dfd9f2accd885ed94.tar.gz scummvm-rg350-d4313bf6b50fe57f949ccb6dfd9f2accd885ed94.tar.bz2 scummvm-rg350-d4313bf6b50fe57f949ccb6dfd9f2accd885ed94.zip |
FULLPIPE: Decrease header dependency
Diffstat (limited to 'engines/fullpipe/gfx.cpp')
-rw-r--r-- | engines/fullpipe/gfx.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 4dec4b640c..ea07621cd4 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -30,6 +30,7 @@ #include "fullpipe/gameloader.h" #include "common/memstream.h" +#include "graphics/transparent_surface.h" namespace Fullpipe { @@ -677,8 +678,8 @@ void Picture::displayPicture() { if (!_dataSize) return; - g_fp->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0); - g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(0, 0), g_fp->_backgroundSurface.pitch, 0, 0, 800, 600); + g_fp->_backgroundSurface->fillRect(Common::Rect(0, 0, 800, 600), 0); + g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface->getBasePtr(0, 0), g_fp->_backgroundSurface->pitch, 0, 0, 800, 600); draw(0, 0, 0, 0); @@ -858,8 +859,8 @@ void Bitmap::putDib(int x, int y, int32 *palette, byte alpha) { int alphac = TS_ARGB(0xff, alpha, 0xff, 0xff); - _surface->blit(g_fp->_backgroundSurface, x1, y1, _flipping, &sub, alphac); - g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(x1, y1), g_fp->_backgroundSurface.pitch, x1, y1, sub.width(), sub.height()); + _surface->blit(*g_fp->_backgroundSurface, x1, y1, _flipping, &sub, alphac); + g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface->getBasePtr(x1, y1), g_fp->_backgroundSurface->pitch, x1, y1, sub.width(), sub.height()); } bool Bitmap::putDibRB(int32 *palette) { @@ -1255,7 +1256,7 @@ DynamicPhase *Shadows::findSize(int width, int height) { void FullpipeEngine::drawAlphaRectangle(int x1, int y1, int x2, int y2, int alpha) { for (int y = y1; y < y2; y++) { - uint32 *ptr = (uint32 *)g_fp->_backgroundSurface.getBasePtr(x1, y); + uint32 *ptr = (uint32 *)g_fp->_backgroundSurface->getBasePtr(x1, y); for (int x = x1; x < x2; x++) { uint32 color = *ptr; @@ -1274,8 +1275,8 @@ void FullpipeEngine::sceneFade(Scene *sc, bool direction) { int ticks = g_fp->_system->getMillis(); sc->draw(); - drawAlphaRectangle(0, 0, g_fp->_backgroundSurface.w, g_fp->_backgroundSurface.h, direction ? dim : 255 - dim); - g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(0, 0), g_fp->_backgroundSurface.pitch, 0, 0, 800, 600); + drawAlphaRectangle(0, 0, g_fp->_backgroundSurface->w, g_fp->_backgroundSurface->h, direction ? dim : 255 - dim); + g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface->getBasePtr(0, 0), g_fp->_backgroundSurface->pitch, 0, 0, 800, 600); g_fp->_system->updateScreen(); ticks = g_fp->_system->getMillis() - ticks; |