Direct-inelastic and trapping-desorption scattering of N2 and CH4 from Pt(111)