private short[][] createNewSelection(int nx, int ny)
    {
        int cx = nx - asx, cy = ny - asy;
        short[][] newsel = new short[getTilesWide()][getTilesHigh()];

        for (int x = 0; x < getTilesWide(); x++)
            for (int y = 0; y < getTilesHigh(); y++)
                newsel[x][y] = -1;
        for (int x = 0; x < getTilesWide(); x++)
            for (int y = 0; y < getTilesHigh(); y++)
                if (x + cx >= 0 && x + cx < getTilesWide() && y + cy >= 0
                    && y + cy < getTilesHigh())
                    newsel[x + cx][y + cy] = selection[x][y];
        return newsel;
    }