sonic: replace some float by integers to improve platform independance