Commit Graph

10 Commits

Author SHA1 Message Date
Guus Sliepen 1d25dd0379 Fix status display of plasma output boosters during game. 2011-09-17 11:24:56 +02:00
Guus Sliepen 96996ce167 Redo the whole plasma system.
- We now have both minPlasma* and maxPlasma* variables.
- *PlasmaRate now goes from 1 to 5 just like Damage and Output.
- Internally, plasma now goes into the primary weapon, there is no
  temporary weapon anymore.
- When upgrading the primary weapon, the new minimum amount of Damage,
  Output and Rate immediately goes into effect when starting the next
  msision.
- Super Charge now works exactly the same again as in the original.
- But shows blinkenlights in the bottom status bar when it is in use.
2011-09-11 21:57:57 +02:00
Guus Sliepen 4e1316054a Don't display target arrow if engine.targetIndex is invalid. 2011-08-29 13:08:55 +02:00
Guus Sliepen d7d6dc37bc Flatten Graphics object.
All functions and variables are now defined in graphics.cpp.
Before, the functions would be compiled again and again for every source
file, now it is compiled only once, halving the size of the stripped
starfighter binary.
2011-08-26 23:53:46 +02:00
Guus Sliepen 878e559b6a Flatten objects which only contain static functions.
There is no reason to have objects which contain only static functions
and no variables. These functions have been moved to the global
namespace and are now defined in .cpp files. The math functions are very
small and have been put in math.h and made static inline.
2011-08-26 23:27:16 +02:00
Guus Sliepen 6ea4744832 Bring sanity to the header files.
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.
2011-08-26 21:29:04 +02:00
Guus Sliepen 70d0b13ea2 Use textSurfaces instead of calling drawString() in doInfo().
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().
2011-08-25 14:00:27 +02:00
Guus Sliepen 0910cd3db6 Add const to all char * function parameters. 2011-08-24 14:42:59 +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