A combinatorial approach to scattering diagrams