Commit Graph

122 Commits

Author SHA1 Message Date
Guus Sliepen 39ca89d91c Initialise all members of the Graphics class.
Found by cppcheck.
2011-08-24 23:49:59 +02:00
Guus Sliepen 73c92917e2 Slightly increase intro text scrolling speed.
Scrolling 1/4 pixel per frame results in jerky motion, mostly because 4
times 16 2/3 milliseconds is not a round number. Scrolling 1/3 pixel per
frame results in much smoother scrolling.
2011-08-24 23:32:00 +02:00
Guus Sliepen 5be6a5ec7d Randomize explosion thinktime.
This gives engine trails and explosions a more natural look.
2011-08-24 23:08:48 +02:00
Guus Sliepen 9e32c230be Use float functions on float variables. 2011-08-24 22:43:54 +02:00
Guus Sliepen c14a9e7956 Remove a busy loop when showing an error message. 2011-08-24 22:32:30 +02:00
Guus Sliepen 1f7db8a9d8 Remove code that was commented out. 2011-08-24 22:31:11 +02:00
Guus Sliepen 93e6c1064c Remove unused parameters. 2011-08-24 22:22:26 +02:00
Guus Sliepen d87a0fcc31 Make sure SetVideoMode() calls are same as in init.cpp. 2011-08-24 21:40:30 +02:00
Guus Sliepen 212b03fa68 Use SDL_DOUBLEBUF in all SDL_SetVideoMode() calls, and don't force 16 bits.
By forcing 16 bits for full screen mode, performs drops dramatically on
displays where SDL has to do conversion.
2011-08-24 20:34:26 +02:00
Guus Sliepen f46bbcef69 Remove more busyloops. 2011-08-24 20:10:21 +02:00
Guus Sliepen bb9ba4da28 Remove unused FPS display code. 2011-08-24 20:04:15 +02:00
Guus Sliepen fc9dac5195 Strict 60 Hz update rate without busyloops. 2011-08-24 20:02:35 +02:00
Guus Sliepen 0f278a2748 Enable double buffering.
This seems to improve performance (probably because this prevents the
need to lock the screen surface), and might get rid of tearing.
2011-08-24 20:01:40 +02:00
Guus Sliepen 943a4c7bf3 Simplify printing time taken for missions.
This removes a lot of lines while at the same time preventing printing a string
onto itself, which is a bug. Problem was found by cppcheck.
2011-08-24 16:01:36 +02:00
Guus Sliepen b9fded8131 Use delete[] after new array[].
Found by cppcheck.
2011-08-24 14:46:34 +02:00
Guus Sliepen f2c91cbb19 Remove unnecessary dereferencing after pointer increments. 2011-08-24 14:44:40 +02:00
Guus Sliepen 0910cd3db6 Add const to all char * function parameters. 2011-08-24 14:42:59 +02:00
Guus Sliepen 87730b0687 No need to typedef structs in C++. 2011-08-24 14:32:45 +02:00
Guus Sliepen 91bdcd8f37 SDL header files should be #included in angled brackets. 2011-08-24 14:28:39 +02:00
Guus Sliepen 5bf8d0f269 Apply patch from Debian fixing a potential SIGFPE. 2011-08-24 14:23:29 +02:00
Guus Sliepen 62d503d002 Apply patch from Debian fixing several overflows. 2011-08-24 14:23:02 +02:00
Guus Sliepen 09b007411c Import of version 1.1 minus music, sound and graphics. 2011-08-24 14:14:44 +02:00