diff options
author | Paweł Kołodziejski | 2002-10-24 06:28:54 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-10-24 06:28:54 +0000 |
commit | a125d1cc1a03a43b692391a34fb9a2dee36991a3 (patch) | |
tree | b444b33ee26c5f6eaa3a5697e9e48977d4e86a34 | |
parent | fe7343deccef267fe699edb637eb032aec2ecc64 (diff) | |
download | scummvm-rg350-a125d1cc1a03a43b692391a34fb9a2dee36991a3.tar.gz scummvm-rg350-a125d1cc1a03a43b692391a34fb9a2dee36991a3.tar.bz2 scummvm-rg350-a125d1cc1a03a43b692391a34fb9a2dee36991a3.zip |
changed number strips to dynamic and increased arrays tdirty and bdirty to 80
svn-id: r5296
-rw-r--r-- | scumm/actor.cpp | 4 | ||||
-rw-r--r-- | scumm/akos.cpp | 16 | ||||
-rw-r--r-- | scumm/akos.h | 2 | ||||
-rw-r--r-- | scumm/costume.cpp | 20 | ||||
-rw-r--r-- | scumm/costume.h | 3 | ||||
-rw-r--r-- | scumm/gfx.cpp | 84 | ||||
-rw-r--r-- | scumm/gfx.h | 9 | ||||
-rw-r--r-- | scumm/scumm.h | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 2 | ||||
-rw-r--r-- | scumm/verbs.cpp | 2 |
10 files changed, 73 insertions, 71 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 4412f2ea9e..7188b25c18 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1038,7 +1038,7 @@ void Scumm::setActorRedrawFlags(bool fg, bool bg) a->needBgReset = true; } } else { - for (i = 0; i < 40; i++) { + for (i = 0; i < gdi._numStrips; i++) { bits = gfxUsageBits[_screenStartStrip + i]; if (bits & 0x3FFFFFFF) { for (j = 0; j < NUM_ACTORS; j++) { @@ -1463,7 +1463,7 @@ void Scumm::resetActorBgs() int i; uint32 onlyActorFlags, bitpos; - for (i = 0; i < 40; i++) { + for (i = 0; i < gdi._numStrips; i++) { onlyActorFlags = (gfxUsageBits[_screenStartStrip + i] &= 0x3FFFFFFF); a = getFirstActor(); bitpos = 1; diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 7e11e6d504..3bfa501356 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -296,7 +296,7 @@ void AkosRenderer::codec1_genericDecode() && (!v1.mask_ptr || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))) { *dst = palette[color]; } - mask += 40; + mask += _numStrips; dst += outwidth; y++; } @@ -364,7 +364,7 @@ void AkosRenderer::codec1_spec1() pcolor = shadow_table[*dst]; *dst = pcolor; } - mask += 40; + mask += _numStrips; dst += outwidth; y++; } @@ -440,7 +440,7 @@ void AkosRenderer::codec1_spec3() *dst = pcolor; } } - mask += 40; + mask += _numStrips; dst += outwidth; y++; } @@ -789,7 +789,7 @@ void AkosRenderer::codec1() v1.mask_ptr = NULL; if (masking || charsetmask || shadow_mode) { - v1.mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + cur_y * 40 + _vm->_screenStartStrip; + v1.mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + cur_y * _numStrips + _vm->_screenStartStrip; v1.imgbufoffs = _vm->gdi._imgBufOffs[clipping]; if (!charsetmask && masking) { v1.mask_ptr += v1.imgbufoffs; @@ -947,7 +947,7 @@ void AkosRenderer::codec5() if (dst_x >= 0 && dst_x < _vm->_realWidth) { if (color != 255) { if (v1.mask_ptr) - mask = v1.mask_ptr + 40 * dst_y + (dst_x >> 3); + mask = v1.mask_ptr + _numStrips * dst_y + (dst_x >> 3); maskbit = revBitMask[dst_x & 7]; if (shadow_mode && color == 13) color = shadow_table[*d]; @@ -965,7 +965,7 @@ void AkosRenderer::codec5() if (dst_x >= 0 && dst_x < _vm->_realWidth) { if (color != 255) { if (v1.mask_ptr) - mask = v1.mask_ptr + 40 * dst_y + (dst_x >> 3); + mask = v1.mask_ptr + _numStrips * dst_y + (dst_x >> 3); maskbit = revBitMask[dst_x & 7]; if (shadow_mode && color == 13) color = shadow_table[*d]; @@ -1201,7 +1201,7 @@ void AkosRenderer::akos16DecompressMask(byte * dest, int32 pitch, byte * src, in akos16SkipData(numskip_before); } - maskpitch = ((uint)_vm->_realWidth / 8) + 1; + maskpitch = _numStrips + 1; while (t_height != 0) { akos16DecodeLine(tmp_buf, t_width, dir); @@ -1337,7 +1337,7 @@ void AkosRenderer::codec16() { } byte * ptr = _vm->_screenStartStrip + _vm->getResourceAddress(rtBuffer, 9) + _vm->gdi._imgBufOffs[clipping]; - ptr += ((_vm->_realWidth / 8) + 1) * clip_top + (clip_left / 8); + ptr += (_numStrips + 1) * clip_top + (clip_left / 8); akos16DecompressMask(dest, pitch, srcptr, cur_x, out_height, dir, numskip_before, numskip_after, 255, ptr, clip_left / 8); } diff --git a/scumm/akos.h b/scumm/akos.h index 9bc5d92ede..7c8fa45d6b 100644 --- a/scumm/akos.h +++ b/scumm/akos.h @@ -65,6 +65,7 @@ struct AkosRenderer { byte dirty_id; byte *outptr; uint outwidth, outheight; + int32 _numStrips; /* pointer to various parts of the costume resource */ byte *akos; @@ -126,6 +127,7 @@ public: AkosRenderer(Scumm *scumm) { memset(this, 0, sizeof(AkosRenderer)); _vm = scumm; + _numStrips = _vm->gdi._numStrips; } bool drawCostume(); void setPalette(byte *palette); diff --git a/scumm/costume.cpp b/scumm/costume.cpp index 1ea4a13748..245d6a6ec5 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -301,7 +301,7 @@ byte CostumeRenderer::mainRoutine(Actor *a, int slot, int frame) _vm->_screenStartStrip); if (masking || charsetmask) { - _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + _ypos * 40 + _vm->_screenStartStrip; + _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + _ypos * _numStrips + _vm->_screenStartStrip; _imgbufoffs = _vm->gdi._imgBufOffs[_zbuf]; if (!charsetmask && _zbuf != 0) _mask_ptr += _imgbufoffs; @@ -445,7 +445,7 @@ void CostumeRenderer::proc5() } dst += _vm->_realWidth; y++; - mask += 40; + mask += _numStrips; if (!--height) { if (!--_width2) return; @@ -508,7 +508,7 @@ void CostumeRenderer::proc4() } dst += _vm->_realWidth; y++; - mask += 40; + mask += _numStrips; if (!--height) { if (!--_width2) return; @@ -571,7 +571,7 @@ void CostumeRenderer::proc3() *dst = pcolor; } dst += _vm->_realWidth; - mask += 40; + mask += _numStrips; y++; } if (!--height) { @@ -633,7 +633,7 @@ void CostumeRenderer::proc2() *dst = pcolor; } dst += _vm->_realWidth; - mask += 40; + mask += _numStrips; y++; } if (!--height) { @@ -825,7 +825,7 @@ void CostumeRenderer::proc5_ami() x = _xpos; y++; dst += _vm->_realWidth - step * _width; - _mask_ptr+=40; + _mask_ptr += _numStrips; mask = _mask_ptr; maskbit = revBitMask[_xpos & 7]; if (y >= scrheight) @@ -889,7 +889,7 @@ void CostumeRenderer::proc4_ami() y++; x = _xpos; dst += _vm->_realWidth - step * _width; - _mask_ptr+= 40; + _mask_ptr += _numStrips; mask = _mask_ptr; maskbit = revBitMask[_xpos & 7]; if (y >= scrheight) @@ -950,7 +950,7 @@ void CostumeRenderer::proc3_ami() if (_xpos != oldXpos) { dst += _vm->_realWidth - (_xpos - oldXpos); - _mask_ptr += 40; + _mask_ptr += _numStrips; mask = _mask_ptr; y++; } @@ -1015,7 +1015,7 @@ void CostumeRenderer::proc2_ami() if (_xpos != oldXpos) { dst += _vm->_realWidth - (_xpos - oldXpos); - _mask_ptr += 40; + _mask_ptr += _numStrips; mask = _mask_ptr; y++; } @@ -1167,7 +1167,7 @@ void CostumeRenderer::proc_special(Actor *a, byte mask2) } } dst += _vm->_realWidth; - mask += 40; + mask += _numStrips; y++; } if (!--height) { diff --git a/scumm/costume.h b/scumm/costume.h index fa7264f1c0..909794b26d 100644 --- a/scumm/costume.h +++ b/scumm/costume.h @@ -44,6 +44,7 @@ protected: class CostumeRenderer { protected: Scumm *_vm; + int32 _numStrips; LoadedCostume _loaded; @@ -106,7 +107,7 @@ public: void setCostume(int costume); public: - CostumeRenderer(Scumm *vm) : _vm(vm), _loaded(vm) {} + CostumeRenderer(Scumm *vm) : _vm(vm), _loaded(vm), _numStrips(vm->gdi._numStrips) {} }; #endif diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index aa0ed95778..7ed5bfc0c2 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -128,7 +128,7 @@ void Scumm::setDirtyRange(int slot, int top, int bottom) { int i; VirtScreen *vs = &virtscr[slot]; - for (i = 0; i < NUM_STRIPS; i++) { + for (i = 0; i < gdi._numStrips; i++) { vs->tdirty[i] = top; vs->bdirty[i] = bottom; } @@ -160,7 +160,7 @@ void Scumm::drawDirtyScreenParts() src = vs->screenPtr + _screenStartStrip * 8 + _screenTop * _realWidth; _system->copy_rect(src, _realWidth, 0, vs->topline, _realWidth, vs->height); - for (i = 0; i < NUM_STRIPS; i++) { + for (i = 0; i < gdi._numStrips; i++) { vs->tdirty[i] = (byte)vs->height; vs->bdirty[i] = 0; } @@ -191,7 +191,7 @@ void Gdi::updateDirtyScreen(VirtScreen *vs) _readOffs = vs->xstart; if (_vm->_features & GF_AFTER_V7 && (_vm->camera._cur.y != _vm->camera._last.y)) - drawStripToScreen(vs, 0, NUM_STRIPS << 3, 0, vs->height); + drawStripToScreen(vs, 0, _numStrips << 3, 0, vs->height); else { int i; int start, w, top, bottom; @@ -199,14 +199,14 @@ void Gdi::updateDirtyScreen(VirtScreen *vs) w = 8; start = 0; - for (i = 0; i < NUM_STRIPS; i++) { + for (i = 0; i < _numStrips; i++) { bottom = vs->bdirty[i]; if (bottom) { top = vs->tdirty[i]; vs->tdirty[i] = (byte)vs->height; vs->bdirty[i] = 0; - if (i != (NUM_STRIPS-1) && vs->bdirty[i + 1] == (byte)bottom && vs->tdirty[i + 1] == (byte)top) { + if (i != (_numStrips - 1) && vs->bdirty[i + 1] == (byte)bottom && vs->tdirty[i + 1] == (byte)top) { w += 8; continue; } @@ -246,7 +246,7 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b) else scrollY = _vm->_screenTop; - ptr = vs->screenPtr + (t * NUM_STRIPS + x) * 8 + _readOffs + scrollY * _vm->_realWidth; + ptr = vs->screenPtr + (t * _numStrips + x) * 8 + _readOffs + scrollY * _vm->_realWidth; _vm->_system->copy_rect(ptr, _vm->_realWidth, x * 8, vs->topline + t, w, height); } @@ -415,9 +415,9 @@ void Scumm::initBGBuffers(int height) assert(gdi._numZBuffer >= 1 && gdi._numZBuffer <= 5); if (_features & GF_AFTER_V7) - itemsize = (virtscr[0].height + 4) * NUM_STRIPS; + itemsize = (virtscr[0].height + 4) * gdi._numStrips; else - itemsize = (_scrHeight + 4) * NUM_STRIPS; + itemsize = (_scrHeight + 4) * gdi._numStrips; size = itemsize * gdi._numZBuffer; @@ -640,8 +640,8 @@ void Scumm::drawFlashlight() // Clip the flashlight at the borders if (flashX < 0) flashX = 0; - else if (flashX > NUM_STRIPS - flashW) - flashX = NUM_STRIPS - flashW; + else if (flashX > gdi._numStrips - flashW) + flashX = gdi._numStrips - flashW; if (flashY < 0) flashY = 0; else if (flashY > virtscr[0].height - flashH) @@ -774,7 +774,7 @@ void Scumm::redrawBGAreas() val = 0; if (!_fullRedraw && _BgNeedsRedraw) { - for (i = 0; i != NUM_STRIPS; i++) { + for (i = 0; i != gdi._numStrips; i++) { if (gfxUsageBits[_screenStartStrip + i] & 0x80000000) { redrawBGStrip(i, 1); } @@ -785,26 +785,26 @@ void Scumm::redrawBGAreas() diff = (camera._cur.x >> 3) - (camera._last.x >> 3); if (_fullRedraw == 0 && diff == 1) { val = 2; - redrawBGStrip(NUM_STRIPS-1, 1); + redrawBGStrip(gdi._numStrips - 1, 1); } else if (_fullRedraw == 0 && diff == -1) { val = 1; redrawBGStrip(0, 1); } else if (_fullRedraw != 0 || diff != 0) { _BgNeedsRedraw = false; _fullRedraw = false; - redrawBGStrip(0, NUM_STRIPS); + redrawBGStrip(0, gdi._numStrips); } } else { if (_fullRedraw == 0 && camera._cur.x - camera._last.x == 8) { val = 2; - redrawBGStrip(NUM_STRIPS-1, 1); + redrawBGStrip(gdi._numStrips - 1, 1); } else if (_fullRedraw == 0 && camera._cur.x - camera._last.x == -8) { val = 1; redrawBGStrip(0, 1); } else if (_fullRedraw != 0 || camera._cur.x != camera._last.x) { _BgNeedsRedraw = false; _flashlightIsDrawn = false; - redrawBGStrip(0, NUM_STRIPS); + redrawBGStrip(0, gdi._numStrips); } } @@ -895,7 +895,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, if (vs->scrollable) sx -= vs->xstart >> 3; - if ((uint) sx >= NUM_STRIPS) + if (sx >= _numStrips) return; if (y < vs->tdirty[sx]) @@ -904,13 +904,13 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, if (bottom > vs->bdirty[sx]) vs->bdirty[sx] = bottom; - _backbuff_ptr = vs->screenPtr + (y * NUM_STRIPS + x) * 8; + _backbuff_ptr = vs->screenPtr + (y * _numStrips + x) * 8; if (twobufs) - _bgbak_ptr = _vm->getResourceAddress(rtBuffer, vs->number + 5) + (y * NUM_STRIPS + x) * 8; + _bgbak_ptr = _vm->getResourceAddress(rtBuffer, vs->number + 5) + (y * _numStrips + x) * 8; else _bgbak_ptr = _backbuff_ptr; - _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * NUM_STRIPS + x); + _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x); where_draw_ptr = _bgbak_ptr; decompressBitmap(); @@ -952,7 +952,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, if (flag & dbDrawMaskOnAll) { _z_plane_ptr = zplane_list[1] + READ_LE_UINT16(zplane_list[1] + stripnr * 2 + 8); for (i = 0; i < numzbuf; i++) { - _mask_ptr_dest = _vm->getResourceAddress(rtBuffer, 9) + y * NUM_STRIPS + x + _imgBufOffs[i]; + _mask_ptr_dest = _vm->getResourceAddress(rtBuffer, 9) + y * _numStrips + x + _imgBufOffs[i]; if (_useOrDecompress && flag & dbAllowMaskOr) decompressMaskImgOr(); else @@ -973,7 +973,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, } else offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 8); - _mask_ptr_dest = _vm->getResourceAddress(rtBuffer, 9) + y * NUM_STRIPS + x + _imgBufOffs[i]; + _mask_ptr_dest = _vm->getResourceAddress(rtBuffer, 9) + y * _numStrips + x + _imgBufOffs[i]; if (offs) { _z_plane_ptr = zplane_list[i] + offs; @@ -985,7 +985,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, } else { if (!(_useOrDecompress && flag & dbAllowMaskOr)) for (int height = 0; height < _numLinesToProcess; height++) - _mask_ptr_dest[height * NUM_STRIPS] = 0; + _mask_ptr_dest[height * _numStrips] = 0; /* needs better abstraction, FIXME */ } } @@ -1166,7 +1166,7 @@ void Gdi::draw8ColWithMasking() } src += _vm->_realWidth; dst += _vm->_realWidth; - mask += NUM_STRIPS; + mask += _numStrips; } while (--height); } @@ -1201,7 +1201,7 @@ void Gdi::clear8ColWithMasking() ((uint32 *)dst)[1] = 0; } dst += _vm->_realWidth; - mask += NUM_STRIPS; + mask += _numStrips; } while (--height); } @@ -1236,14 +1236,14 @@ void Gdi::decompressMaskImg() do { *dst = c; - dst += NUM_STRIPS; + dst += _numStrips; if (!--height) return; } while (--b); } else { do { *dst = *src++; - dst += NUM_STRIPS; + dst += _numStrips; if (!--height) return; } while (--b); @@ -1266,14 +1266,14 @@ void Gdi::decompressMaskImgOr() do { *dst |= c; - dst += NUM_STRIPS; + dst += _numStrips; if (!--height) return; } while (--b); } else { do { *dst |= *src++; - dst += NUM_STRIPS; + dst += _numStrips; if (!--height) return; } while (--b); @@ -1798,7 +1798,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom) backbuff = vs->screenPtr + height; bgbak = getResourceAddress(rtBuffer, vs->number + 5) + height; - mask = getResourceAddress(rtBuffer, 9) + top * NUM_STRIPS + (left >> 3) + _screenStartStrip; + mask = getResourceAddress(rtBuffer, 9) + top * gdi._numStrips + (left >> 3) + _screenStartStrip; if (vs->number == 0) { mask += vs->topline * 216; } @@ -1812,7 +1812,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom) if (vs->number == 0 && charset._hasMask && height) { do { memset(mask, 0, widthmod); - mask += NUM_STRIPS; + mask += gdi._numStrips; } while (--height); } } else { @@ -1868,12 +1868,12 @@ void Scumm::setVirtscreenDirty(VirtScreen *vs, int left, int top, int right, int int lp = left >> 3; int rp = right >> 3; - if (lp >= NUM_STRIPS || rp < 0) + if ((lp >= gdi._numStrips) || (rp < 0)) return; if (lp < 0) lp = 0; - if (rp >= NUM_STRIPS) - rp = NUM_STRIPS - 1; + if (rp >= gdi._numStrips) + rp = gdi._numStrips - 1; while (lp <= rp) { if (top < vs->tdirty[lp]) @@ -1984,14 +1984,14 @@ void Scumm::transitionEffect(int a) b = tab_2[i * 4 + 3]; if (t == b) { while (l <= r) { - if (l >= 0 && l < NUM_STRIPS && (uint) t < (uint) bottom) { + if (l >= 0 && l < gdi._numStrips && (uint) t < (uint) bottom) { virtscr[0].tdirty[l] = t << 3; virtscr[0].bdirty[l] = (t + 1) << 3; } l++; } } else { - if (l < 0 || l >= NUM_STRIPS || b <= t) + if (l < 0 || l >= gdi._numStrips || b <= t) continue; if (b > bottom) b = bottom; @@ -2423,7 +2423,7 @@ void Scumm::cameraMoved() assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2)); _screenStartStrip = (camera._cur.x - (_realWidth / 2)) >> 3; - _screenEndStrip = _screenStartStrip + NUM_STRIPS - 1; + _screenEndStrip = _screenStartStrip + gdi._numStrips - 1; virtscr[0].xstart = _screenStartStrip << 3; _screenLeft = camera._cur.x - (_realWidth / 2); @@ -2437,7 +2437,7 @@ void Scumm::cameraMoved() } _screenStartStrip = (camera._cur.x >> 3) - 20; - _screenEndStrip = _screenStartStrip + NUM_STRIPS - 1; + _screenEndStrip = _screenStartStrip + gdi._numStrips - 1; virtscr[0].xstart = _screenStartStrip << 3; } } @@ -2695,7 +2695,7 @@ void Gdi::resetBackground(int top, int bottom, int strip) if (bottom > vs->bdirty[strip]) vs->bdirty[strip] = bottom; - offs = (top * NUM_STRIPS + _vm->_screenStartStrip + strip); + offs = (top * _numStrips + _vm->_screenStartStrip + strip); _mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + offs; _bgbak_ptr = _vm->getResourceAddress(rtBuffer, 5) + (offs << 3); _backbuff_ptr = vs->screenPtr + (offs << 3); @@ -2738,10 +2738,10 @@ byte Scumm::isMaskActiveAt(int l, int t, int r, int b, byte *mem) t = 0; r >>= 3; - if (r > NUM_STRIPS-1) - r = NUM_STRIPS-1; + if (r > gdi._numStrips - 1) + r = gdi._numStrips - 1; - mem += l + t * NUM_STRIPS; + mem += l + t * gdi._numStrips; w = r - l; h = b - t + 1; @@ -2751,7 +2751,7 @@ byte Scumm::isMaskActiveAt(int l, int t, int r, int b, byte *mem) if (mem[i]) { return true; } - mem += NUM_STRIPS; + mem += gdi._numStrips; } while (--h); return false; diff --git a/scumm/gfx.h b/scumm/gfx.h index 25b9a206c9..3ede0d1bd4 100644 --- a/scumm/gfx.h +++ b/scumm/gfx.h @@ -23,10 +23,6 @@ #ifndef GFX_H #define GFX_H -enum { - NUM_STRIPS = 40 -}; - enum VideoMode { /* Video scalers */ VIDEO_SCALE = 0, VIDEO_2XSAI = 1, @@ -60,8 +56,8 @@ struct VirtScreen { /* Virtual screen areas */ byte alloctwobuffers; bool scrollable; uint16 xstart; - uint16 tdirty[40]; - uint16 bdirty[40]; + uint16 tdirty[80]; + uint16 bdirty[80]; byte *screenPtr; byte *backBuf; }; @@ -121,6 +117,7 @@ struct Gdi { int _numZBuffer; int _imgBufOffs[4]; byte _disable_zbuffer; + int32 _numStrips; bool _useOrDecompress; int _numLinesToProcess; diff --git a/scumm/scumm.h b/scumm/scumm.h index 222b13eea2..cda8101285 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -829,7 +829,7 @@ public: void updateDirtyScreen(int slot); VirtScreen *findVirtScreen(int y); - static void setVirtscreenDirty(VirtScreen *vs, int left, int top, int right, int bottom); + void setVirtscreenDirty(VirtScreen *vs, int left, int top, int right, int bottom); void drawFlashlight(); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 6dbd90b424..0ae28c48d1 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -99,6 +99,8 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) _realHeight = 200; } + gdi._numStrips = _realWidth / 8; + _newgui = g_gui; _bundle = new Bundle(); _sound = new Sound(this); diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 507701e8c5..47c3595e25 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -235,7 +235,7 @@ void Scumm::drawVerbBitmap(int vrb, int x, int y) } for (i = 0; i < imgw; i++) { tmp = xstrip + i; - if ((uint) tmp < 40) + if (tmp < gdi._numStrips) gdi.drawBitmap(imptr, vs, tmp, ydiff, imgh << 3, i, 1, true); } |