// A twelve-block funnel, one block open at the bottom, draining 400 grains of sand. const fx = Math.floor((SX - 150) / BS), fy = Math.floor((SY - 36) / BS); const cx = (fx + 12) * BS + 2, floor = (fy + 25) * BS; for (let y = fy * BS - 45; y < floor + 8; y++) for (let x = fx * BS - 20; x < (fx + 25) * BS + 20; x++) { const i = y * W + x; bgm[i] = 0; setCell(i, y >= floor ? STONE : EMPTY, 20, y >= floor ? F_NAT : 0); } for (let x = fx * BS - 20; x < (fx + 25) * BS + 20; x++) surfY[x] = floor; for (let k = 0; k < 12; k++) { placeBlock(BP_SLOPE_BL, RBRICK, fx + k, fy + k, true); placeBlock(BP_SLOPE_BR, RBRICK, fx + 24 - k, fy + k, true); } for (let y = fy * BS - 28; y < fy * BS - 18; y++) for (let x = cx - 20; x < cx + 20; x++) setCell(y * W + x, SAND, 20, 0); updateRoof(); window.CAM = [cx, fy * BS + 25];