* better drawBox (tnx sam_k)
* more params allowed for soundKludge opcode (8 instead of 16) will perhaps fix bugs. svn-id: r3523
This commit is contained in:
parent
aa16d39198
commit
761fe5d7bd
7 changed files with 25 additions and 15 deletions
19
script.cpp
19
script.cpp
|
@ -380,7 +380,7 @@ void Scumm::setResult(int value) {
|
|||
void Scumm::drawBox(int x, int y, int x2, int y2, int color) {
|
||||
int top,bottom,count;
|
||||
VirtScreen *vs;
|
||||
byte *backbuff;
|
||||
byte *backbuff, *bgbuff;
|
||||
|
||||
if ((vs=findVirtScreen(y)) == NULL)
|
||||
return;
|
||||
|
@ -407,11 +407,18 @@ void Scumm::drawBox(int x, int y, int x2, int y2, int color) {
|
|||
|
||||
backbuff = getResourceAddress(rtBuffer, vs->number+1) + vs->xstart + (y-top)*320 + x;
|
||||
|
||||
count = y2 - y;
|
||||
while (count) {
|
||||
memset(backbuff, color, x2 - x);
|
||||
backbuff += 320;
|
||||
count--;
|
||||
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;
|
||||
blit(backbuff, bgbuff, x2 - x, y2 - y);
|
||||
} else {
|
||||
count = y2 - y;
|
||||
while (count) {
|
||||
memset(backbuff, color, x2 - x);
|
||||
backbuff += 320;
|
||||
count--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue