Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. for (int i = height - 1; i >= 0; i--)
  2. {
  3. for (int j = 0; j < width; j++)
  4. {
  5. c = fgetc(bmp);
  6. MyByte.X = c;
  7. for (int count = 8; count > 0; count--)
  8. {
  9. switch (count)
  10. {
  11. case 1 : map[i][j++] = MyByte.Bits.Bit1; break;
  12. case 2 : map[i][j++] = MyByte.Bits.Bit2; break;
  13. case 3 : map[i][j++] = MyByte.Bits.Bit3; break;
  14. case 4 : map[i][j++] = MyByte.Bits.Bit4; break;
  15. case 5 : map[i][j++] = MyByte.Bits.Bit5; break;
  16. case 6 : map[i][j++] = MyByte.Bits.Bit6; break;
  17. case 7 : map[i][j++] = MyByte.Bits.Bit7; break;
  18. case 8 : map[i][j++] = MyByte.Bits.Bit8; break;
  19. }
  20. if (j == width)
  21. {
  22. for (int countByte = 0; countByte < offsetByte; countByte++)
  23. {
  24. c = fgetc(bmp);
  25. }
  26. break;
  27. }
  28. }
  29. j--;
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement