Ticket #8636: bs1mac_graphics.patch

File bs1mac_graphics.patch, 1.2 KB (added by criezy, 17 years ago)

Correct glitches with BS1 mac

Line 
1diff -cr scummvm.old/engines/sword1/screen.cpp scummvm/engines/sword1/screen.cpp
2*** scummvm.old/engines/sword1/screen.cpp Fri Apr 13 06:45:37 2007
3--- scummvm/engines/sword1/screen.cpp Sun Apr 15 17:16:14 2007
4***************
5*** 136,141 ****
6--- 136,143 ----
7 uint8 *palData = (uint8*)_resMan->openFetchRes(id);
8 if (start == 0) // force color 0 to black
9 palData[0] = palData[1] = palData[2] = 0;
10+ else if (start + length == 256) // and force color 255 to black as well
11+ palData[(length-1)*3+0] = palData[(length-1)*3+1] = palData[(length-1)*3+2] = 0;
12 for (uint32 cnt = 0; cnt < length; cnt++) {
13 _targetPalette[(start + cnt) * 4 + 0] = palData[cnt * 3 + 0] << 2;
14 _targetPalette[(start + cnt) * 4 + 1] = palData[cnt * 3 + 1] << 2;
15***************
16*** 358,364 ****
17
18 for (uint16 cnty = 0; cnty < _scrnSizeY; cnty++)
19 for (uint16 cntx = 0; cntx < _scrnSizeX; cntx++) {
20! if (*src)
21 *dest = *src;
22 dest++;
23 src++;
24--- 360,366 ----
25
26 for (uint16 cnty = 0; cnty < _scrnSizeY; cnty++)
27 for (uint16 cntx = 0; cntx < _scrnSizeX; cntx++) {
28! if (*src != 0 && *src != 255)
29 *dest = *src;
30 dest++;
31 src++;