Linear spin-zero quantum fields in external gravitational and scalar fields