[Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.35,1.36 debug.cpp,1.13,1.14 debugger.cpp,1.33,1.34 dialogs.cpp,1.45,1.46 gfx.cpp,2.87,2.88 nut_renderer.cpp,1.22,1.23 object.cpp,1.89,1.90 saveload.cpp,1.64,1.65 script.cpp,1.79,1.80 script_v2.cpp,2.57,2.58 script_v5.cpp,1.74,1.75 script_v6.cpp,1.106,1.107 script_v8.cpp,2.151,2.152 scumm.h,1.181,1.182 scummvm.cpp,2.134,2.135 string.cpp,1.107,1.108 verbs.cpp,1.35,1.36
Max Horn
fingolfin at users.sourceforge.net
Sat May 10 14:51:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv25052
Modified Files:
costume.cpp debug.cpp debugger.cpp dialogs.cpp gfx.cpp
nut_renderer.cpp object.cpp saveload.cpp script.cpp
script_v2.cpp script_v5.cpp script_v6.cpp script_v8.cpp
scumm.h scummvm.cpp string.cpp verbs.cpp
Log Message:
renamed _scrWidth/_scrHeight -> _roomWidht/_roomHeight, and _realWidth/_realHeight -> _screenWidth/_screenHeight (inspired by MadMoose, but I'll take the blame - still this seems much more logical & intuitive)
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- costume.cpp 8 May 2003 15:48:46 -0000 1.35
+++ costume.cpp 10 May 2003 21:49:56 -0000 1.36
@@ -159,7 +159,7 @@
_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 @@
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 @@
_xpos = 0;
_docontinue = 1;
} else {
- s = _right - _vm->_realWidth;
+ s = _right - _vm->_screenWidth;
if (s <= 0) {
b = 2;
} else {
@@ -241,11 +241,11 @@
} 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 @@
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 @@
*dst = pcolor;
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
y++;
if (!--height) {
if (!--width)
@@ -437,7 +437,7 @@
pcolor = _shadow_table[*dst];
*dst = pcolor;
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
y++;
mask += _numStrips;
if (!--height) {
@@ -499,7 +499,7 @@
pcolor = _shadow_table[*dst];
*dst = pcolor;
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
y++;
mask += _numStrips;
if (!--height) {
@@ -562,7 +562,7 @@
pcolor = _shadow_table[*dst];
*dst = pcolor;
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
mask += _numStrips;
y++;
}
@@ -576,7 +576,7 @@
_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 @@
pcolor = _shadow_table[*dst];
*dst = pcolor;
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
mask += _numStrips;
y++;
}
@@ -637,7 +637,7 @@
_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 @@
pcolor = _shadow_table[*dst];
*dst = pcolor;
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
y++;
}
if (!--height) {
@@ -697,7 +697,7 @@
_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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
return;
if (_xpos != oldXpos) {
- dst += _vm->_realWidth - (_xpos - oldXpos);
+ dst += _vm->_screenWidth - (_xpos - oldXpos);
y++;
}
width = _width;
@@ -1148,7 +1148,7 @@
*dst = pcolor;
}
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
mask += _numStrips;
y++;
}
@@ -1162,7 +1162,7 @@
_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;
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debug.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- debug.cpp 8 May 2003 15:48:46 -0000 1.13
+++ debug.cpp 10 May 2003 21:49:57 -0000 1.14
@@ -432,8 +432,8 @@
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 @@
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();
}
Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- debugger.cpp 8 May 2003 15:48:46 -0000 1.33
+++ debugger.cpp 10 May 2003 21:49:57 -0000 1.34
@@ -183,7 +183,7 @@
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");
}
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- dialogs.cpp 8 May 2003 15:48:46 -0000 1.45
+++ dialogs.cpp 10 May 2003 21:49:57 -0000 1.46
@@ -655,7 +655,7 @@
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);
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.87
retrieving revision 2.88
diff -u -d -r2.87 -r2.88
--- gfx.cpp 10 May 2003 21:33:28 -0000 2.87
+++ gfx.cpp 10 May 2003 21:49:57 -0000 2.88
@@ -200,14 +200,14 @@
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 @@
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 @@
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 @@
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 @@
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 @@
} 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 @@
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 @@
do {
memcpy(dst, src, w);
- dst += _realWidth;
- src += _realWidth;
+ dst += _screenWidth;
+ src += _screenWidth;
} while (--h);
}
@@ -528,7 +528,7 @@
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 @@
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 @@
i = _flashlight.h;
do {
memset(_flashlight.buffer, 0, _flashlight.w);
- _flashlight.buffer += _realWidth;
+ _flashlight.buffer += _screenWidth;
} while (--i);
}
_flashlightIsDrawn = false;
@@ -632,7 +632,7 @@
}
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 @@
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 @@
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 @@
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 @@
} else {
while (height--) {
memset(backbuff, backColor, width);
- backbuff += _realWidth;
+ backbuff += _screenWidth;
}
}
}
@@ -929,7 +929,7 @@
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
((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 @@
((uint32 *)dst)[1] = 0;
#endif
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
mask += _numStrips;
} while (--height);
}
@@ -1419,8 +1419,8 @@
((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 @@
((uint32 *)dst)[0] = 0;
((uint32 *)dst)[1] = 0;
#endif
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
} while (--height);
}
@@ -1526,7 +1526,7 @@
do {
if (!--x) {
x = 8;
- dst += _vm->_realWidth - 8;
+ dst += _vm->_screenWidth - 8;
if (!--height)
return;
}
@@ -1538,7 +1538,7 @@
}
}
} while (--x);
- dst += _vm->_realWidth - 8;
+ dst += _vm->_screenWidth - 8;
} while (--height);
}
@@ -1576,7 +1576,7 @@
do {
if (!--x) {
x = 8;
- dst += _vm->_realWidth - 8;
+ dst += _vm->_screenWidth - 8;
if (!--height)
return;
}
@@ -1590,7 +1590,7 @@
}
}
} while (--x);
- dst += _vm->_realWidth - 8;
+ dst += _vm->_screenWidth - 8;
} while (--height);
}
@@ -1620,7 +1620,7 @@
color += inc;
}
} while (--x);
- dst += _vm->_realWidth - 8;
+ dst += _vm->_screenWidth - 8;
} while (--height);
}
@@ -1652,7 +1652,7 @@
color += inc;
}
} while (--x);
- dst += _vm->_realWidth - 8;
+ dst += _vm->_screenWidth - 8;
} while (--height);
}
@@ -1669,7 +1669,7 @@
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 @@
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 @@
bits = ((buffer & mask) != 0);
#define NEXT_ROW \
- dst += _vm->_realWidth; \
+ dst += _vm->_screenWidth; \
if (--h == 0) { \
if (!--x) \
return; \
@@ -1760,7 +1760,7 @@
((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 @@
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 @@
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 @@
}
} 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 @@
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 @@
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::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 @@
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 @@
for (; height; height--) {
memcpy(dst, ptr, width);
dst += width;
- ptr += _realWidth;
+ ptr += _screenWidth;
}
updateCursor();
@@ -3695,7 +3695,7 @@
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;
Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- nut_renderer.cpp 1 Apr 2003 15:32:17 -0000 1.22
+++ nut_renderer.cpp 10 May 2003 21:49:57 -0000 1.23
@@ -198,9 +198,9 @@
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 @@
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 @@
maskpos++;
}
}
- dst += _vm->_realWidth;
+ dst += _vm->_screenWidth;
mask += _vm->gdi._numStrips;
}
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- object.cpp 10 May 2003 18:38:59 -0000 1.89
+++ object.cpp 10 May 2003 21:49:57 -0000 1.90
@@ -1336,7 +1336,7 @@
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;
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- saveload.cpp 8 May 2003 15:48:48 -0000 1.64
+++ saveload.cpp 10 May 2003 21:49:57 -0000 1.65
@@ -163,7 +163,7 @@
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 @@
fadeOut(129);
_screenEffectFlag = old_screenEffectFlag ? true : false;
- initScreens(0, sb, _realWidth, sh);
+ initScreens(0, sb, _screenWidth, sh);
_completeScreenRedraw = true;
@@ -193,7 +193,7 @@
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 @@
};
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),
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- script.cpp 8 May 2003 21:14:21 -0000 1.79
+++ script.cpp 10 May 2003 21:49:58 -0000 1.80
@@ -517,7 +517,7 @@
x2++;
y2++;
- if (x > _realWidth - 1)
+ if (x > _screenWidth - 1)
return;
if (x < 0)
x = 0;
@@ -525,25 +525,25 @@
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--;
}
}
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.57
retrieving revision 2.58
diff -u -d -r2.57 -r2.58
--- script_v2.cpp 10 May 2003 21:35:06 -0000 2.57
+++ script_v2.cpp 10 May 2003 21:49:58 -0000 2.58
@@ -1030,14 +1030,14 @@
_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;
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- script_v5.cpp 8 May 2003 15:48:48 -0000 1.74
+++ script_v5.cpp 10 May 2003 21:49:58 -0000 1.75
@@ -1660,14 +1660,14 @@
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 @@
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) {
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- script_v6.cpp 8 May 2003 15:48:49 -0000 1.106
+++ script_v6.cpp 10 May 2003 21:49:58 -0000 1.107
@@ -1460,14 +1460,14 @@
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 @@
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 @@
int y = pop();
int x = pop();
- if (x > _realWidth - 1) {
+ if (x > _screenWidth - 1) {
push(-1);
return;
}
@@ -2973,7 +2973,7 @@
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);
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.151
retrieving revision 2.152
diff -u -d -r2.151 -r2.152
--- script_v8.cpp 8 May 2003 15:48:49 -0000 2.151
+++ script_v8.cpp 10 May 2003 21:49:58 -0000 2.152
@@ -585,7 +585,7 @@
_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 @@
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--) {
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- scumm.h 10 May 2003 17:09:21 -0000 1.181
+++ scumm.h 10 May 2003 21:49:58 -0000 1.182
@@ -749,7 +749,7 @@
/* 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
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.134
retrieving revision 2.135
diff -u -d -r2.134 -r2.135
--- scummvm.cpp 10 May 2003 17:09:21 -0000 2.134
+++ scummvm.cpp 10 May 2003 21:49:58 -0000 2.135
@@ -303,10 +303,10 @@
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 @@
_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 @@
}
/* 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 @@
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 @@
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 @@
_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 @@
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 @@
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 @@
gdi._transparentColor = 255;
}
- initBGBuffers(_scrHeight);
+ initBGBuffers(_roomHeight);
}
void Scumm::setScaleItem(int slot, int a, int b, int c, int d) {
@@ -1720,7 +1720,7 @@
_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 @@
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 @@
_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();
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- string.cpp 8 May 2003 15:48:50 -0000 1.107
+++ string.cpp 10 May 2003 21:49:59 -0000 1.108
@@ -100,7 +100,7 @@
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 @@
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 @@
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 @@
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 @@
_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;
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- verbs.cpp 10 May 2003 12:59:32 -0000 1.35
+++ verbs.cpp 10 May 2003 21:49:59 -0000 1.36
@@ -144,7 +144,7 @@
_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)
More information about the Scummvm-git-logs
mailing list