David Adam : d3dx8: Simplify some functions.