public void drawFov ( Graphic g , int x , int y , int gridH , int gridV , Surface surface ) { final int h = x + ( int ) Math . floor ( ( getX ( ) + getViewX ( ) ) / gridH ) ; final int v = y + ( int ) - Math . floor ( ( getY ( ) + getHeight ( ) ) / gridV ) ; final int tileWidth = getWidth ( ) / gridH ; final int tileHeight = getHeight ( ) / gridV ; g . drawRect ( h , v + surface . getHeight ( ) , tileWidth , tileHeight , false ) ; }
Draw the camera field of view according to a grid .