comparison test/automated/common/common.c @ 3482:78db4f7ae2f3

More fixes to compile under Visual C++
author Sam Lantinga <slouken@libsdl.org>
date Sun, 22 Nov 2009 07:00:26 +0000
parents c32c53fca10d
children 5f038ec1a1af
comparison
equal deleted inserted replaced
3481:c32c53fca10d 3482:78db4f7ae2f3
40 switch (bpp) { 40 switch (bpp) {
41 case 1: 41 case 1:
42 case 2: 42 case 2:
43 case 3: 43 case 3:
44 ret += 1; 44 ret += 1;
45 printf("%d BPP not supported yet.\n",bpp); 45 /*printf("%d BPP not supported yet.\n",bpp);*/
46 break; 46 break;
47 47
48 case 4: 48 case 4:
49 { 49 {
50 int dist = 0; 50 int dist = 0;
84 84
85 /* Compare image - should be same format. */ 85 /* Compare image - should be same format. */
86 if (bpp == 4) { 86 if (bpp == 4) {
87 for (j=0; j<sur->h; j++) { 87 for (j=0; j<sur->h; j++) {
88 for (i=0; i<sur->w; i++) { 88 for (i=0; i<sur->w; i++) {
89 Uint8 R, G, B, A;
89 p = (Uint8 *)sur->pixels + j * sur->pitch + i * bpp; 90 p = (Uint8 *)sur->pixels + j * sur->pitch + i * bpp;
90 pd = (Uint8 *)img->pixel_data + (j*img->width + i) * img->bytes_per_pixel; 91 pd = (Uint8 *)img->pixel_data + (j*img->width + i) * img->bytes_per_pixel;
91 Uint8 R, G, B, A;
92 92
93 R = pd[0]; 93 R = pd[0];
94 G = pd[1]; 94 G = pd[1];
95 B = pd[2]; 95 B = pd[2];
96 if (img->bytes_per_pixel == 4) { 96 if (img->bytes_per_pixel == 4) {