Most .h files were not used to declare the externally visible variables
and functions of the .cpp files, but only to #include things and declare
things that were needed by that .cpp file itself. This resulted in a lot
of duplication.
Now the .h files only declare what is externally visible from the
corresponding .cpp files. Starfighter.h includes all the other .h files,
and all .cpp files only #include "Starfighter.h". Functions and
variables that were not used outside the .cpp file that contained them
were marked static. Variables defined in .h files were moved to the
appropriate .cpp files.
This fixes a bug where one could get more than half the item price back. In
particularly, a level 2 Plasma Cooling Booster would sell for more than you
bought it for.
This fixes Debian bug #253380.
During the game, a lot of images were blitted outside the visible area. Also,
addBuffer() was called even when the destination surface was not the screen,
resulting in unnecessary blits in unBuffer().
This increases efficiency significantly. Before, callgrind estimated that 58%
of the CPU time was spent in doInfo(), taking roughly 1.6 kcycles on average
per call. After, only 0.13 kcycles on average per call are used (12x speedup),
and only 14% of the CPU time is spent in doInfo().
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.