Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int[] colorarray = new int[(ScreenWidth*ScreenHeight)];
- for(int x = 0;x<ScreenWidth;x+=PixelSize) // Initialize our pixel base
- {
- for(int y = 0;y<ScreenHeight;y+=PixelSize)
- {
- // bs.show();
- Point pixelpoint = new Point(x,y); // The point this pixel is at
- int ThisColor = 0;
- // LIGHTING
- Integer pixelcolor = pixelbase.get(pixelpoint); // Get the default color for this object
- colorarray[ScreenWidth*y+x]=ThisColor;
- }
- }
- canvas.setRGB(0,0,ScreenWidth,ScreenHeight,colorarray,0,0);
- g.drawImage(canvas,0,0,ScreenWidth,ScreenHeight,null);
Advertisement
Add Comment
Please, Sign In to add comment