atm959

renderPointerEditor

Jul 25th, 2019
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.92 KB | None | 0 0
  1. void renderPointerEditor(){
  2.     int k = 0;
  3.  
  4.     for(int x = 0; x < 64; x++){
  5.         for(int y = 0; y < 64; y++){
  6.             tempVidBuffer[((y + winY + 1) * VIDEO_WIDTH) + (x + winX + 1)] = (((x / 2) + (y / 2)) % 2) ? 0x0F : 0x17;
  7.         }
  8.     }
  9.  
  10.     for(int x = 0; x < 8; x++){
  11.         for(int y = 0; y < 8; y++){
  12.             char pixel = pointerImage[(y * 8) + x];
  13.             if(pixel != 0x00){
  14.                 for(int i = 0; i < 8; i++){
  15.                     for(int j = 0; j < 8; j++){
  16.                         tempVidBuffer[(((j + (y * 8)) + winY + 1) * VIDEO_WIDTH) + ((i + (x * 8)) + winX + 1)] = pixel - 1; //Draw the large mouse pointer
  17.                     }
  18.                 }
  19.             }
  20.         }
  21.     }
  22.  
  23.     k = 0;
  24.     for(int x = 0; x < 8; x++){
  25.         for(int y = 0; y < 64; y++){
  26.             tempVidBuffer[((y + winY + 1) * VIDEO_WIDTH) + ((x * 8) + winX + 1)] = (k % 2) ? 0x00 : 0x0F;
  27.             k++;
  28.         }
  29.     }
  30.     k = 0;
  31.     for(int x = 0; x < 64; x++){
  32.         for(int y = 0; y < 8; y++){
  33.             tempVidBuffer[(((y * 8) + winY + 1) * VIDEO_WIDTH) + (x + winX + 1)] = (k % 2) ? 0x00 : 0x0F;
  34.         }
  35.         k++;
  36.     }
  37.  
  38.     k = 0;
  39.     for(int y = 0; y < 16; y++){
  40.         for(int x = 0; x < 16; x++){
  41.             for(int i = 0; i < 8; i++){
  42.                 for(int j = 0; j < 8; j++){
  43.                     tempVidBuffer[(((y * 8) + winY + 1 + j) * VIDEO_WIDTH) + ((x * 8) + winX + 64 + 2 + i)] = k - 1;
  44.                 }
  45.             }
  46.             k++;
  47.         }
  48.     }
  49.  
  50.     for(int x = 0; x < 8; x++){
  51.         for(int y = 0; y < 8; y++){
  52.             tempVidBuffer[((y + winY + 1) * VIDEO_WIDTH) + (x + winX + 64 + 2)] = (((x / 2) + (y / 2)) % 2) ? 0x0F : 0x17;
  53.         }
  54.     }
  55.  
  56.     for(int x = 0; x < (128 + 64 + 2); x++){
  57.         tempVidBuffer[(winY * VIDEO_WIDTH) + (winX + x)] = 0x00;
  58.         tempVidBuffer[((winY + 128 + 1) * VIDEO_WIDTH) + (winX + x)] = 0x00;
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment