In many places strings were initialised with strcpy(string, "") right
before the string was overwritten by another function. In the few cases
where this really might have been useful, just use a static initialiser.
The code always tries to overwrite some data files when not using a .pak
file. This is only useful for upstream development. Put #ifdefs around
this code.
- 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.
Put the maximum amount of rockets that can be caried in the description, and
also adjust the amount of rocket pods one has when buying a secondary weapon.
The laser and charge beam will remove all rocket capacity. To soften the blow,
you get at least capacity for 5 rockets when buying homing missile systems,
or 10 when buying normal missile system.
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.
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.
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.