diff options
| -rw-r--r-- | scumm/akos.cpp | 10 | ||||
| -rw-r--r-- | scumm/boxes.cpp | 4 | ||||
| -rw-r--r-- | scumm/charset.cpp | 14 | ||||
| -rw-r--r-- | scumm/costume.cpp | 62 | ||||
| -rw-r--r-- | scumm/debug.cpp | 6 | ||||
| -rw-r--r-- | scumm/debugger.cpp | 2 | ||||
| -rw-r--r-- | scumm/dialogs.cpp | 2 | ||||
| -rw-r--r-- | scumm/gfx.cpp | 146 | ||||
| -rw-r--r-- | scumm/nut_renderer.cpp | 8 | ||||
| -rw-r--r-- | scumm/object.cpp | 2 | ||||
| -rw-r--r-- | scumm/saveload.cpp | 10 | ||||
| -rw-r--r-- | scumm/script.cpp | 12 | ||||
| -rw-r--r-- | scumm/script_v2.cpp | 16 | ||||
| -rw-r--r-- | scumm/script_v5.cpp | 18 | ||||
| -rw-r--r-- | scumm/script_v6.cpp | 22 | ||||
| -rw-r--r-- | scumm/script_v8.cpp | 4 | ||||
| -rw-r--r-- | scumm/scumm.h | 2 | ||||
| -rw-r--r-- | scumm/scummvm.cpp | 76 | ||||
| -rw-r--r-- | scumm/smush/smush_player.cpp | 2 | ||||
| -rw-r--r-- | scumm/string.cpp | 24 | ||||
| -rw-r--r-- | scumm/verbs.cpp | 2 | 
21 files changed, 222 insertions, 222 deletions
| diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 4950a6431e..aa5ca72d3f 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -371,7 +371,7 @@ void AkosRenderer::codec1_genericDecode() {  				if (v1.scaletable[v1.tmp_x] < _scaleX) {  					v1.x += v1.scaleXstep; -					if (v1.x < 0 || v1.x >= _vm->_realWidth) +					if (v1.x < 0 || v1.x >= _vm->_screenWidth)  						return;  					maskbit = revBitMask[v1.x & 7];  					v1.destptr += v1.scaleXstep; @@ -437,7 +437,7 @@ void AkosRenderer::codec1_spec1() {  				if (v1.scaletable[v1.tmp_x] < _scaleX) {  					v1.x += v1.scaleXstep; -					if (v1.x < 0 || v1.x >= _vm->_realWidth) +					if (v1.x < 0 || v1.x >= _vm->_screenWidth)  						return;  					maskbit = revBitMask[v1.x & 7];  					v1.destptr += v1.scaleXstep; @@ -510,7 +510,7 @@ void AkosRenderer::codec1_spec3() {  				if (v1.scaletable[v1.tmp_x] < _scaleX) {  					v1.x += v1.scaleXstep; -					if (v1.x < 0 || v1.x >= _vm->_realWidth) +					if (v1.x < 0 || v1.x >= _vm->_screenWidth)  						return;  					maskbit = revBitMask[v1.x & 7];  					v1.destptr += v1.scaleXstep; @@ -1275,7 +1275,7 @@ void AkosRenderer::codec16() {  	int32 width_unk, height_unk;  	height_unk = clip_top; -	int32 pitch = _vm->_realWidth; +	int32 pitch = _vm->_screenWidth;  	int32 /*tmp1, tmp2, tmp3,*/ dir; @@ -1319,7 +1319,7 @@ void AkosRenderer::codec16() {  	int32 numskip_before = skip_x + (skip_y * _width);  	int32 numskip_after = _width - cur_x; -	byte *dest = outptr + width_unk + height_unk * _vm->_realWidth; +	byte *dest = outptr + width_unk + height_unk * _vm->_screenWidth;  	if (_zbuf == 0) {  		akos16Decompress(dest, pitch, srcptr, cur_x, out_height, dir, numskip_before, numskip_after, 255); diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp index 33514d07cd..4dccfee31e 100644 --- a/scumm/boxes.cpp +++ b/scumm/boxes.cpp @@ -192,8 +192,8 @@ int Scumm::getScale(int box, int x, int y) {  			byte *resptr = getResourceAddress(rtScaleTable, scale);  			if (resptr == NULL)  				error("Scale table %d not defined", scale); -			if (y >= _realHeight) -				y = _realHeight - 1; +			if (y >= _screenHeight) +				y = _screenHeight - 1;  			else if (y < 0)  				y = 0;  			scale = resptr[y]; diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 487ce33fd5..0594db3364 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -378,7 +378,7 @@ void CharsetRendererV3::printChar(int chr) {  	}  	char_ptr = _fontPtr + chr * 8; -	dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left; +	dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_screenWidth + _left;  	mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + _vm->_screenStartStrip + (_top - vs->topline) * _vm->gdi._numStrips + _left / 8;  	useMask = (vs->number == 0 && !_ignoreCharsetMask); @@ -398,8 +398,8 @@ void CharsetRendererV3::printChar(int chr) {  			if (buffer & bit) {  				if (_dropShadow) {  					*(dest_ptr + x + 1) = 0; -					*(dest_ptr + x + _vm->_realWidth) = 0; -					*(dest_ptr + x + _vm->_realWidth + 1) = 0; +					*(dest_ptr + x + _vm->_screenWidth) = 0; +					*(dest_ptr + x + _vm->_screenWidth + 1) = 0;  				}					  				*(dest_ptr + x) = _color; @@ -423,7 +423,7 @@ void CharsetRendererV3::printChar(int chr) {  				maskpos++;  			}  		} -		dest_ptr += _vm->_realWidth; +		dest_ptr += _vm->_screenWidth;  		mask_ptr += _vm->gdi._numStrips;  	} @@ -533,12 +533,12 @@ void CharsetRendererClassic::printChar(int chr) {  	byte *mask = _vm->getResourceAddress(rtBuffer, 9)  		+ drawTop * _vm->gdi._numStrips + _left / 8 + _vm->_screenStartStrip; -	byte *dst = vs->screenPtr + vs->xstart + drawTop * _vm->_realWidth + _left; +	byte *dst = vs->screenPtr + vs->xstart + drawTop * _vm->_screenWidth + _left;  	if (_blitAlso) {  		byte *back = dst;  		dst = _vm->getResourceAddress(rtBuffer, vs->number + 5) -			+ vs->xstart + drawTop * _vm->_realWidth + _left; +			+ vs->xstart + drawTop * _vm->_screenWidth + _left;  		drawBits(vs, dst, mask, drawTop, width, height); @@ -599,7 +599,7 @@ void CharsetRendererClassic::drawBits(VirtScreen *vs, byte *dst, byte *mask, int  				maskpos++;  			}  		} -		dst += _vm->_realWidth - width; +		dst += _vm->_screenWidth - width;  		mask += _vm->gdi._numStrips;  	}  } diff --git a/scumm/costume.cpp b/scumm/costume.cpp index 3ec9092145..70d83a7f03 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -159,7 +159,7 @@ byte CostumeRenderer::mainRoutine(int slot, int frame) {  			_right = _left = _xpos;  			_scaleIndexX = startScaleIndexX;  			for (i = 0; i < _width; i++) { -				if (_left > (_vm->_realWidth - 1)) { +				if (_left > (_vm->_screenWidth - 1)) {  					s++;  					startScaleIndexX = _scaleIndexX;  				} @@ -216,10 +216,10 @@ byte CostumeRenderer::mainRoutine(int slot, int frame) {  	if (_top >= (int)_outheight || _bottom <= 0)  		return 0; -	_ypitch = _height * _vm->_realWidth; +	_ypitch = _height * _vm->_screenWidth;  	_docontinue = 0;  	b = 1; -	if (_left >= _vm->_realWidth || _right <= 0) +	if (_left >= _vm->_screenWidth || _right <= 0)  		return 1;  	if (_mirror) {  		_ypitch--; @@ -231,7 +231,7 @@ byte CostumeRenderer::mainRoutine(int slot, int frame) {  			_xpos = 0;  			_docontinue = 1;  		} else { -			s = _right - _vm->_realWidth; +			s = _right - _vm->_screenWidth;  			if (s <= 0) {  				b = 2;  			} else { @@ -241,11 +241,11 @@ byte CostumeRenderer::mainRoutine(int slot, int frame) {  	} else {  		_ypitch++;  		if (scaling == 0) -			s = _right - _vm->_realWidth; +			s = _right - _vm->_screenWidth;  		if (s > 0) {  			_width2 -= s;  			ignorePakCols(s); -			_xpos = _vm->_realWidth - 1; +			_xpos = _vm->_screenWidth - 1;  			_docontinue = 1;  		} else {  			s = -1 - _left; @@ -279,8 +279,8 @@ byte CostumeRenderer::mainRoutine(int slot, int frame) {  		return 2;  	} -	_bgbak_ptr = _vm->getResourceAddress(rtBuffer, 5) + _vm->virtscr[0].xstart + _ypos * _vm->_realWidth + _xpos; -	_backbuff_ptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart + _ypos * _vm->_realWidth + _xpos; +	_bgbak_ptr = _vm->getResourceAddress(rtBuffer, 5) + _vm->virtscr[0].xstart + _ypos * _vm->_screenWidth + _xpos; +	_backbuff_ptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart + _ypos * _vm->_screenWidth + _xpos;  	charsetmask =  		_vm->hasCharsetMask(_left, _top + _vm->virtscr[0].topline, _right,  												_vm->virtscr[0].topline + _bottom); @@ -390,7 +390,7 @@ void CostumeRenderer::proc6() {  				*dst = pcolor;  			} -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			y++;  			if (!--height) {  				if (!--width) @@ -437,7 +437,7 @@ void CostumeRenderer::proc5() {  					pcolor = _shadow_table[*dst];  				*dst = pcolor;  			} -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			y++;  			mask += _numStrips;  			if (!--height) { @@ -499,7 +499,7 @@ void CostumeRenderer::proc4() {  					pcolor = _shadow_table[*dst];  				*dst = pcolor;  			} -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			y++;  			mask += _numStrips;  			if (!--height) { @@ -562,7 +562,7 @@ void CostumeRenderer::proc3() {  						pcolor = _shadow_table[*dst];  					*dst = pcolor;  				} -				dst += _vm->_realWidth; +				dst += _vm->_screenWidth;  				mask += _numStrips;  				y++;  			} @@ -576,7 +576,7 @@ void CostumeRenderer::proc3() {  				_scaleIndexX = t + _scaleIndexXStep;  				if (cost_scaleTable[t] < _scaleX) {  					_xpos += _scaleIndexXStep; -					if (_xpos < 0 || _xpos >= _vm->_realWidth) +					if (_xpos < 0 || _xpos >= _vm->_screenWidth)  						return;  					maskbit = revBitMask[_xpos & 7];  					_backbuff_ptr += _scaleIndexXStep; @@ -623,7 +623,7 @@ void CostumeRenderer::proc2() {  						pcolor = _shadow_table[*dst];  					*dst = pcolor;  				} -				dst += _vm->_realWidth; +				dst += _vm->_screenWidth;  				mask += _numStrips;  				y++;  			} @@ -637,7 +637,7 @@ void CostumeRenderer::proc2() {  				_scaleIndexX = t + _scaleIndexXStep;  				if (cost_scaleTable[t] < _scaleX) {  					_xpos += _scaleIndexXStep; -					if (_xpos < 0 || _xpos >= _vm->_realWidth) +					if (_xpos < 0 || _xpos >= _vm->_screenWidth)  						return;  					maskbit = revBitMask[_xpos & 7];  					_backbuff_ptr += _scaleIndexXStep; @@ -684,7 +684,7 @@ void CostumeRenderer::proc1() {  						pcolor = _shadow_table[*dst];  					*dst = pcolor;  				} -				dst += _vm->_realWidth; +				dst += _vm->_screenWidth;  				y++;  			}  			if (!--height) { @@ -697,7 +697,7 @@ void CostumeRenderer::proc1() {  				_scaleIndexX = t + _scaleIndexXStep;  				if (cost_scaleTable[t] < _scaleX) {  					_xpos += _scaleIndexXStep; -					if (_xpos < 0 || _xpos >= _vm->_realWidth) +					if (_xpos < 0 || _xpos >= _vm->_screenWidth)  						return;  					_backbuff_ptr += _scaleIndexXStep;  				} @@ -734,7 +734,7 @@ void CostumeRenderer::proc6_ami() {  			len = *src++;  		do { -			if (color && x >= 0 && x < _vm->_realWidth) { +			if (color && x >= 0 && x < _vm->_screenWidth) {  				pcolor = _palette[color];  /*				  if (pcolor == 13 && _shadow_table)  					pcolor = _shadow_table[*dst];*/ @@ -747,7 +747,7 @@ void CostumeRenderer::proc6_ami() {  				if (!--height)  					return;  				width = _width; -				dst += _vm->_realWidth - step * _width; +				dst += _vm->_screenWidth - step * _width;  				x = _xpos;  				y++;  				if (y >= scrheight) @@ -782,7 +782,7 @@ void CostumeRenderer::proc5_ami() {  			len = *src++;  		do { -			if (color && x >=0 && x < _vm->_realWidth && !(*mask & maskbit)) { +			if (color && x >=0 && x < _vm->_screenWidth && !(*mask & maskbit)) {  				pcolor = _palette[color];  /*				  if (pcolor == 13 && _shadow_table)  					pcolor = _shadow_table[*dst];*/ @@ -811,7 +811,7 @@ void CostumeRenderer::proc5_ami() {  				width = _width;  				x = _xpos;  				y++; -				dst += _vm->_realWidth - step * _width; +				dst += _vm->_screenWidth - step * _width;  				_mask_ptr += _numStrips;  				mask = _mask_ptr;  				maskbit = revBitMask[_xpos & 7]; @@ -847,7 +847,7 @@ void CostumeRenderer::proc4_ami() {  			len = *src++;  		do { -			if (color && x >= 0 && x < _vm->_realWidth && !((*mask | mask[_imgbufoffs]) & maskbit)) { +			if (color && x >= 0 && x < _vm->_screenWidth && !((*mask | mask[_imgbufoffs]) & maskbit)) {  				pcolor = _palette[color];  /*				  if (pcolor == 13 && _shadow_table)  					pcolor = _shadow_table[*dst];*/ @@ -874,7 +874,7 @@ void CostumeRenderer::proc4_ami() {  				width = _width;  				y++;  				x = _xpos; -				dst += _vm->_realWidth - step * _width; +				dst += _vm->_screenWidth - step * _width;  				_mask_ptr += _numStrips;  				mask = _mask_ptr;  				maskbit = revBitMask[_xpos & 7]; @@ -910,7 +910,7 @@ void CostumeRenderer::proc3_ami() {  			len = *src++;  		do {  			if (cost_scaleTable[_scaleIndexY] < _scaleY) { -				if (color && _xpos >= 0 && _xpos < _vm->_realWidth && !((*mask | mask[_imgbufoffs]) & maskbit)) { +				if (color && _xpos >= 0 && _xpos < _vm->_screenWidth && !((*mask | mask[_imgbufoffs]) & maskbit)) {  					pcolor = _palette[color];  /*					  if (pcolor == 13 && _shadow_table)  						pcolor = _shadow_table[*dst];*/ @@ -934,7 +934,7 @@ void CostumeRenderer::proc3_ami() {  					return;  				if (_xpos != oldXpos) { -					dst += _vm->_realWidth - (_xpos - oldXpos); +					dst += _vm->_screenWidth - (_xpos - oldXpos);  					_mask_ptr += _numStrips;  					mask = _mask_ptr;  					y++; @@ -974,7 +974,7 @@ void CostumeRenderer::proc2_ami() {  			len = *src++;  		do {  			if (cost_scaleTable[_scaleIndexY] < _scaleY) { -				if (color && _xpos >= 0 && _xpos < _vm->_realWidth && !(*mask & maskbit)) { +				if (color && _xpos >= 0 && _xpos < _vm->_screenWidth && !(*mask & maskbit)) {  					pcolor = _palette[color];  /*					  if (pcolor == 13 && _shadow_table)  						pcolor = _shadow_table[*dst];*/ @@ -998,7 +998,7 @@ void CostumeRenderer::proc2_ami() {  					return;  				if (_xpos != oldXpos) { -					dst += _vm->_realWidth - (_xpos - oldXpos); +					dst += _vm->_screenWidth - (_xpos - oldXpos);  					_mask_ptr += _numStrips;  					mask = _mask_ptr;  					y++; @@ -1042,7 +1042,7 @@ void CostumeRenderer::proc1_ami() {  		do {  			if (cost_scaleTable[_scaleIndexY] < _scaleY) { -				if (color && _xpos >= 0 && _xpos < _vm->_realWidth) { +				if (color && _xpos >= 0 && _xpos < _vm->_screenWidth) {  					pcolor = _palette[color];  /*					  if (pcolor == 13 && _shadow_table)  						pcolor = _shadow_table[*dst];*/ @@ -1064,7 +1064,7 @@ void CostumeRenderer::proc1_ami() {  					return;  				if (_xpos != oldXpos) { -					dst += _vm->_realWidth - (_xpos - oldXpos); +					dst += _vm->_screenWidth - (_xpos - oldXpos);  					y++;  				}  				width = _width; @@ -1148,7 +1148,7 @@ void CostumeRenderer::proc_special(byte mask2) {  						*dst = pcolor;  					}  				} -				dst += _vm->_realWidth; +				dst += _vm->_screenWidth;  				mask += _numStrips;  				y++;  			} @@ -1162,7 +1162,7 @@ void CostumeRenderer::proc_special(byte mask2) {  				_scaleIndexX = t + _scaleIndexXStep;  				if (cost_scaleTable[t] < _scaleX) {  					_xpos += _scaleIndexXStep; -					if (_xpos < 0 || _xpos >= _vm->_realWidth) +					if (_xpos < 0 || _xpos >= _vm->_screenWidth)  						return;  					maskbit = revBitMask[_xpos & 7];  					_backbuff_ptr += _scaleIndexXStep; diff --git a/scumm/debug.cpp b/scumm/debug.cpp index e019e73896..4581c2ab1b 100644 --- a/scumm/debug.cpp +++ b/scumm/debug.cpp @@ -432,8 +432,8 @@ static byte *getBasePtr(Scumm *_s, int x, int y)  	if (vs == NULL)  		return NULL; -	return vs->screenPtr + x + (y - vs->topline) * _s->_realWidth + -		_s->_screenStartStrip * 8 + (_s->camera._cur.y - (_s->_realHeight / 2)) * _s->_realWidth; +	return vs->screenPtr + x + (y - vs->topline) * _s->_screenWidth + +		_s->_screenStartStrip * 8 + (_s->camera._cur.y - (_s->_screenHeight / 2)) * _s->_screenWidth;  }  static void hlineColor(Scumm *scumm, int x1, int x2, int y, byte color) @@ -556,7 +556,7 @@ void ScummDebugger::boxTest(int num)  	VirtScreen *vs = _s->findVirtScreen(box.ul.y);  	if (vs != NULL) -		_s->setVirtscreenDirty(vs, 0, 0, _s->_realWidth, _s->_realHeight); +		_s->setVirtscreenDirty(vs, 0, 0, _s->_screenWidth, _s->_screenHeight);  	_s->drawDirtyScreenParts();  	_s->_system->update_screen();  } diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index fe2a16a747..a9a7d6e881 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -183,7 +183,7 @@ void ScummDebugger::DCmd_Register(const char *cmdname, DebugProc pointer) {  void ScummDebugger::enter() {  #ifdef USE_CONSOLE  	if (!_s->_debuggerDialog) { -		_s->_debuggerDialog = new ConsoleDialog(_s->_newgui, _s->_realWidth); +		_s->_debuggerDialog = new ConsoleDialog(_s->_newgui, _s->_screenWidth);  		Debug_Printf("Debugger started, type 'exit' to return to the game\n");  	} diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp index 9544330f9f..ef6548839d 100644 --- a/scumm/dialogs.cpp +++ b/scumm/dialogs.cpp @@ -655,7 +655,7 @@ InfoDialog::InfoDialog(NewGui *gui, Scumm *scumm, const String& message)  void InfoDialog::setInfoText(const String& message) {  	int width = _gui->getStringWidth(message.c_str()) + 16; -	_x = (_scumm->_realWidth - width) >> 1; +	_x = (_scumm->_screenWidth - width) >> 1;  	_w = width;  	new StaticTextWidget(this, 4, 4, _w-8, _h, message, kTextAlignCenter); diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 1bc51ffb34..f7379e03c2 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -200,14 +200,14 @@ void Scumm::getGraphicsPerformance() {  	int i;  	for (i = 10; i != 0; i--) { -		initScreens(0, 0, _realWidth, _realHeight); +		initScreens(0, 0, _screenWidth, _screenHeight);  	}  	if (!(_features & GF_SMALL_HEADER))	// Variable is reserved for game scripts in earlier games  		VAR(VAR_PERFORMANCE_1) = 0;  	for (i = 10; i != 0; i--) { -		setDirtyRange(0, 0, _realHeight);	//ender +		setDirtyRange(0, 0, _screenHeight);	//ender  		drawDirtyScreenParts();  	} @@ -215,9 +215,9 @@ void Scumm::getGraphicsPerformance() {  		VAR(VAR_PERFORMANCE_2) = 0;  	if (_features & GF_AFTER_V7) -		initScreens(0, 0, _realWidth, _realHeight); +		initScreens(0, 0, _screenWidth, _screenHeight);  	else -		initScreens(0, 16, _realWidth, 144); +		initScreens(0, 16, _screenWidth, 144);  }  void Scumm::initScreens(int a, int b, int w, int h) { @@ -230,14 +230,14 @@ void Scumm::initScreens(int a, int b, int w, int h) {  	if (!getResourceAddress(rtBuffer, 4)) {  		if (_features & GF_AFTER_V7) { -			initVirtScreen(3, 0, (_realHeight / 2) - 10, _realWidth, 13, false, false); +			initVirtScreen(3, 0, (_screenHeight / 2) - 10, _screenWidth, 13, false, false);  		} else { -			initVirtScreen(3, 0, 80, _realWidth, 13, false, false); +			initVirtScreen(3, 0, 80, _screenWidth, 13, false, false);  		}  	} -	initVirtScreen(0, 0, b, _realWidth, h - b, true, true); -	initVirtScreen(1, 0, 0, _realWidth, b, false, false); -	initVirtScreen(2, 0, h, _realWidth, _realHeight - h, false, false); +	initVirtScreen(0, 0, b, _screenWidth, h - b, true, true); +	initVirtScreen(1, 0, 0, _screenWidth, b, false, false); +	initVirtScreen(2, 0, h, _screenWidth, _screenHeight - h, false, false);  	_screenB = b;  	_screenH = h; @@ -253,12 +253,12 @@ void Scumm::initVirtScreen(int slot, int number, int top, int width, int height,  	assert(slot >= 0 && slot < 4);  	if (_features & GF_AFTER_V7) { -		if ((!slot) && (_scrHeight != 0)) -			height = _scrHeight; +		if ((!slot) && (_roomHeight != 0)) +			height = _roomHeight;  	}  	vs->number = slot; -	vs->width = _realWidth; +	vs->width = _screenWidth;  	vs->topline = top;  	vs->height = height;  	vs->alloctwobuffers = twobufs; @@ -270,9 +270,9 @@ void Scumm::initVirtScreen(int slot, int number, int top, int width, int height,  	if (vs->scrollable) {  		if (_features & GF_AFTER_V7) { -			size += _realWidth * 8; +			size += _screenWidth * 8;  		} else { -			size += _realWidth * 4; +			size += _screenWidth * 4;  		}  	} @@ -384,8 +384,8 @@ void Scumm::drawDirtyScreenParts() {  	} else {  		vs = &virtscr[0]; -		src = vs->screenPtr + vs->xstart + _screenTop * _realWidth; -		_system->copy_rect(src, _realWidth, 0, vs->topline, _realWidth, vs->height - _screenTop); +		src = vs->screenPtr + vs->xstart + _screenTop * _screenWidth; +		_system->copy_rect(src, _screenWidth, 0, vs->topline, _screenWidth, vs->height - _screenTop);  		for (i = 0; i < gdi._numStrips; i++) {  			vs->tdirty[i] = vs->height; @@ -462,16 +462,16 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b) {  		b = vs->height;  	height = b - t; -	if (height > _vm->_realHeight) -		height = _vm->_realHeight; +	if (height > _vm->_screenHeight) +		height = _vm->_screenHeight;  	// Normally, _vm->_screenTop should always be >= 0, but for some old save games  	// it is not, hence we check & correct it here.  	if (_vm->_screenTop < 0)  		_vm->_screenTop = 0; -	ptr = vs->screenPtr + (x + vs->xstart) + (_vm->_screenTop + t) * _vm->_realWidth; -	_vm->_system->copy_rect(ptr, _vm->_realWidth, x, vs->topline + t, w, height); +	ptr = vs->screenPtr + (x + vs->xstart) + (_vm->_screenTop + t) * _vm->_screenWidth; +	_vm->_system->copy_rect(ptr, _vm->_screenWidth, x, vs->topline + t, w, height);  }  void Gdi::clearUpperMask() { @@ -515,8 +515,8 @@ void Scumm::blit(byte *dst, byte *src, int w, int h) {  	do {  		memcpy(dst, src, w); -		dst += _realWidth; -		src += _realWidth; +		dst += _screenWidth; +		src += _screenWidth;  	} while (--h);  } @@ -528,7 +528,7 @@ void Scumm::initBGBuffers(int height) {  	byte *room;  	if (_features & GF_AFTER_V7) { -		initVirtScreen(0, 0, virtscr[0].topline, _realWidth, height, 1, 1); +		initVirtScreen(0, 0, virtscr[0].topline, _screenWidth, height, 1, 1);  	}  	room = getResourceAddress(rtRoom, _roomResource); @@ -560,9 +560,9 @@ void Scumm::initBGBuffers(int height) {  	assert(gdi._numZBuffer >= 1 && gdi._numZBuffer <= 8);  	if (_features & GF_AFTER_V7) -		itemsize = (_scrHeight + 10) * gdi._numStrips; +		itemsize = (_roomHeight + 10) * gdi._numStrips;  	else -		itemsize = (_scrHeight + 4) * gdi._numStrips; +		itemsize = (_roomHeight + 4) * gdi._numStrips;  	size = itemsize * gdi._numZBuffer; @@ -588,7 +588,7 @@ void Scumm::drawFlashlight() {  			i = _flashlight.h;  			do {  				memset(_flashlight.buffer, 0, _flashlight.w); -				_flashlight.buffer += _realWidth; +				_flashlight.buffer += _screenWidth;  			} while (--i);  		}  		_flashlightIsDrawn = false; @@ -632,7 +632,7 @@ void Scumm::drawFlashlight() {  	}  	byte *bgbak; -	offset = _flashlight.y * _realWidth + virtscr[0].xstart + _flashlight.x; +	offset = _flashlight.y * _screenWidth + virtscr[0].xstart + _flashlight.x;  	_flashlight.buffer = virtscr[0].screenPtr + offset;  	bgbak = getResourceAddress(rtBuffer, 5) + offset; @@ -643,9 +643,9 @@ void Scumm::drawFlashlight() {  	int corner_data[] = { 8, 6, 4, 3, 2, 2, 1, 1 };  	int minrow = 0;  	int maxcol = _flashlight.w - 1; -	int maxrow = (_flashlight.h - 1) * _realWidth; +	int maxrow = (_flashlight.h - 1) * _screenWidth; -	for (i = 0; i < 8; i++, minrow += _realWidth, maxrow -= _realWidth) { +	for (i = 0; i < 8; i++, minrow += _screenWidth, maxrow -= _screenWidth) {  		int d = corner_data[i];  		for (j = 0; j < d; j++) { @@ -720,7 +720,7 @@ void Scumm::redrawBGStrip(int start, int num) {  		setGfxUsageBit(s + i, USAGE_BIT_DIRTY);  	gdi.drawBitmap(getResourceAddress(rtRoom, _roomResource) + _IM00_offs, -								&virtscr[0], s, 0, _scrWidth, virtscr[0].height, s, num, 0); +								&virtscr[0], s, 0, _roomWidth, virtscr[0].height, s, num, 0);  }  void Scumm::restoreCharsetBg() { @@ -757,16 +757,16 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor)  		left = 0;  	if (right < 0)  		right = 0; -	if (left > _realWidth) +	if (left > _screenWidth)  		return; -	if (right > _realWidth) -		right = _realWidth; +	if (right > _screenWidth) +		right = _screenWidth;  	if (bottom >= height)  		bottom = height;  	updateDirtyRect(vs->number, left, right, top - topline, bottom - topline, USAGE_BIT_RESTORED); -	int offset = (top - topline) * _realWidth + vs->xstart + left; +	int offset = (top - topline) * _screenWidth + vs->xstart + left;  	backbuff = vs->screenPtr + offset;  	bgbak = getResourceAddress(rtBuffer, vs->number + 5) + offset; @@ -797,7 +797,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor)  	} else {  		while (height--) {  			memset(backbuff, backColor, width); -			backbuff += _realWidth; +			backbuff += _screenWidth;  		}  	}  } @@ -929,7 +929,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c  		warning("Gdi::drawBitmap, strip drawn to %d below window bottom %d", bottom, vs->height);  	} -	_vertStripNextInc = height * _vm->_realWidth - 1; +	_vertStripNextInc = height * _vm->_screenWidth - 1;  	sx = x;  	if (vs->scrollable) @@ -987,11 +987,11 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c  				}  				if (left <= theX && theX < right) {  					*dst = *ptr_dither_table++; -					dst += _vm->_realWidth; +					dst += _vm->_screenWidth;  				}  			}  			if (left <= theX && theX < right) { -				dst -= _vm->_realWidth * height; +				dst -= _vm->_screenWidth * height;  				dst++;  			}  		} @@ -1195,7 +1195,7 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {  				}  				const register byte colors[2] = { color >> 4, color & 0xf };  				for(z = 0; z < run; z++) { -					*(dst + y * _vm->_realWidth + x) = colors[z&1]; +					*(dst + y * _vm->_screenWidth + x) = colors[z&1];  					y++;  					if(y >= height) { @@ -1209,7 +1209,7 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {  				}  				for(z = 0; z < run; z++) { -					*(dst + y * _vm->_realWidth + x) = *(dst + y * _vm->_realWidth + x - 1); +					*(dst + y * _vm->_screenWidth + x) = *(dst + y * _vm->_screenWidth + x - 1);  					y++;  					if(y >= height) { @@ -1225,7 +1225,7 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {  			}  			for(z = 0; z < run; z++) { -				*(dst + y * _vm->_realWidth + x) = color & 0xf; +				*(dst + y * _vm->_screenWidth + x) = color & 0xf;  				y++;  				if(y >= height) { @@ -1370,8 +1370,8 @@ void Gdi::draw8ColWithMasking(byte *dst, byte *src, int height, byte *mask) {  			((uint32 *)dst)[1] = ((uint32 *)src)[1];  #endif  		} -		src += _vm->_realWidth; -		dst += _vm->_realWidth; +		src += _vm->_screenWidth; +		dst += _vm->_screenWidth;  		mask += _numStrips;  	} while (--height);  } @@ -1406,7 +1406,7 @@ void Gdi::clear8ColWithMasking(byte *dst, int height, byte *mask) {  			((uint32 *)dst)[1] = 0;  #endif  		} -		dst += _vm->_realWidth; +		dst += _vm->_screenWidth;  		mask += _numStrips;  	} while (--height);  } @@ -1419,8 +1419,8 @@ void Gdi::draw8Col(byte *dst, byte *src, int height) {  		((uint32 *)dst)[0] = ((uint32 *)src)[0];  		((uint32 *)dst)[1] = ((uint32 *)src)[1];  #endif -		dst += _vm->_realWidth; -		src += _vm->_realWidth; +		dst += _vm->_screenWidth; +		src += _vm->_screenWidth;  	} while (--height);  }  void Gdi::clear8Col(byte *dst, int height) @@ -1432,7 +1432,7 @@ void Gdi::clear8Col(byte *dst, int height)  		((uint32 *)dst)[0] = 0;  		((uint32 *)dst)[1] = 0;  #endif -		dst += _vm->_realWidth; +		dst += _vm->_screenWidth;  	} while (--height);  } @@ -1526,7 +1526,7 @@ void Gdi::unkDecodeA(byte *dst, byte *src, int height) {  					do {  						if (!--x) {  							x = 8; -							dst += _vm->_realWidth - 8; +							dst += _vm->_screenWidth - 8;  							if (!--height)  								return;  						} @@ -1538,7 +1538,7 @@ void Gdi::unkDecodeA(byte *dst, byte *src, int height) {  				}  			}  		} while (--x); -		dst += _vm->_realWidth - 8; +		dst += _vm->_screenWidth - 8;  	} while (--height);  } @@ -1576,7 +1576,7 @@ void Gdi::unkDecodeA_trans(byte *dst, byte *src, int height) {  					do {  						if (!--x) {  							x = 8; -							dst += _vm->_realWidth - 8; +							dst += _vm->_screenWidth - 8;  							if (!--height)  								return;  						} @@ -1590,7 +1590,7 @@ void Gdi::unkDecodeA_trans(byte *dst, byte *src, int height) {  				}  			}  		} while (--x); -		dst += _vm->_realWidth - 8; +		dst += _vm->_screenWidth - 8;  	} while (--height);  } @@ -1620,7 +1620,7 @@ void Gdi::unkDecodeB(byte *dst, byte *src, int height) {  				color += inc;  			}  		} while (--x); -		dst += _vm->_realWidth - 8; +		dst += _vm->_screenWidth - 8;  	} while (--height);  } @@ -1652,7 +1652,7 @@ void Gdi::unkDecodeB_trans(byte *dst, byte *src, int height) {  				color += inc;  			}  		} while (--x); -		dst += _vm->_realWidth - 8; +		dst += _vm->_screenWidth - 8;  	} while (--height);  } @@ -1669,7 +1669,7 @@ void Gdi::unkDecodeC(byte *dst, byte *src, int height) {  		do {  			FILL_BITS;  			*dst = color + _palette_mod; -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			if (!READ_BIT) {  			} else if (!READ_BIT) {  				FILL_BITS; @@ -1702,7 +1702,7 @@ void Gdi::unkDecodeC_trans(byte *dst, byte *src, int height) {  			FILL_BITS;  			if (color != _transparentColor)  				*dst = color + _palette_mod; -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			if (!READ_BIT) {  			} else if (!READ_BIT) {  				FILL_BITS; @@ -1733,7 +1733,7 @@ void Gdi::unkDecodeC_trans(byte *dst, byte *src, int height) {  											bits = ((buffer & mask) != 0);  #define NEXT_ROW										\ -				dst += _vm->_realWidth;			\ +				dst += _vm->_screenWidth;			\  				if (--h == 0) {							\  					if (!--x)									\  						return;									\ @@ -1760,7 +1760,7 @@ void Gdi::unkDecode7(byte *dst, byte *src, int height) {  		((uint32 *)dst)[0] = ((uint32 *)src)[0];  		((uint32 *)dst)[1] = ((uint32 *)src)[1];  #endif -		dst += _vm->_realWidth; +		dst += _vm->_screenWidth;  		src += 8;  	} while (--height);  } @@ -1868,7 +1868,7 @@ void Gdi::unkDecode11(byte *dst, byte *src, int height) {  		int h = height;  		do {  			*dst = color; -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			for (i = 0; i < 3; i++) {  				READ_256BIT  				if (!bits) @@ -1929,7 +1929,7 @@ void Scumm::setCameraAt(int pos_x, int pos_y) {  		VAR(VAR_CAMERA_DEST_X) = camera._dest.x;  		VAR(VAR_CAMERA_DEST_Y) = camera._dest.y; -		assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2)); +		assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));  		if ((camera._cur.x != old.x || camera._cur.y != old.y)  				&& VAR(VAR_SCROLL_SCRIPT)) { @@ -1939,7 +1939,7 @@ void Scumm::setCameraAt(int pos_x, int pos_y) {  		}  	} else { -		if (camera._mode != CM_FOLLOW_ACTOR || abs(pos_x - camera._cur.x) > (_realWidth / 2)) { +		if (camera._mode != CM_FOLLOW_ACTOR || abs(pos_x - camera._cur.x) > (_screenWidth / 2)) {  			camera._cur.x = pos_x;  		}  		camera._dest.x = pos_x; @@ -1975,7 +1975,7 @@ void Scumm::setCameraFollows(Actor *a) {  		ax = abs(a->x - camera._cur.x);  		ay = abs(a->y - camera._cur.y); -		if (ax > VAR(VAR_CAMERA_THRESHOLD_X) || ay > VAR(VAR_CAMERA_THRESHOLD_Y) || ax > (_realWidth / 2) || ay > (_realHeight / 2)) { +		if (ax > VAR(VAR_CAMERA_THRESHOLD_X) || ay > VAR(VAR_CAMERA_THRESHOLD_Y) || ax > (_screenWidth / 2) || ay > (_screenHeight / 2)) {  			setCameraAt(a->x, a->y);  		} @@ -2047,7 +2047,7 @@ void Scumm::moveCamera() {  			VAR(VAR_CAMERA_DEST_Y) = camera._dest.y = a->y;  		} -		assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2)); +		assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));  		clampCameraPos(&camera._dest); @@ -2183,22 +2183,22 @@ void Scumm::moveCamera() {  void Scumm::cameraMoved() {  	if (_features & GF_AFTER_V7) { -		assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2)); +		assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));  	} else { -		if (camera._cur.x < (_realWidth / 2)) { -			camera._cur.x = (_realWidth / 2); -		} else if (camera._cur.x > _scrWidth - (_realWidth / 2)) { -			camera._cur.x = _scrWidth - (_realWidth / 2); +		if (camera._cur.x < (_screenWidth / 2)) { +			camera._cur.x = (_screenWidth / 2); +		} else if (camera._cur.x > _roomWidth - (_screenWidth / 2)) { +			camera._cur.x = _roomWidth - (_screenWidth / 2);  		}  	} -	_screenStartStrip = (camera._cur.x - (_realWidth / 2)) >> 3; +	_screenStartStrip = (camera._cur.x - (_screenWidth / 2)) >> 3;  	_screenEndStrip = _screenStartStrip + gdi._numStrips - 1; -	_screenTop = camera._cur.y - (_realHeight / 2); +	_screenTop = camera._cur.y - (_screenHeight / 2);  	if (_features & GF_AFTER_V7) { -		_screenLeft = camera._cur.x - (_realWidth / 2); +		_screenLeft = camera._cur.x - (_screenWidth / 2);  	} else {  		_screenLeft = _screenStartStrip << 3; @@ -3315,7 +3315,7 @@ void Scumm::grabCursor(int x, int y, int w, int h) {  		return;  	} -	grabCursor(vs->screenPtr + (y - vs->topline) * _realWidth + x, w, h); +	grabCursor(vs->screenPtr + (y - vs->topline) * _screenWidth + x, w, h);  } @@ -3335,7 +3335,7 @@ void Scumm::grabCursor(byte *ptr, int width, int height) {  	for (; height; height--) {  		memcpy(dst, ptr, width);  		dst += width; -		ptr += _realWidth; +		ptr += _screenWidth;  	}  	updateCursor(); @@ -3695,7 +3695,7 @@ void Scumm::drawBomp(BompDrawData *bd, int decode_mode, int mask) {  	byte *src = bd->dataptr;  	byte *dst = bd->out + bd->y * bd->outwidth + bd->x + clip_left; -	mask_pitch = _realWidth / 8; +	mask_pitch = _screenWidth / 8;  	mask_offset = _screenStartStrip + (bd->y * mask_pitch) + ((bd->x + clip_left) >> 3);  	charset_mask = getResourceAddress(rtBuffer, 9) + mask_offset; diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp index f994511c29..9cdee54183 100644 --- a/scumm/nut_renderer.cpp +++ b/scumm/nut_renderer.cpp @@ -198,9 +198,9 @@ void NutRenderer::drawChar(byte c, int32 x, int32 y, byte color, bool useMask) {  		y += offsetY[i];  		color = cTable[i]; -		dst = _vm->virtscr[0].screenPtr + y * _vm->_realWidth + x + _vm->virtscr[0].xstart; +		dst = _vm->virtscr[0].screenPtr + y * _vm->_screenWidth + x + _vm->virtscr[0].xstart;  		mask = _vm->getResourceAddress(rtBuffer, 9) -						+ (y * _vm->_realWidth + x) / 8 + _vm->_screenStartStrip; +						+ (y * _vm->_screenWidth + x) / 8 + _vm->_screenStartStrip;  		src = _tmpCodecBuffer; @@ -209,7 +209,7 @@ void NutRenderer::drawChar(byte c, int32 x, int32 y, byte color, bool useMask) {  			maskpos = 0;  			for (int32 tx = 0; tx < width; tx++) {  				byte pixel = *src++; -				if (x + tx < 0 || x + tx >= _vm->_realWidth || y + ty < 0 || y + ty >= _vm->_realHeight) +				if (x + tx < 0 || x + tx >= _vm->_screenWidth || y + ty < 0 || y + ty >= _vm->_screenHeight)  					continue;  #if 1  				if (pixel != 0) { @@ -234,7 +234,7 @@ void NutRenderer::drawChar(byte c, int32 x, int32 y, byte color, bool useMask) {  					maskpos++;  				}  			} -			dst += _vm->_realWidth; +			dst += _vm->_screenWidth;  			mask += _vm->gdi._numStrips;  		} diff --git a/scumm/object.cpp b/scumm/object.cpp index 4e1df8a4f6..1a616c40a9 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -1336,7 +1336,7 @@ void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int object  	eo = &_blastObjectQueue[_blastObjectQueuePos++];  	eo->number = objectNumber;  	eo->posX = objectX + (camera._cur.x & 7); -	eo->posY = objectY + (camera._cur.y - (_realHeight / 2)); +	eo->posY = objectY + (camera._cur.y - (_screenHeight / 2));  	if (objectWidth == 0) {  		od = &_objs[getObjectIndex(objectNumber)];  		eo->width = od->width; diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index bd030f89a6..c066734edb 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -163,7 +163,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) {  	gdi._mask_left = -1; -	initScreens(0, 0, _realWidth, _realHeight); +	initScreens(0, 0, _screenWidth, _screenHeight);  	// Force a fade to black  	int old_screenEffectFlag = _screenEffectFlag; @@ -171,7 +171,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) {  	fadeOut(129);  	_screenEffectFlag = old_screenEffectFlag ? true : false; -	initScreens(0, sb, _realWidth, sh); +	initScreens(0, sb, _screenWidth, sh);  	_completeScreenRedraw = true; @@ -193,7 +193,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) {  	if (_features & GF_AFTER_V7)  		cameraMoved(); -	initBGBuffers(_scrHeight); +	initBGBuffers(_roomHeight);  	if ((_features & GF_AUDIOTRACKS) && VAR(VAR_MUSIC_TIMER) > 0)  		_sound->startCDTimer(); @@ -379,8 +379,8 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {  	};  	const SaveLoadEntry mainEntries[] = { -		MKLINE(Scumm, _scrWidth, sleUint16, VER_V8), -		MKLINE(Scumm, _scrHeight, sleUint16, VER_V8), +		MKLINE(Scumm, _roomWidth, sleUint16, VER_V8), +		MKLINE(Scumm, _roomHeight, sleUint16, VER_V8),  		MKLINE(Scumm, _ENCD_offs, sleUint32, VER_V8),  		MKLINE(Scumm, _EXCD_offs, sleUint32, VER_V8),  		MKLINE(Scumm, _IM00_offs, sleUint32, VER_V8), diff --git a/scumm/script.cpp b/scumm/script.cpp index 728b84cadf..4e7c21495e 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -517,7 +517,7 @@ void Scumm::drawBox(int x, int y, int x2, int y2, int color) {  	x2++;  	y2++; -	if (x > _realWidth - 1) +	if (x > _screenWidth - 1)  		return;  	if (x < 0)  		x = 0; @@ -525,25 +525,25 @@ void Scumm::drawBox(int x, int y, int x2, int y2, int color) {  		y = 0;  	if (x2 < 0)  		return; -	if (x2 > _realWidth - 1) -		x2 = _realWidth - 1; +	if (x2 > _screenWidth - 1) +		x2 = _screenWidth - 1;  	if (y2 > bottom - 1)  		y2 = bottom - 1;  	updateDirtyRect(vs->number, x, x2, y - top, y2 - top, 0); -	backbuff = vs->screenPtr + vs->xstart + (y - top) * _realWidth + x; +	backbuff = vs->screenPtr + vs->xstart + (y - top) * _screenWidth + x;  	if (color == -1) {  		if (vs->number != 0)  			error("can only copy bg to main window"); -		bgbuff = getResourceAddress(rtBuffer, vs->number + 5) + vs->xstart + (y - top) * _realWidth + x; +		bgbuff = getResourceAddress(rtBuffer, vs->number + 5) + vs->xstart + (y - top) * _screenWidth + x;  		blit(backbuff, bgbuff, x2 - x, y2 - y);  	} else {  		count = y2 - y;  		while (count) {  			memset(backbuff, color, x2 - x); -			backbuff += _realWidth; +			backbuff += _screenWidth;  			count--;  		}  	} diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index a51e786bb1..36eca65518 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -1030,14 +1030,14 @@ void Scumm_v2::o2_roomOps() {  	_opcode = fetchScriptByte();  	switch (_opcode & 0x1F) {  	case 1:											/* room scroll */ -		if (a < (_realWidth / 2)) -			a = (_realWidth / 2); -		if (b < (_realWidth / 2)) -			b = (_realWidth / 2); -		if (a > _scrWidth - (_realWidth / 2)) -			a = _scrWidth - (_realWidth / 2); -		if (b > _scrWidth - (_realWidth / 2)) -			b = _scrWidth - (_realWidth / 2); +		if (a < (_screenWidth / 2)) +			a = (_screenWidth / 2); +		if (b < (_screenWidth / 2)) +			b = (_screenWidth / 2); +		if (a > _roomWidth - (_screenWidth / 2)) +			a = _roomWidth - (_screenWidth / 2); +		if (b > _roomWidth - (_screenWidth / 2)) +			b = _roomWidth - (_screenWidth / 2);  		VAR(VAR_CAMERA_MIN_X) = a;  		VAR(VAR_CAMERA_MAX_X) = b;  		break; diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index c79c60e8fc..59aef91b51 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1660,14 +1660,14 @@ void Scumm_v5::o5_roomOps() {  			a = getVarOrDirectWord(0x80);  			b = getVarOrDirectWord(0x40);  		} -		if (a < (_realWidth / 2)) -			a = (_realWidth / 2); -		if (b < (_realWidth / 2)) -			b = (_realWidth / 2); -		if (a > _scrWidth - (_realWidth / 2)) -			a = _scrWidth - (_realWidth / 2); -		if (b > _scrWidth - (_realWidth / 2)) -			b = _scrWidth - (_realWidth / 2); +		if (a < (_screenWidth / 2)) +			a = (_screenWidth / 2); +		if (b < (_screenWidth / 2)) +			b = (_screenWidth / 2); +		if (a > _roomWidth - (_screenWidth / 2)) +			a = _roomWidth - (_screenWidth / 2); +		if (b > _roomWidth - (_screenWidth / 2)) +			b = _roomWidth - (_screenWidth / 2);  		VAR(VAR_CAMERA_MIN_X) = a;  		VAR(VAR_CAMERA_MAX_X) = b;  		break; @@ -1695,7 +1695,7 @@ void Scumm_v5::o5_roomOps() {  			a = getVarOrDirectWord(0x80);  			b = getVarOrDirectWord(0x40);  		} -		initScreens(0, a, _realWidth, b); +		initScreens(0, a, _screenWidth, b);  		break;  	case 4:											/* set palette color */  		if (_features & GF_SMALL_HEADER) { diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index b3a4e90804..16f04701dd 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1460,14 +1460,14 @@ void Scumm_v6::o6_roomOps() {  	case 172:										/* room scroll */  		b = pop();  		a = pop(); -		if (a < (_realWidth / 2)) -			a = (_realWidth / 2); -		if (b < (_realWidth / 2)) -			b = (_realWidth / 2); -		if (a > _scrWidth - (_realWidth / 2)) -			a = _scrWidth - (_realWidth / 2); -		if (b > _scrWidth - (_realWidth / 2)) -			b = _scrWidth - (_realWidth / 2); +		if (a < (_screenWidth / 2)) +			a = (_screenWidth / 2); +		if (b < (_screenWidth / 2)) +			b = (_screenWidth / 2); +		if (a > _roomWidth - (_screenWidth / 2)) +			a = _roomWidth - (_screenWidth / 2); +		if (b > _roomWidth - (_screenWidth / 2)) +			b = _roomWidth - (_screenWidth / 2);  		VAR(VAR_CAMERA_MIN_X) = a;  		VAR(VAR_CAMERA_MAX_X) = b;  		break; @@ -1475,7 +1475,7 @@ void Scumm_v6::o6_roomOps() {  	case 174:										/* set screen */  		b = pop();  		a = pop(); -		initScreens(0, a, _realWidth, b); +		initScreens(0, a, _screenWidth, b);  		break;  	case 175:										/* set palette color */ @@ -2952,7 +2952,7 @@ void Scumm_v6::o6_unknownE1() {  	int y = pop();  	int x = pop(); -	if (x > _realWidth - 1) { +	if (x > _screenWidth - 1) {  		push(-1);  		return;  	} @@ -2973,7 +2973,7 @@ void Scumm_v6::o6_unknownE1() {  		return;  	} -	int offset = (y - vs->topline) * _realWidth + x + _screenLeft; +	int offset = (y - vs->topline) * _screenWidth + x + _screenLeft;  	byte area = *(getResourceAddress(rtBuffer, vs->number + 1) + offset);  	push(area); diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index f30a9fd0ed..58328e0a37 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -585,7 +585,7 @@ void Scumm::drawBlastTexts() {  		_charset->_top = _blastTextQueue[i].ypos;  		_charset->_startLeft = _charset->_left = _blastTextQueue[i].xpos; -		_charset->_right = _realWidth - 1; +		_charset->_right = _screenWidth - 1;  		_charset->_center = _blastTextQueue[i].center;  		_charset->setColor(_blastTextQueue[i].color);  		_charset->_disableOffsX = _charset->_firstChar = true; @@ -1534,7 +1534,7 @@ void Scumm_v8::o8_kernelGetFunctions() {  		break;  	case 0xD8: {		// findBlastObject  		int x = args[1] + (camera._cur.x & 7); -		int y = args[2] + (camera._cur.y - (_realHeight /2));; +		int y = args[2] + (camera._cur.y - (_screenHeight /2));;  		BlastObject *eo;  		for (int i = _blastObjectQueuePos - 1; i >= 0; i--) { diff --git a/scumm/scumm.h b/scumm/scumm.h index cc07370667..142c7b55a2 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -749,7 +749,7 @@ public:  	/* Should be in Graphics class? */  	uint16 _screenB, _screenH; -	int _scrHeight, _scrWidth, _realHeight, _realWidth; +	int _roomHeight, _roomWidth, _screenHeight, _screenWidth;  	VirtScreen virtscr[4];		// Virtual screen areas  	CameraData camera;			// 'Camera' - viewport  	ColorCycle _colorCycle[16];	// Palette cycles diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 92e16a50ac..4f48a6c2f8 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -303,10 +303,10 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)  	memset(_string,0,sizeof(_string));  	_screenB = 0;  	_screenH = 0; -	_scrHeight = 0; -	_scrWidth = 0; -	_realHeight = 0; -	_realWidth = 0; +	_roomHeight = 0; +	_roomWidth = 0; +	_screenHeight = 0; +	_screenWidth = 0;  	memset(virtscr,0,sizeof(virtscr));  	memset(&camera,0,sizeof(CameraData));  	memset(_colorCycle,0,sizeof(_colorCycle)); @@ -539,17 +539,17 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)  	_showStack = 0;  	if (_gameId == GID_ZAK256) {	// FmTowns is 320x240 -		_realWidth = 320; -		_realHeight = 240; +		_screenWidth = 320; +		_screenHeight = 240;  	} else if (_gameId == GID_CMI) { -		_realWidth = 640; -		_realHeight = 480; +		_screenWidth = 640; +		_screenHeight = 480;  	} else { -		_realWidth = 320; -		_realHeight = 200; +		_screenWidth = 320; +		_screenHeight = 200;  	} -	gdi._numStrips = _realWidth / 8; +	gdi._numStrips = _screenWidth / 8;  	_newgui = g_gui;  	_bundle = new Bundle(); @@ -567,7 +567,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)  	}  	/* Initialize backend */ -	syst->init_size(_realWidth, _realHeight); +	syst->init_size(_screenWidth, _screenHeight);  	prop.cd_num = detector->_cdrom;  	if (prop.cd_num >= 0 && (_features & GF_AUDIOTRACKS))  		syst->property(OSystem::PROP_OPEN_CD, &prop); @@ -653,9 +653,9 @@ void Scumm::scummInit() {  	debug(9, "scummInit");  	if (_features & GF_AFTER_V7) { -		initScreens(0, 0, _realWidth, _realHeight); +		initScreens(0, 0, _screenWidth, _screenHeight);  	} else { -		initScreens(0, 16, _realWidth, 144); +		initScreens(0, 16, _screenWidth, 144);  	}  	if (_features & GF_16COLOR) { @@ -700,7 +700,7 @@ void Scumm::scummInit() {  	for (i = 0; i < _maxVerbs; i++) {  		_verbs[i].verbid = 0; -		_verbs[i].right = _realWidth - 1; +		_verbs[i].right = _screenWidth - 1;  		_verbs[i].oldleft = -1;  		_verbs[i].type = 0;  		_verbs[i].color = 2; @@ -767,7 +767,7 @@ void Scumm::scummInit() {  			_string[i].t_xpos = 2;  			_string[i].t_ypos = 5;  		} -		_string[i].t_right = _realWidth - 1; +		_string[i].t_right = _screenWidth - 1;  		_string[i].t_color = 0xF;  		_string[i].t_center = 0;  		_string[i].t_charset = 0; @@ -1157,22 +1157,22 @@ void Scumm::startScene(int room, Actor * a, int objectNr) {  	if (!(_features & GF_AFTER_V7)) {  		camera._mode = CM_NORMAL; -		camera._cur.x = camera._dest.x = _realWidth / 2; -		camera._cur.y = camera._dest.y = _realHeight / 2; +		camera._cur.x = camera._dest.x = _screenWidth / 2; +		camera._cur.y = camera._dest.y = _screenHeight / 2;  	}  	if (_features & GF_AFTER_V6) { -		VAR(VAR_V6_SCREEN_WIDTH) = _scrWidth; -		VAR(VAR_V6_SCREEN_HEIGHT) = _scrHeight; +		VAR(VAR_V6_SCREEN_WIDTH) = _roomWidth; +		VAR(VAR_V6_SCREEN_HEIGHT) = _roomHeight;  	} -	VAR(VAR_CAMERA_MIN_X) = _realWidth / 2; -	VAR(VAR_CAMERA_MAX_X) = _scrWidth - (_realWidth / 2); +	VAR(VAR_CAMERA_MIN_X) = _screenWidth / 2; +	VAR(VAR_CAMERA_MAX_X) = _roomWidth - (_screenWidth / 2);  	if (_features & GF_AFTER_V7) { -		VAR(VAR_CAMERA_MIN_Y) = _realHeight / 2; -		VAR(VAR_CAMERA_MAX_Y) = _scrHeight - (_realHeight / 2); -		setCameraAt(_realWidth / 2, _realHeight / 2); +		VAR(VAR_CAMERA_MIN_Y) = _screenHeight / 2; +		VAR(VAR_CAMERA_MAX_Y) = _roomHeight - (_screenHeight / 2); +		setCameraAt(_screenWidth / 2, _screenHeight / 2);  	}  	if (_roomResource == 0) @@ -1253,14 +1253,14 @@ void Scumm::initRoomSubBlocks() {  		rmhd = (RoomHeader *)findResourceData(MKID('RMHD'), roomptr);  	if (_features & GF_AFTER_V8) { -		_scrWidth = READ_LE_UINT32(&(rmhd->v8.width)); -		_scrHeight = READ_LE_UINT32(&(rmhd->v8.height)); +		_roomWidth = READ_LE_UINT32(&(rmhd->v8.width)); +		_roomHeight = READ_LE_UINT32(&(rmhd->v8.height));  	} else if (_features & GF_AFTER_V7) { -		_scrWidth = READ_LE_UINT16(&(rmhd->v7.width)); -		_scrHeight = READ_LE_UINT16(&(rmhd->v7.height)); +		_roomWidth = READ_LE_UINT16(&(rmhd->v7.width)); +		_roomHeight = READ_LE_UINT16(&(rmhd->v7.height));  	} else { -		_scrWidth = READ_LE_UINT16(&(rmhd->old.width)); -		_scrHeight = READ_LE_UINT16(&(rmhd->old.height)); +		_roomWidth = READ_LE_UINT16(&(rmhd->old.width)); +		_roomHeight = READ_LE_UINT16(&(rmhd->old.height));  	}  	// @@ -1555,7 +1555,7 @@ void Scumm::initRoomSubBlocks() {  			gdi._transparentColor = 255;  	} -	initBGBuffers(_scrHeight); +	initBGBuffers(_roomHeight);  }  void Scumm::setScaleItem(int slot, int a, int b, int c, int d) { @@ -1720,7 +1720,7 @@ void Scumm::processKbd() {  	_virtual_mouse_x = mouse.x + virtscr[0].xstart;  	if(_features & GF_AFTER_V7) -		_virtual_mouse_y = mouse.y + camera._cur.y - (_realHeight / 2); +		_virtual_mouse_y = mouse.y + camera._cur.y - (_screenHeight / 2);  	else  		_virtual_mouse_y = mouse.y; @@ -1818,12 +1818,12 @@ int Scumm::getKeyInput() {  	if (mouse.x < 0)  		mouse.x = 0; -	if (mouse.x > _realWidth-1) -		mouse.x = _realWidth-1; +	if (mouse.x > _screenWidth-1) +		mouse.x = _screenWidth-1;  	if (mouse.y < 0)  		mouse.y = 0; -	if (mouse.y > _realHeight-1) -		mouse.y = _realHeight-1; +	if (mouse.y > _screenHeight-1) +		mouse.y = _screenHeight-1;  	if (_leftBtnPressed & msClicked && _rightBtnPressed & msClicked) {  		_mouseButStat = 0; @@ -2191,7 +2191,7 @@ void Scumm::launch() {  	_verbRedraw = false;  	allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0); -	initVirtScreen(0, 0, 0, _realWidth, _realHeight, false, false); +	initVirtScreen(0, 0, 0, _screenWidth, _screenHeight, false, false);  	setupScummVars(); diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 83f33ed93f..70ceef6950 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -676,7 +676,7 @@ void SmushPlayer::handleFrameObject(Chunk &b) {  	int width = b.getWord();  	int height = b.getWord(); -	if((height != _scumm->_realHeight) || (width != _scumm->_realWidth)) +	if((height != _scumm->_screenHeight) || (width != _scumm->_screenWidth))  		return;  	if(_alreadyInit == false) { diff --git a/scumm/string.cpp b/scumm/string.cpp index 7c425ba6b7..e6f66f98e6 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -100,7 +100,7 @@ void Scumm::CHARSET_1() {  	if (a && _string[0].overhead != 0) {  		if (!(_features & GF_AFTER_V6)) { -			_string[0].xpos = a->x - camera._cur.x + (_realWidth / 2); +			_string[0].xpos = a->x - camera._cur.x + (_screenWidth / 2);  			if (VAR(VAR_V5_TALK_STRING_Y) < 0) {  				s = (a->scaley * (int)VAR(VAR_V5_TALK_STRING_Y)) / 0xFF; @@ -113,23 +113,23 @@ void Scumm::CHARSET_1() {  			if (_string[0].xpos < 80)  				_string[0].xpos = 80; -			if (_string[0].xpos > _realWidth - 80) -				_string[0].xpos = _realWidth - 80; +			if (_string[0].xpos > _screenWidth - 80) +				_string[0].xpos = _screenWidth - 80;  		} else {  			s = a->scaley * a->talkPosX / 0xFF;  			_string[0].ypos = ((a->talkPosX - s) >> 1) + s - a->elevation + a->y;  			if (_string[0].ypos < 1)  				_string[0].ypos = 1; -			if (_string[0].ypos < camera._cur.y - (_realHeight / 2)) -				_string[0].ypos = camera._cur.y - (_realHeight / 2); +			if (_string[0].ypos < camera._cur.y - (_screenHeight / 2)) +				_string[0].ypos = camera._cur.y - (_screenHeight / 2);  			s = a->scalex * a->talkPosY / 0xFF; -			_string[0].xpos = ((a->talkPosY - s) >> 1) + s + a->x - camera._cur.x + (_realWidth / 2); +			_string[0].xpos = ((a->talkPosY - s) >> 1) + s + a->x - camera._cur.x + (_screenWidth / 2);  			if (_string[0].xpos < 80)  				_string[0].xpos = 80; -			if (_string[0].xpos > _realWidth - 80) -				_string[0].xpos = _realWidth - 80; +			if (_string[0].xpos > _screenWidth - 80) +				_string[0].xpos = _screenWidth - 80;  		}  	} @@ -192,7 +192,7 @@ void Scumm::CHARSET_1() {  			gdi._mask_left = _string[0].xpos;  			gdi._mask_top = _string[0].ypos;  			gdi._mask_bottom = _string[0].ypos + 8; -			gdi._mask_right = _realWidth; +			gdi._mask_right = _screenWidth;  			if (_string[0].ypos <= 16)	// If we are cleaning the text line, clean 2 lines.  				gdi._mask_bottom = 16;  		} @@ -351,10 +351,10 @@ void Scumm::drawDescString(byte *msg) {  	addMessageToStack(msg);  	_charsetBufPos = 0; -	_string[0].ypos += camera._cur.y - (_realHeight / 2); +	_string[0].ypos += camera._cur.y - (_screenHeight / 2);  	_charset->_top = _string[0].ypos;  	_charset->_startLeft = _charset->_left = _string[0].xpos; -	_charset->_right = _realWidth - 1; +	_charset->_right = _screenWidth - 1;  	_charset->_center = _string[0].center;  	_charset->setColor(_string[0].color);  	_charset->_disableOffsX = _charset->_firstChar = true; @@ -371,7 +371,7 @@ void Scumm::drawDescString(byte *msg) {  	_talkDelay = 1;  	if (_string[0].ypos + _charset->getFontHeight() > 0) -		restoreBG(0, _string[0].ypos, _realWidth - 1, _string[0].ypos + _charset->getFontHeight()); +		restoreBG(0, _string[0].ypos, _screenWidth - 1, _string[0].ypos + _charset->getFontHeight());  	_charset->_nextLeft = _string[0].xpos;  	_charset->_nextTop = _string[0].ypos; diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 285a4f6eae..f3ebf19f0f 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -144,7 +144,7 @@ void Scumm::drawVerb(int verb, int mode) {  		_string[4].charset = vs->charset_nr;  		_string[4].xpos = vs->x;  		_string[4].ypos = vs->y; -		_string[4].right = _realWidth - 1; +		_string[4].right = _screenWidth - 1;  		_string[4].center = vs->center;  		if (vs->curmode == 2) | 
