mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
fixes to resolutions
svn-id: r4893
This commit is contained in:
parent
a2ab750f88
commit
daa997fab2
@ -366,8 +366,8 @@ void Actor::setupActorScale()
|
||||
if (resptr == NULL)
|
||||
error("Scale table %d not defined", scale);
|
||||
int theY = y;
|
||||
if (theY >= 200)
|
||||
theY = 199;
|
||||
if (theY >= (_vm->_realWidth / 2))
|
||||
theY = (_vm->_realWidth / 2) - 1;
|
||||
else if (theY < 0)
|
||||
theY = 0;
|
||||
scale = resptr[theY];
|
||||
|
@ -355,7 +355,7 @@ void akos_generic_decode(AkosRenderer * ar)
|
||||
|
||||
if (ar->v1.scaletable[ar->v1.tmp_x] < ar->scale_x) {
|
||||
ar->v1.x += ar->v1.scaleXstep;
|
||||
if ((uint) ar->v1.x >= 320)
|
||||
if ((uint) ar->v1.x >= g_scumm->_realWidth)
|
||||
return;
|
||||
maskbit = revBitMask[ar->v1.x & 7];
|
||||
ar->v1.destptr += ar->v1.scaleXstep;
|
||||
@ -423,7 +423,7 @@ void akos_c1_spec1(AkosRenderer * ar)
|
||||
|
||||
if (ar->v1.scaletable[ar->v1.tmp_x] < ar->scale_x) {
|
||||
ar->v1.x += ar->v1.scaleXstep;
|
||||
if ((uint) ar->v1.x >= 320)
|
||||
if ((uint) ar->v1.x >= g_scumm->_realWidth)
|
||||
return;
|
||||
maskbit = revBitMask[ar->v1.x & 7];
|
||||
ar->v1.destptr += ar->v1.scaleXstep;
|
||||
|
@ -284,8 +284,8 @@ byte CostumeRenderer::mainRoutine(Actor *a, int slot, int frame)
|
||||
CHECK_HEAP return 2;
|
||||
}
|
||||
|
||||
_bgbak_ptr = _vm->getResourceAddress(rtBuffer, 5) + _vm->virtscr[0].xstart + _ypos * 320 + _xpos;
|
||||
_backbuff_ptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart + _ypos * 320 + _xpos;
|
||||
_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;
|
||||
charsetmask =
|
||||
_vm->hasCharsetMask(_left, _top + _vm->virtscr[0].topline, _right,
|
||||
_vm->virtscr[0].topline + _bottom);
|
||||
@ -395,7 +395,7 @@ void CostumeRenderer::proc6()
|
||||
*dst = pcolor;
|
||||
}
|
||||
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
y++;
|
||||
if (!--height) {
|
||||
if (!--width)
|
||||
@ -443,7 +443,7 @@ void CostumeRenderer::proc5()
|
||||
pcolor = _shadow_table[*dst];
|
||||
*dst = pcolor;
|
||||
}
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
y++;
|
||||
mask += 40;
|
||||
if (!--height) {
|
||||
@ -506,7 +506,7 @@ void CostumeRenderer::proc4()
|
||||
pcolor = _shadow_table[*dst];
|
||||
*dst = pcolor;
|
||||
}
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
y++;
|
||||
mask += 40;
|
||||
if (!--height) {
|
||||
@ -570,7 +570,7 @@ void CostumeRenderer::proc3()
|
||||
pcolor = _shadow_table[*dst];
|
||||
*dst = pcolor;
|
||||
}
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
mask += 40;
|
||||
y++;
|
||||
}
|
||||
@ -584,7 +584,7 @@ void CostumeRenderer::proc3()
|
||||
_scaleIndexX = t + _scaleIndexXStep;
|
||||
if (cost_scaleTable[t] < _scaleX) {
|
||||
_xpos += _scaleIndexXStep;
|
||||
if (_xpos >= 320)
|
||||
if (_xpos >= _vm->_realWidth)
|
||||
return;
|
||||
maskbit = revBitMask[_xpos & 7];
|
||||
_backbuff_ptr += _scaleIndexXStep;
|
||||
@ -632,7 +632,7 @@ void CostumeRenderer::proc2()
|
||||
pcolor = _shadow_table[*dst];
|
||||
*dst = pcolor;
|
||||
}
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
mask += 40;
|
||||
y++;
|
||||
}
|
||||
@ -925,7 +925,7 @@ void CostumeRenderer::proc3_ami()
|
||||
len = *src++;
|
||||
do {
|
||||
if (cost_scaleTable[_scaleIndexY] < _scaleY) {
|
||||
if (color && _xpos >= 0 && _xpos < 320 && !((*mask | mask[_imgbufoffs]) & maskbit)) {
|
||||
if (color && _xpos >= 0 && _xpos < _vm->_realWidth && !((*mask | mask[_imgbufoffs]) & maskbit)) {
|
||||
pcolor = _palette[color];
|
||||
/* if (pcolor == 13)
|
||||
pcolor = _shadow_table[*dst];*/
|
||||
|
@ -355,8 +355,8 @@ static byte *getBasePtr(Scumm *_s, int x, int y)
|
||||
if (vs == NULL)
|
||||
return NULL;
|
||||
|
||||
return vs->screenPtr + x + (y - vs->topline) * 320 +
|
||||
_s->_screenStartStrip * 8 + (_s->camera._cur.y - 100) * 320;
|
||||
return vs->screenPtr + x + (y - vs->topline) * _s->_realWidth +
|
||||
_s->_screenStartStrip * 8 + (_s->camera._cur.y - (_s->_realHeight / 2)) * _s->_realWidth;
|
||||
}
|
||||
|
||||
static void hline(Scumm *scumm, int x1, int x2, int y, byte color)
|
||||
@ -479,7 +479,7 @@ void ScummDebugger::boxTest(int num)
|
||||
|
||||
VirtScreen *vs = _s->findVirtScreen(box.ul.y);
|
||||
if (vs != NULL)
|
||||
_s->setVirtscreenDirty(vs, 0, 0, 320, 200);
|
||||
_s->setVirtscreenDirty(vs, 0, 0, _s->_realWidth, _s->_realHeight);
|
||||
_s->drawDirtyScreenParts();
|
||||
_s->_system->update_screen();
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ void Scumm::drawDirtyScreenParts()
|
||||
} else {
|
||||
vs = &virtscr[0];
|
||||
|
||||
src = vs->screenPtr + _screenStartStrip * 8 + camera._cur.y - 100;
|
||||
src = vs->screenPtr + _screenStartStrip * 8 + camera._cur.y - (_realHeight / 2);
|
||||
_system->copy_rect(src, _realWidth, 0, vs->topline, _realWidth, vs->height);
|
||||
|
||||
for (i = 0; i < NUM_STRIPS; i++) {
|
||||
@ -1174,7 +1174,7 @@ void Gdi::clear8ColWithMasking()
|
||||
((uint32 *)dst)[0] = 0;
|
||||
((uint32 *)dst)[1] = 0;
|
||||
}
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
mask += NUM_STRIPS;
|
||||
} while (--height);
|
||||
}
|
||||
@ -1442,7 +1442,7 @@ void Gdi::unkDecode4()
|
||||
do {
|
||||
FILL_BITS if (color != _transparency)
|
||||
*dst = color + _palette_mod;
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
if (!READ_BIT) {
|
||||
} else if (!READ_BIT) {
|
||||
FILL_BITS color = bits & _decomp_mask;
|
||||
@ -1680,7 +1680,7 @@ void Gdi::unkDecode11()
|
||||
_tempNumLines = _numLinesToProcess;
|
||||
do {
|
||||
*dst = color;
|
||||
dst += 320;
|
||||
dst += _vm->_realWidth;
|
||||
for (i = 0; i < 3; i++) {
|
||||
READ_256BIT if (!bits)
|
||||
break;
|
||||
@ -1790,7 +1790,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom)
|
||||
if (height) {
|
||||
do {
|
||||
memset(backbuff, _bkColor, width);
|
||||
backbuff += 320;
|
||||
backbuff += _realWidth;
|
||||
} while (--height);
|
||||
}
|
||||
}
|
||||
@ -2312,9 +2312,9 @@ void Scumm::cameraMoved()
|
||||
{
|
||||
if (_features & GF_AFTER_V7) {
|
||||
|
||||
assert(camera._cur.x >= 160 && camera._cur.y >= 100);
|
||||
assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2));
|
||||
|
||||
_screenStartStrip = (camera._cur.x - 160) >> 3;
|
||||
_screenStartStrip = (camera._cur.x - (_realWidth / 2)) >> 3;
|
||||
_screenEndStrip = _screenStartStrip + NUM_STRIPS - 1;
|
||||
virtscr[0].xstart = _screenStartStrip << 3;
|
||||
|
||||
@ -2788,7 +2788,7 @@ void Scumm::grabCursor(int x, int y, int w, int h)
|
||||
return;
|
||||
}
|
||||
|
||||
grabCursor(vs->screenPtr + (y - vs->topline) * 320 + x, w, h);
|
||||
grabCursor(vs->screenPtr + (y - vs->topline) * _realWidth + x, w, h);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int object
|
||||
eo->areaWidth = _enqueue_d;
|
||||
eo->areaHeight = _enqueue_e;
|
||||
eo->posX = objectX + (camera._cur.x & 7);
|
||||
eo->posY = objectY + (camera._cur.y - 100);
|
||||
eo->posY = objectY + (camera._cur.y - (_realHeight / 2));
|
||||
if (objectWidth == 0) {
|
||||
od = &_objs[getObjectIndex(objectNumber)];
|
||||
eo->width = od->width;
|
||||
|
@ -479,25 +479,25 @@ void Scumm::drawBox(int x, int y, int x2, int y2, int color)
|
||||
y = 0;
|
||||
if (x2 < 0)
|
||||
return;
|
||||
if (x2 > 320)
|
||||
x2 = 320;
|
||||
if (x2 > _realWidth)
|
||||
x2 = _realWidth;
|
||||
if (y2 > bottom)
|
||||
y2 = bottom;
|
||||
|
||||
updateDirtyRect(vs->number, x, x2, y - top, y2 - top, 0);
|
||||
|
||||
backbuff = vs->screenPtr + vs->xstart + (y - top) * 320 + x;
|
||||
backbuff = vs->screenPtr + vs->xstart + (y - top) * _realWidth + 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) * 320 + x;
|
||||
bgbuff = getResourceAddress(rtBuffer, vs->number + 5) + vs->xstart + (y - top) * _realWidth + x;
|
||||
blit(backbuff, bgbuff, x2 - x, y2 - y);
|
||||
} else {
|
||||
count = y2 - y;
|
||||
while (count) {
|
||||
memset(backbuff, color, x2 - x);
|
||||
backbuff += 320;
|
||||
backbuff += _realWidth;
|
||||
count--;
|
||||
}
|
||||
}
|
||||
|
@ -1881,14 +1881,14 @@ void Scumm::o5_roomOps()
|
||||
a = getVarOrDirectWord(0x80);
|
||||
b = getVarOrDirectWord(0x40);
|
||||
}
|
||||
if (a < 160)
|
||||
a = 160;
|
||||
if (b < 160)
|
||||
b = 160;
|
||||
if (a > _scrWidth - 160)
|
||||
a = _scrWidth - 160;
|
||||
if (b > _scrWidth - 160)
|
||||
b = _scrWidth - 160;
|
||||
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);
|
||||
_vars[VAR_CAMERA_MIN_X] = a;
|
||||
_vars[VAR_CAMERA_MAX_X] = b;
|
||||
break;
|
||||
@ -1911,7 +1911,7 @@ void Scumm::o5_roomOps()
|
||||
a = getVarOrDirectWord(0x80);
|
||||
b = getVarOrDirectWord(0x40);
|
||||
}
|
||||
initScreens(0, a, 320, b);
|
||||
initScreens(0, a, _realWidth, b);
|
||||
break;
|
||||
case 4: /* set palette color */
|
||||
if (_features & GF_SMALL_HEADER) {
|
||||
|
@ -1410,7 +1410,7 @@ void Scumm::o6_putActorAtObject()
|
||||
if (whereIsObject(obj) != WIO_NOT_FOUND) {
|
||||
getObjectXYPos(obj, x, y);
|
||||
} else {
|
||||
x = 160;
|
||||
x = (_realWidth / 2);
|
||||
y = 120;
|
||||
}
|
||||
if (room == 0xFF)
|
||||
@ -1790,14 +1790,14 @@ void Scumm::o6_roomOps()
|
||||
case 172: /* room scroll */
|
||||
b = pop();
|
||||
a = pop();
|
||||
if (a < 160)
|
||||
a = 160;
|
||||
if (b < 160)
|
||||
b = 160;
|
||||
if (a > _scrWidth - 160)
|
||||
a = _scrWidth - 160;
|
||||
if (b > _scrWidth - 160)
|
||||
b = _scrWidth - 160;
|
||||
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);
|
||||
_vars[VAR_CAMERA_MIN_X] = a;
|
||||
_vars[VAR_CAMERA_MAX_X] = b;
|
||||
break;
|
||||
@ -1805,7 +1805,7 @@ void Scumm::o6_roomOps()
|
||||
case 174: /* set screen */
|
||||
b = pop();
|
||||
a = pop();
|
||||
initScreens(0, a, 320, b);
|
||||
initScreens(0, a, _realWidth, b);
|
||||
break;
|
||||
|
||||
case 175: /* set palette color */
|
||||
|
@ -931,7 +931,7 @@ void Scumm::processKbd()
|
||||
|
||||
|
||||
if(_features & GF_AFTER_V7)
|
||||
_virtual_mouse_y = mouse.y + camera._cur.y-100;
|
||||
_virtual_mouse_y = mouse.y + camera._cur.y - (_realHeight / 2);
|
||||
else
|
||||
_virtual_mouse_y = mouse.y;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user