tyridge77

Untitled

Feb 19th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1.  int[] colorarray = new int[(ScreenWidth*ScreenHeight)];
  2.  
  3.  
  4.  for(int x = 0;x<ScreenWidth;x+=PixelSize)      // Initialize our pixel base
  5.  {
  6.   for(int y = 0;y<ScreenHeight;y+=PixelSize)
  7.   {
  8.    
  9.       // bs.show();
  10.     Point pixelpoint = new Point(x,y); // The point this pixel is at
  11.     int ThisColor = 0;
  12.    
  13.    
  14.    
  15.     // LIGHTING
  16.    
  17.     Integer pixelcolor = pixelbase.get(pixelpoint); // Get the default color for this object
  18.  
  19.    
  20.     colorarray[ScreenWidth*y+x]=ThisColor;
  21.  
  22.        
  23.    }
  24.  
  25.   }
  26.  
  27.   canvas.setRGB(0,0,ScreenWidth,ScreenHeight,colorarray,0,0);
  28.  
  29.   g.drawImage(canvas,0,0,ScreenWidth,ScreenHeight,null);
Advertisement
Add Comment
Please, Sign In to add comment