aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-07-19 11:31:19 +0200
committerStrangerke2013-07-19 11:31:19 +0200
commit37a115e60b281dffa272f19060c6747c4af79ad9 (patch)
tree0e443372f3dd888b17f126de9cb96b23c27685b7 /engines
parentdf7d181a6070b0400c38676514a43fbcfcfb0b8f (diff)
downloadscummvm-rg350-37a115e60b281dffa272f19060c6747c4af79ad9.tar.gz
scummvm-rg350-37a115e60b281dffa272f19060c6747c4af79ad9.tar.bz2
scummvm-rg350-37a115e60b281dffa272f19060c6747c4af79ad9.zip
MORTEVIELLE: Use width and height provided by Graphics::Surface
Diffstat (limited to 'engines')
-rw-r--r--engines/mortevielle/graphics.cpp14
-rw-r--r--engines/mortevielle/graphics.h1
2 files changed, 7 insertions, 8 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index c6356f48db..0ac43a65da 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -86,7 +86,7 @@ void PaletteManager::setDefaultPalette() {
#define BUFFER_SIZE 40000
void GfxSurface::decode(const byte *pSrc) {
- _width = _height = 0;
+ w = h = 0;
// If no transparency, use invalid (for EGA) palette index of 16. Otherwise get index to use
_transparency = (*pSrc == 0) ? 16 : *(pSrc + 2);
bool offsetFlag = *pSrc++ == 0;
@@ -413,27 +413,27 @@ void GfxSurface::decode(const byte *pSrc) {
pSrc = pSrcStart;
debugC(2, kMortevielleGraphics, "Decoding image block %d position %d,%d size %d,%d method %d",
- entryIndex + 1, _xp, _yp, _width, _height, decomIndex);
+ entryIndex + 1, _xp, _yp, w, h, decomIndex);
}
// At this point, the outputBuffer has the data for the image. Initialize the surface
// with the calculated size, and copy the lines to the surface
- create(_width, _height, Graphics::PixelFormat::createFormatCLUT8());
+ create(w, h, Graphics::PixelFormat::createFormatCLUT8());
- for (int yCtr = 0; yCtr < _height; ++yCtr) {
+ for (int yCtr = 0; yCtr < h; ++yCtr) {
const byte *copySrc = &outputBuffer[yCtr * DEFAULT_WIDTH];
byte *copyDest = (byte *)getBasePtr(0, yCtr);
- Common::copy(copySrc, copySrc + _width, copyDest);
+ Common::copy(copySrc, copySrc + w, copyDest);
}
}
void GfxSurface::majTtxTty() {
if (!_yp)
- _width += _xSize;
+ w += _xSize;
if (!_xp)
- _height += _ySize;
+ h += _ySize;
}
/**
diff --git a/engines/mortevielle/graphics.h b/engines/mortevielle/graphics.h
index fe8b365bfa..e31f5da29a 100644
--- a/engines/mortevielle/graphics.h
+++ b/engines/mortevielle/graphics.h
@@ -56,7 +56,6 @@ private:
bool _nibbleFlag;
int _thickness;
int _yInc, _yEnd, _xInc, _xEnd;
- int _width, _height;
byte nextNibble(const byte *&pSrc);
byte nextByte(const byte *&pSrc, const byte *&pLookup);