public Point[] getAll(Texture tx) {
        //how much to increment the array by each time.
        final int increment = 20;
        //make array size 0
        Point[] result = new Point[0];
        Point[] temp;
        int row = 0;
        int col = 0;
        byte lightCount = 0;
        
        //while iteration is incomplete
        while (col < cols && row < rows) {
            
            //if out of space, resize the array
            if (lightCount == result.length) {
                temp = new Point[result.length + increment];
                for (int i = 0; i < temp.length; i++) {
                    if (i < result.length) {
                        temp[i] = result[i];
                    }
                }
                result = temp;
            }
            
            //Advance through the array
            row++;
            if (row >= rows) {
                row = 0;
                col++;
            }
            
            //add to array if matching
            if (getCell(col, row) == tx) {
                result[lightCount] = new Point(col * CELL_SIZE, 
                                               row * CELL_SIZE);
                lightCount++;
            }
        
        }
        
        //crop array to minimum size
        temp = result;
        result = new Point[lightCount];
        for (int i = 0; i < lightCount; i++) {
            result[i] = temp[i];
        }
        
        //return result
        return result;
    }