Commit Graph

15 Commits

Author SHA1 Message Date
onpon4 38f44d9387 Removed several unnecessary (int)s and changed around operations to prevent problems with integer division.
Signed-off-by: onpon4 <onpon4@yahoo.com>
2012-03-14 11:54:48 -04:00
Julian 0d189c858c Replaces many hard-coded numbers with references to screen->w and screen->h and adds the constants screenWidth, screenHeight, and viewBorder. This is a step towards supporting multiple resolutions. 2012-03-11 23:16:56 -04:00
Guus Sliepen 8e4d5ccfd6 Make audio 48 kHz stereo, pan sound effects. 2012-03-02 23:00:35 +01: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 f8c4a72170 Display "PAUSED" when paused. 2011-09-05 11:40:35 +02:00
Guus Sliepen 744f1977e1 Reset charge cannon charge and laser heat after each mission.
This prevents these variables from turning into a huge amount of missiles when
buying a missile launcher in the shop.

This fixes Debian bug #286933.
2011-08-29 09:10:50 +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 931d110692 Fix "random" behaviour of sound, music and fullscreen options.
The state of these options was not only stored in the global config
file, but also in each saved game. When loading a game or clicking on
"continue game" from the title screen, the state of these options would
also be loaded from the save game file. If this changed the state of
sound and music, this would only take effect when starting a mission or
going back to the title screen. If it changed the state of the
fullscreen option, it would never toggle the state, but would
desynchronise the actual state of the window and the fullscreen option.

This is now fixed by moving these options from the currentGame variable
to the engine variable, where they are not in danger of being
overwritten.
2011-08-26 22:48:52 +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 277d34dabd Turn signed chars into bools where appropriate. 2011-08-26 16:14:58 +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 09b007411c Import of version 1.1 minus music, sound and graphics. 2011-08-24 14:14:44 +02:00