[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.24,1.25 akos.cpp,1.20,1.21 akos.h,1.7,1.8 costume.cpp,1.7,1.8 costume.h,1.1.1.1,1.2 gfx.cpp,1.39,1.40 gfx.h,1.5,1.6 scumm.h,1.47,1.48 scummvm.cpp,1.61,1.62 verbs.cpp,1.3,1.4

Pawe? Ko?odziejski aquadran at users.sourceforge.net
Wed Oct 23 23:29:03 CEST 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv24241

Modified Files:
	actor.cpp akos.cpp akos.h costume.cpp costume.h gfx.cpp gfx.h 
	scumm.h scummvm.cpp verbs.cpp 
Log Message:
changed number strips to dynamic and increased arrays tdirty and bdirty to 80

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- actor.cpp	23 Oct 2002 08:40:57 -0000	1.24
+++ actor.cpp	24 Oct 2002 06:28:54 -0000	1.25
@@ -1038,7 +1038,7 @@
 				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 @@
 	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;

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- akos.cpp	22 Oct 2002 12:18:17 -0000	1.20
+++ akos.cpp	24 Oct 2002 06:28:54 -0000	1.21
@@ -296,7 +296,7 @@
 						&& (!v1.mask_ptr || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))) {
 					*dst = palette[color];
 				}
-				mask += 40;
+				mask += _numStrips;
 				dst += outwidth;
 				y++;
 			}
@@ -364,7 +364,7 @@
 						pcolor = shadow_table[*dst];
 					*dst = pcolor;
 				}
-				mask += 40;
+				mask += _numStrips;
 				dst += outwidth;
 				y++;
 			}
@@ -440,7 +440,7 @@
 						*dst = pcolor;
 					}
 				}
-				mask += 40;
+				mask += _numStrips;
 				dst += outwidth;
 				y++;
 			}
@@ -789,7 +789,7 @@
 	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 @@
 					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 @@
 					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 @@
 		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 @@
 	}
 
 	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);
 }
 

Index: akos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- akos.h	22 Oct 2002 12:18:17 -0000	1.7
+++ akos.h	24 Oct 2002 06:28:54 -0000	1.8
@@ -65,6 +65,7 @@
 	byte dirty_id;
 	byte *outptr;
 	uint outwidth, outheight;
+	int32 _numStrips;
 
 	/* pointer to various parts of the costume resource */
 	byte *akos;
@@ -126,6 +127,7 @@
 	AkosRenderer(Scumm *scumm) {
 		memset(this, 0, sizeof(AkosRenderer));
 		_vm = scumm;
+		_numStrips = _vm->gdi._numStrips;
 	}
 	bool drawCostume();
 	void setPalette(byte *palette);

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- costume.cpp	21 Sep 2002 23:46:32 -0000	1.7
+++ costume.cpp	24 Oct 2002 06:28:54 -0000	1.8
@@ -301,7 +301,7 @@
 			                    _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 @@
 			}
 			dst += _vm->_realWidth;
 			y++;
-			mask += 40;
+			mask += _numStrips;
 			if (!--height) {
 				if (!--_width2)
 					return;
@@ -508,7 +508,7 @@
 			}
 			dst += _vm->_realWidth;
 			y++;
-			mask += 40;
+			mask += _numStrips;
 			if (!--height) {
 				if (!--_width2)
 					return;
@@ -571,7 +571,7 @@
 					*dst = pcolor;
 				}
 				dst += _vm->_realWidth;
-				mask += 40;
+				mask += _numStrips;
 				y++;
 			}
 			if (!--height) {
@@ -633,7 +633,7 @@
 					*dst = pcolor;
 				}
 				dst += _vm->_realWidth;
