eggfault/thunderbird — pull request #1 by ad510 (2012-04-29 03:18:12+00:00)
Title: replace tabs with spaces and use QTime instead of clock()

Here are my changes in this pull request:

1st commit: I replaced each tab in the code file with 4 spaces because not all text editors make a tab equal to 4 spaces. (I agree Visual Studio's behavior in this respect is annoying.)

2nd commit: I changed Bakoom to use QTime instead of clock() because I've found QTime to be much more accurate (on Unix at least). I adjusted clockFactor to be equivalent to clock() on Unix, but since you apparently tested this mostly on Windows you may want to adjust this further. (You can cout the QTime.elapsed() and clock() times on each frame and use the formula I indicated in a code comment to get an accurate value for clockFactor.) In the future, it might be a good idea to use a frame counter variable instead of a clock for events that affect gameplay so that lag and/or pausing don't affect gameplay.

Please review my changes, and if you like them then click the "Merge pull request" button to incorporate them into your repository.