@Override
	public void paint(Graphics g)
	{
		for (int x = 0; x < getWidth(); x += size) // 160 = width, height aka 10 tiles
		{
			for (int y = 0; y < getHeight(); y += size)
			{
				int lX = x / size;
				int lY = y / size;
				
				int absX = view.x() + lX;
				int absY = view.y() - lY;
				int drawX = (int)(x * Math.cos(angle) - y * Math.sin(angle));
				int drawY = (int)(x * Math.sin(angle) + y * Math.cos(angle));
				
				renderTile(g, drawX, drawY, lX, lY, absX, absY, plane);
				//g.setColor(Color.ORANGE);
				//g.drawString(lX + "," + lY, drawX, drawY);
				//g.setColor(new Color(0 + lY + (lX / 2), 0 + lX, 0 + lY));
			}
		}
		
		if (drawDebug)
		{
			g.setColor(Color.YELLOW);
			int y = 15;
			int usage = (int) ((runtime.totalMemory() - runtime.freeMemory()) / 1024L);
			g.drawString("Top left: " + view + ", plane: " + plane, 5, y);
			g.drawString("Center: " + center, 5, y += 15);
			g.drawString("Angle: " + angle + ", size: " + size + ", brightness: " + modifyBrightness + ", drawTextures: " + drawTextures + ", renderBridgeMode: " + renderBridgeMode, 5, y += 15);
			g.drawString("Memory: " + usage + "k (" + (usage / 1024L) + "MB)", 5, y += 15);
			g.drawString("Mouse: " + mouse, 5, y += 15);
		}
		
		if (mouse != null && drawInfo)
		{
			g.setColor(Color.WHITE);
			int y = getHeight() + 10;
			GameTile tile = GameWorld.tile(new Position(view.x() + mouse.x(), view.y() - mouse.y(), plane));

			if (tile.underlayID() > 0)
			{
				g.drawString("Underlay: " + Floor.cache[tile.underlayID() - 1], 5, y -= 15);
			}
			
			if (tile.overlayID() > 0)
			{
				g.drawString("Overlay: " + Floor.cache[tile.overlayID() - 1], 5, y -= 15);
			}
			
			g.drawString(tile + "", 5, y -= 15);
		}
	}