From bb71d9e67736d4b6c08b4f8e6d780cf8a94113b7 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sat, 31 Aug 2002 18:46:00 +0000 Subject: fixes svn-id: r4887 --- scumm/gfx.cpp | 26 +++++++++++++------------- scumm/string.cpp | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'scumm') diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 63c5151593..1c86df458b 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -225,15 +225,15 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b) b = vs->height; height = b - t; - if (height > _realHeight) - height = _realHeight; + if (height > _vm->_realHeight) + height = _vm->_realHeight; - scrollY = _vm->camera._cur.y - (_realHeight / 2); - if (scrollY == -(_realHeight / 2)) + scrollY = _vm->camera._cur.y - (_vm->_realHeight / 2); + if (scrollY == -(_vm->_realHeight / 2)) scrollY = 0; - ptr = vs->screenPtr + (t * NUM_STRIPS + x) * 8 + _readOffs + scrollY * _realWidth; - _vm->_system->copy_rect(ptr, _realWidth, x * 8, vs->topline + t, w, height); + ptr = vs->screenPtr + (t * NUM_STRIPS + x) * 8 + _readOffs + scrollY * _vm->_realWidth; + _vm->_system->copy_rect(ptr, _vm->_realWidth, x * 8, vs->topline + t, w, height); } void blit(byte *dst, byte *src, int w, int h) @@ -872,7 +872,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, twobufs = vs->alloctwobuffers; - _vertStripNextInc = h * _realWidth - 1; + _vertStripNextInc = h * _vm->_realWidth - 1; _numLinesToProcess = h; @@ -1138,8 +1138,8 @@ void Gdi::draw8ColWithMasking() ((uint32 *)dst)[0] = ((uint32 *)src)[0]; ((uint32 *)dst)[1] = ((uint32 *)src)[1]; } - src += _realWidth; - dst += _realWidth; + src += _vm->_realWidth; + dst += _vm->_realWidth; mask += NUM_STRIPS; } while (--height); } @@ -1187,7 +1187,7 @@ void Gdi::clear8Col() do { ((uint32 *)dst)[0] = 0; ((uint32 *)dst)[1] = 0; - dst += _realWidth; + dst += _vm->_realWidth; } while (--height); } @@ -1508,7 +1508,7 @@ void Gdi::unkDecode6() _tempNumLines = _numLinesToProcess; do { FILL_BITS *dst = color + _palette_mod; - dst += _realWidth; + dst += _vm->_realWidth; if (!READ_BIT) { } else if (!READ_BIT) { FILL_BITS color = bits & _decomp_mask; @@ -1532,7 +1532,7 @@ void Gdi::unkDecode6() bits = ((buffer & mask) != 0); #define NEXT_ROW \ - dst += _realWidth; \ + dst += _vm->_realWidth; \ if (--h == 0) { \ if (!--_currentX) \ return; \ @@ -1565,7 +1565,7 @@ void Gdi::unkDecode7() ((uint32 *)dst)[0] = ((uint32 *)src)[0]; ((uint32 *)dst)[1] = ((uint32 *)src)[1]; #endif - dst += _realWidth; + dst += _vm->_realWidth; src += 8; } while (--height); } diff --git a/scumm/string.cpp b/scumm/string.cpp index b2fea7fc4a..2509811e32 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -813,7 +813,7 @@ void CharsetRenderer::printCharOld(int chr) _unk12 = 0; } char_ptr = _vm->getResourceAddress(rtCharset, _curId) + 224 + (chr + 1) * 8; - dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _realWidth + _left; + dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left; _vm->updateDirtyRect(vs->number, _left, _left + 8, _top - vs->topline, _top - vs->topline + 8, 0); for (y = 0; y < 8; y++) { @@ -824,7 +824,7 @@ void CharsetRenderer::printCharOld(int chr) } color = ((buffer & mask) != 0); if (color) - *(dest_ptr + y * _realWidth + x) = _color; + *(dest_ptr + y * _vm->_realWidth + x) = _color; } } @@ -937,7 +937,7 @@ void CharsetRenderer::printChar(int chr) _hasMask = true; #endif - _dest_ptr = _backbuff_ptr = vs->screenPtr + vs->xstart + _drawTop * _realWidth + _left; + _dest_ptr = _backbuff_ptr = vs->screenPtr + vs->xstart + _drawTop * _vm->_realWidth + _left; #if !defined(OLD) if (_blitAlso) { @@ -945,7 +945,7 @@ void CharsetRenderer::printChar(int chr) if (1) { #endif _dest_ptr = _bgbak_ptr = _vm->getResourceAddress(rtBuffer, vs->number + 5) - + vs->xstart + _drawTop * _realWidth + _left; + + vs->xstart + _drawTop * _vm->_realWidth + _left; } _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) @@ -1012,7 +1012,7 @@ void CharsetRenderer::drawBits() maskpos++; } } - dst = (_dest_ptr += _realWidth); + dst = (_dest_ptr += _vm->_realWidth); mask += 40; y++; } -- cgit v1.2.3