diff -ur ScummVM-cvs20021010/scummvm/scumm/gfx.cpp ScummVM-cvs20021010+hack/scummvm/scumm/gfx.cpp
old
|
new
|
|
1838 | 1838 | lp = (left >> 3) + _screenStartStrip; |
1839 | 1839 | if (lp < 0) |
1840 | 1840 | lp = 0; |
1841 | | if (rp >= _realHeight) |
1842 | | rp = _realHeight; |
| 1841 | if (rp >= 200) |
| 1842 | rp = 200; |
1843 | 1843 | if (lp <= rp) { |
1844 | 1844 | num = rp - lp + 1; |
1845 | 1845 | sp = &gfxUsageBits[lp]; |
… |
… |
|
3194 | 3194 | int src_x, src_y, dst_x, dst_y; |
3195 | 3195 | uint scaled_width, scaled_height; |
3196 | 3196 | int h = bd->srcheight; |
| 3197 | byte *mask = NULL; |
3197 | 3198 | uint i; |
3198 | 3199 | |
3199 | 3200 | if (h == 0 || bd->srcwidth == 0) |
… |
… |
|
3217 | 3218 | } |
3218 | 3219 | } |
3219 | 3220 | |
| 3221 | // We take charset masking into consideration, because otherwise the |
| 3222 | // inventory window in The Dig may overwrite text. |
| 3223 | |
| 3224 | mask = getResourceAddress(rtBuffer, 9) + _screenStartStrip; |
| 3225 | |
3220 | 3226 | // Select which rows and columns from the original to show in the |
3221 | 3227 | // scaled version of the image. This is a pretty stupid way of scaling |
3222 | 3228 | // images, but it will have to do for now. |
… |
… |
|
3267 | 3273 | color = *src++; |
3268 | 3274 | for (i = 0; i < num; i++) { |
3269 | 3275 | if (bd->scale_x == 255 || scale_cols[src_x]) { |
3270 | | if (dst_x >= 0 && dst_x < bd->outwidth) |
3271 | | *d = blend(_currentPalette, color, *d); |
| 3276 | if (dst_x >= 0 && dst_x < bd->outwidth) { |
| 3277 | if (!(*(mask + dst_y * 40 + (dst_x >> 3)) & revBitMask[dst_x & 7])) |
| 3278 | |
| 3279 | *d = blend(_currentPalette, color, *d); |
| 3280 | } |
3272 | 3281 | d++; |
3273 | 3282 | dst_x++; |
3274 | 3283 | } |
… |
… |
|
3278 | 3287 | for (i = 0; i < num; i++) { |
3279 | 3288 | if (bd->scale_x == 255 || scale_cols[src_x]) { |
3280 | 3289 | if (dst_x >= 0 && dst_x < bd->outwidth) |
3281 | | *d = blend(_currentPalette, src[i], *d); |
| 3290 | if (!(*(mask + dst_y * 40 + (dst_x >> 3)) & revBitMask[dst_x & 7])) |
| 3291 | *d = blend(_currentPalette, src[i], *d); |
3282 | 3292 | d++; |
3283 | 3293 | dst_x++; |
3284 | 3294 | } |
diff -ur ScummVM-cvs20021010/scummvm/scumm/object.cpp ScummVM-cvs20021010+hack/scummvm/scumm/object.cpp
old
|
new
|
|
1268 | 1268 | |
1269 | 1269 | void Scumm::removeBlastObject(BlastObject *eo) |
1270 | 1270 | { |
1271 | | restoreBG(eo->posX, eo->posY, eo->posX + eo->width, eo->posY + eo->height); |
| 1271 | VirtScreen *vs = &virtscr[0]; |
| 1272 | |
| 1273 | int top, bottom, left, right; |
| 1274 | int left_strip, right_strip; |
| 1275 | int i; |
| 1276 | |
| 1277 | top = eo->posY; |
| 1278 | bottom = eo->posY + eo->height; |
| 1279 | left = eo->posX; |
| 1280 | right = eo->posX + eo->width; |
| 1281 | |
| 1282 | if (bottom < 0 || right < 0 || top > vs->height || left > vs->width) |
| 1283 | return; |
| 1284 | |
| 1285 | if (top < 0) |
| 1286 | top = 0; |
| 1287 | if (bottom > vs->height) |
| 1288 | bottom = vs->height; |
| 1289 | if (left < 0) |
| 1290 | left = 0; |
| 1291 | if (right > vs->width) |
| 1292 | right = vs->width; |
| 1293 | |
| 1294 | left_strip = left >> 3; |
| 1295 | right_strip = (right >> 3) + 1; |
| 1296 | |
| 1297 | if (left_strip < 0) |
| 1298 | left_strip = 0; |
| 1299 | if (right_strip >= 200) |
| 1300 | right_strip = 200; |
| 1301 | |
| 1302 | for (i = left_strip; i <= right_strip; i++) |
| 1303 | gdi.resetBackground(top, bottom, i); |
| 1304 | |
| 1305 | updateDirtyRect(0, left, right, top, bottom, 0x40000000); |
1272 | 1306 | } |
1273 | 1307 | |
1274 | 1308 | int Scumm::findFlObjectSlot() |