private boolean paintTile(final Graphics gr, final int n, final int x, final int y)
    {
        final int ypos = yoff + tileLocator.getTileScreenY(x, y);

        if(ypos > clip.y - 64 &&
           ypos < clip.y + clip.height + 100)
        {
            final int xpos = xoff + tileLocator.getTileScreenX(x, y);

            if(xpos > clip.x - 100 &&
               xpos < clip.x + clip.width + 100)
            {
                final int tileNo = map.get(n, x, y);
                if(tileNo > 0) {
                    tilePainter.paint(gr, n, x, y,
                                      xpos + map.getXoff(n, x, y),
                                      ypos + map.getYoff(n, x, y),
                                      tileNo);

                    return true;
                }

                if(showScripts) {
                    String script = map.getScript(x, y);
                    if(script.length() > 0) {
                        gr.setColor(Color.PINK);
                        gr.drawString(script.substring(0, Math.min(script.length(), 5)),
                                      xpos+4, ypos+20);
                        // System.err.println(script);
                    }
                }
            }
        }

        return false;
    }