private void makeRoom(LayeredMap lmap,
                          int x, int y, int w, int h,
                          boolean withFeatures)
    {
        for(int j=y; j<y+h; j++) {
            for(int i=x; i<x+w; i++) {
                
                if(getRandomFromInterval(0, 100) < damagedFloorChance) {
                    // Hajo: damaged floor
                    lmap.set(0, i, j, standardGrounds[Randomlib.linearRange(0, standardGrounds.length-1)]);
                } else {
                    // Hajo: proper floor
                    lmap.set(0, i, j, roomFloors[Randomlib.linearRange(0, roomFloors.length-1)]);
                }

                lmap.set(1, i, j, 0);
            }
        }

        if(withFeatures) {
            int xpos = x + w/2;
            int ypos = y + h/2;

            if(getRandomFromInterval(0, 100) < roomFeatureChance) {
                int feature = roomFeatures[Randomlib.linearRange(0, roomFeatures.length-1)];
                lmap.set(1, xpos, ypos, feature);
            }

        }

        /*
        if(withTemplate && rooms.size() > 0) 
        {
            final int n = rand.nextInt(rooms.size());
            final LayeredMap structure = (LayeredMap)rooms.get(n);
            final int xpos = x + w/2 - structure.getWidth()/2;
            final int ypos = y + h/2 - structure.getHeight()/2;

            lmap.insert(structure, xpos, ypos);
        }
         */
    }