Modified VirtScreen to inherit from Graphics::Surface, and added getPixels()/getBackPixels() accessors (these changes make it a bit easier to implement smooth scrolling); also replaced some uses of rtBuffer by proper access through the corresponding VirtScreen
svn-id: r14612
This commit is contained in:
parent
d5f20cacd7
commit
152a5e97fe
15 changed files with 182 additions and 192 deletions
|
@ -2739,12 +2739,12 @@ void ScummEngine_v6::o6_kernelGetFunctions() {
|
|||
|
||||
{
|
||||
VirtScreen *vs = &virtscr[0];
|
||||
if (args[1] < 0 || args[1] >= vs->width || args[2] < 0 || args[2] >= vs->height) {
|
||||
if (args[1] < 0 || args[1] >= vs->w || args[2] < 0 || args[2] >= vs->h) {
|
||||
// FIXME: Until we know what to do in this case...
|
||||
warning("o6_kernelGetFunctions:113: asking for pixel (%d, %d) outside of %dx%d screen", args[1], args[2], vs->width, vs->height);
|
||||
warning("o6_kernelGetFunctions:113: asking for pixel (%d, %d) outside of %dx%d screen", args[1], args[2], vs->w, vs->h);
|
||||
push(0);
|
||||
} else
|
||||
push(vs->screenPtr[args[1] + args[2] * vs->width]);
|
||||
push(*((byte *)vs->pixels + args[1] + args[2] * vs->pitch));
|
||||
}
|
||||
break;
|
||||
case 115:
|
||||
|
@ -3123,9 +3123,7 @@ void ScummEngine_v6::o6_getPixel() {
|
|||
return;
|
||||
}
|
||||
|
||||
int offset = (y - vs->topline) * vs->width + x + vs->xstart;
|
||||
|
||||
byte area = *(vs->screenPtr + offset);
|
||||
byte area = *vs->getPixels(x, y - vs->topline);
|
||||
push(area);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue