diff options
author | Torbjörn Andersson | 2009-10-31 13:43:46 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-10-31 13:43:46 +0000 |
commit | 149d784d0b2be7c0a968f856557724b216cd8a95 (patch) | |
tree | afd4113c6bd102ac6486c1ca23ff7648d93bd0bf | |
parent | 2f7f5bb4f1e4635c33cf05aff3852ba967d99304 (diff) | |
download | scummvm-rg350-149d784d0b2be7c0a968f856557724b216cd8a95.tar.gz scummvm-rg350-149d784d0b2be7c0a968f856557724b216cd8a95.tar.bz2 scummvm-rg350-149d784d0b2be7c0a968f856557724b216cd8a95.zip |
Kirben suggested using vs->bytesPerPixel instead of _bytesPerPixel when drawing
the corners on the flashlight. He's probably right, since 'vs' is what we are
drawing to.
svn-id: r45561
-rw-r--r-- | engines/scumm/gfx.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index d290d12444..203d746184 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1374,14 +1374,14 @@ void ScummEngine_v5::drawFlashlight() { // rounded corners. static const int corner_data[] = { 8, 6, 4, 3, 2, 2, 1, 1 }; int minrow = 0; - int maxcol = (_flashlight.w - 1) * _bytesPerPixel; + int maxcol = (_flashlight.w - 1) * vs->bytesPerPixel; int maxrow = (_flashlight.h - 1) * vs->pitch; for (i = 0; i < 8; i++, minrow += vs->pitch, maxrow -= vs->pitch) { int d = corner_data[i]; for (j = 0; j < d; j++) { - if (_bytesPerPixel == 2) { + if (vs->bytesPerPixel == 2) { WRITE_UINT16(&_flashlight.buffer[minrow + 2 * j], 0); WRITE_UINT16(&_flashlight.buffer[minrow + maxcol - 2 * j], 0); WRITE_UINT16(&_flashlight.buffer[maxrow + 2 * j], 0); |