mickael9 / ioq3

This is an up-to-date fork of ioquake3 for UrbanTerror with changes from the ioUrbanTerror engine
GNU General Public License v2.0
42 stars 18 forks source link

Fixes for better Urban Terror compatibility #18

Closed danielepantaleone closed 6 years ago

danielepantaleone commented 6 years ago

This pull request fixes #16 and #17

danielepantaleone commented 6 years ago

Acually now that I think about this PR, I could have handled some more cases, so hold on 😉

danielepantaleone commented 6 years ago

Alright, it's good to go for me. I introduced a new function to format sizes: Q_SizeFormat. The output granularity is regulated according with the given input and the format factor: for T(era), G(iga) and M(ega) I used 2 decimal floating point precision, while for K(ilo) and default I used integer precision. Example output:

QSizeFormat(1548576, 1024) -> "1.47 M"
QSizeFormat(1048, 1024) -> "1 K"
QSizeFormat(100, 1024) -> "100 "
danielepantaleone commented 6 years ago

Added another commit to sort out issue #16