void setPendingViewOffset (int xofs, int yofs) {
        if (!pf_wrapx) {
            if (xofs < 0) xofs = 0;
            if (xofs > tilex * (nrtilesx - viewnrtilesx))
                xofs = tilex * (nrtilesx - viewnrtilesx);
        }
        if (!pf_wrapy) {
            if (yofs < 0) yofs = 0;
            if (yofs > tiley * (nrtilesy - viewnrtilesy))
                yofs = tiley * (nrtilesy - viewnrtilesy);
        }
        pendingxofs = xofs;
        pendingyofs = yofs;
        // update parallax level 0
        if (bg_images.size() >= 1) {
            BGImage bgimg = (BGImage) bg_images.elementAt(0);
            if (bgimg != null) {
                bgimg.xofs = xofs;
                bgimg.yofs = yofs;
            }
        }
    }