-				mask += 40;
+				mask += _numStrips;
 				y++;
 			}
 			if (!--height) {
@@ -825,7 +825,7 @@
 				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 @@
 				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 @@
 
 				if (_xpos != oldXpos) {
 					dst += _vm->_realWidth - (_xpos - oldXpos);
-					_mask_ptr += 40;
+					_mask_ptr += _numStrips;
 					mask = _mask_ptr;
 					y++;
 				}
@@ -1015,7 +1015,7 @@
 
 				if (_xpos != oldXpos) {
 					dst += _vm->_realWidth - (_xpos - oldXpos);
-					_mask_ptr += 40;
+					_mask_ptr += _numStrips;
 					mask = _mask_ptr;
 					y++;
 				}
@@ -1167,7 +1167,7 @@
 					}
 				}
 				dst += _vm->_realWidth;
-				mask += 40;
+				mask += _numStrips;
 				y++;
 			}
 			if (!--height) {

Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- costume.h	21 Aug 2002 16:07:27 -0000	1.1.1.1
+++ costume.h	24 Oct 2002 06:28:54 -0000	1.2
@@ -44,6 +44,7 @@
 class CostumeRenderer {
 protected:
 	Scumm *_vm;
+	int32 _numStrips;
 	
 	LoadedCostume _loaded;
 	
@@ -106,7 +107,7 @@
 	void setCostume(int costume);
 
 public:
-	CostumeRenderer(Scumm *vm) : _vm(vm), _loaded(vm) {}
+	CostumeRenderer(Scumm *vm) : _vm(vm), _loaded(vm), _numStrips(vm->gdi._numStrips) {}
 };
 
 #endif

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- gfx.cpp	23 Oct 2002 17:48:01 -0000	1.39
+++ gfx.cpp	24 Oct 2002 06:28:54 -0000	1.40
@@ -128,7 +128,7 @@
 {
 	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 @@
 		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 @@
 		_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 @@
 		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 @@
 	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 @@
 	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 @@
 	// 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 @@
 	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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 				} 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 @@
 				} 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 @@
 		}
 		src += _vm->_realWidth;
 		dst += _vm->_realWidth;
-		mask += NUM_STRIPS;
+		mask += _numStrips;
 	} while (--height);
 }
 
@@ -1201,7 +1201,7 @@
 			((uint32 *)dst)[1] = 0;
 		}
 		dst += _vm->_realWidth;
-		mask += NUM_STRIPS;
+		mask += _numStrips;
 	} while (--height);
 }
 
@@ -1236,14 +1236,14 @@
 
 			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 @@
 
 			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 @@
 
 	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 @@
 		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 @@
 	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 @@
 			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 @@
 		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 @@
 		}
 
 		_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 @@
 	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 @@
 		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 @@
 			if (mem[i]) {
 				return true;
 			}
-		mem += NUM_STRIPS;
+		mem += gdi._numStrips;
 	} while (--h);
 
 	return false;

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gfx.h	20 Oct 2002 01:02:51 -0000	1.5
+++ gfx.h	24 Oct 2002 06:28:54 -0000	1.6
@@ -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 @@
 	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 @@
 	int _numZBuffer;
 	int _imgBufOffs[4];
 	byte _disable_zbuffer;
+	int32 _numStrips;
 
 	bool _useOrDecompress;
 	int _numLinesToProcess;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- scumm.h	23 Oct 2002 12:03:57 -0000	1.47
+++ scumm.h	24 Oct 2002 06:28:54 -0000	1.48
@@ -829,7 +829,7 @@
 	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();
 	

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- scummvm.cpp	23 Oct 2002 12:03:58 -0000	1.61
+++ scummvm.cpp	24 Oct 2002 06:28:54 -0000	1.62
@@ -99,6 +99,8 @@
 		_realHeight = 200;
 	}
 
+	gdi._numStrips = _realWidth / 8;
+
 	_newgui = g_gui;
 	_bundle = new Bundle();
 	_sound = new Sound(this);

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- verbs.cpp	1 Oct 2002 09:27:09 -0000	1.3
+++ verbs.cpp	24 Oct 2002 06:28:54 -0000	1.4
@@ -235,7 +235,7 @@
 	}
 	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);
 	}
 





More information about the Scummvm-git-logs mailing list