comparison src/gb/GB.cpp @ 497:690811e54b51

reversed pixel image.
author Robert McIntyre <rlm@mit.edu>
date Mon, 11 Jun 2012 06:19:38 -0500
parents a6d060a64246
children fa7676dbf6f2
comparison
equal deleted inserted replaced
496:a6d060a64246 497:690811e54b51
3888 int w = 160; 3888 int w = 160;
3889 int h = 144; 3889 int h = 144;
3890 3890
3891 int sizeX = w; 3891 int sizeX = w;
3892 int sizeY = h; 3892 int sizeY = h;
3893
3894 store += w * (h - 1);
3893 3895
3894 u32 *pixU32 = (u32 *)(pix + 4 * (w + 1) * (h)); 3896 u32 *pixU32 = (u32 *)(pix + 4 * (w + 1) * (h));
3895 for (int y = 0; y < sizeY; y++) 3897 for (int y = 0; y < sizeY; y++)
3896 { 3898 {
3897 for (int x = 0; x < sizeX; x++) 3899 for (int x = 0; x < sizeX; x++)
3903 u8 r = ((v >> systemRedShift) & 0x001f) << 3; // R 3905 u8 r = ((v >> systemRedShift) & 0x001f) << 3; // R
3904 3906
3905 int32 rgb = (r << 16 ) + (g << 8) + b; 3907 int32 rgb = (r << 16 ) + (g << 8) + b;
3906 *store++ = rgb; 3908 *store++ = rgb;
3907 } 3909 }
3910 store -= (2 * w);
3908 pixU32++; 3911 pixU32++;
3909 pixU32 -= 2 * (w + 1); 3912 pixU32 -= 2 * (w + 1);
3910 } 3913 }
3911 } 3914 }
3912 3915