Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = height - 1; i >= 0; i--)
- {
- for (int j = 0; j < width; j++)
- {
- c = fgetc(bmp);
- MyByte.X = c;
- for (int count = 8; count > 0; count--)
- {
- switch (count)
- {
- case 1 : map[i][j++] = MyByte.Bits.Bit1; break;
- case 2 : map[i][j++] = MyByte.Bits.Bit2; break;
- case 3 : map[i][j++] = MyByte.Bits.Bit3; break;
- case 4 : map[i][j++] = MyByte.Bits.Bit4; break;
- case 5 : map[i][j++] = MyByte.Bits.Bit5; break;
- case 6 : map[i][j++] = MyByte.Bits.Bit6; break;
- case 7 : map[i][j++] = MyByte.Bits.Bit7; break;
- case 8 : map[i][j++] = MyByte.Bits.Bit8; break;
- }
- if (j == width)
- {
- for (int countByte = 0; countByte < offsetByte; countByte++)
- {
- c = fgetc(bmp);
- }
- break;
- }
- }
- j--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement