|
From: John M M. <jo...@us...> - 2003-11-17 23:39:29
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv7556/squeak/platforms/Mac OS/vm
Modified Files:
sqMacWindow.c
Log Message:
3.6.1b5 Add 8bit to 8/16/32 screen depth.
Index: sqMacWindow.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacWindow.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** sqMacWindow.c 17 Nov 2003 17:16:02 -0000 1.27
--- sqMacWindow.c 17 Nov 2003 23:39:26 -0000 1.28
***************
*** 317,321 ****
--- 317,360 ----
out += pixPitch;
}
+ } else if (depth == 8 && pixDepth == 16) {
+ while (affectedH--) {
+ short *to= out;
+ unsigned char *from= in;
+ long count= bytes;
+ unsigned short r,g,b;
+ unsigned long target;
+ while (count--) {
+ target = *from++;
+ r = (short) (*stColorTable)->ctTable[target].rgb.red;
+ g = (short) (*stColorTable)->ctTable[target].rgb.green;
+ b = (short) (*stColorTable)->ctTable[target].rgb.blue;
+ *to++ = ((r>>11) << 10) |
+ ((g>>11) << 5) |
+ ((b>>11));
+ }
+ in += pitch;
+ out += pixPitch;
+ }
+ }else if (depth == 8 && pixDepth == 32) {
+ while (affectedH--) {
+ long *to= out;
+ unsigned char *from= in;
+ long count= bytes;
+ unsigned short r,g,b;
+ unsigned long target;
+ while (count--) {
+ target = *from++;
+ r = (short) (*stColorTable)->ctTable[target].rgb.red;
+ g = (short) (*stColorTable)->ctTable[target].rgb.green;
+ b = (short) (*stColorTable)->ctTable[target].rgb.blue;
+ *to++ = ((r>>8) << 16) |
+ ((g>>8) << 8) |
+ ((b>>8));
+ }
+ in += pitch;
+ out += pixPitch;
+ }
}
+
SetRectRgn(maskRect, affectedL, affectedT, affectedR, affectedB);
***************
*** 471,474 ****
--- 510,515 ----
case 2:
case 4:
+ return false; //OS-X 10.3.0/1 bug in copybits, force silly manual move
+ break;
case 8:
case 16:
|