Commit Graph

22 Commits

Author SHA1 Message Date
Guus Sliepen 577259845d Fix difficulty menu overwriting text from load menu. 2012-12-09 16:56:37 +01:00
Guus Sliepen a7493773c4 Fix cursor wrapping in the menus. 2012-12-09 16:18:30 +01:00
Guus Sliepen b343805257 Prepare menu and save files for configurable difficulty and gameplay mode. 2012-12-09 16:11:55 +01:00
onpon4 aae191ff0c I missed a couple (int)s in last commit. This removes them.
Signed-off-by: onpon4 <onpon4@yahoo.com>
2012-03-14 12:02:04 -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 78459e9fdb Update copyright notices, bump version to 1.2. 2012-02-26 22:25:57 +01:00
Guus Sliepen 4779481f30 Smoother appearance of aliens on left hand side of title screen. 2011-08-29 17:28:06 +02:00
Guus Sliepen 81905236cc Fix two spelling errors. 2011-08-28 12:28:05 +02:00
Guus Sliepen d6c17d176f Don't use .bmp and .gif anymore, use .png for all lossless graphics. 2011-08-27 16:18:29 +02:00
Guus Sliepen c13267d63d Use whole screen for credits, and allow arrow keys to be used. 2011-08-27 00:29:23 +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 8b34e90bcf More bools. 2011-08-26 16:55:46 +02:00
Guus Sliepen 277d34dabd Turn signed chars into bools where appropriate. 2011-08-26 16:14:58 +02:00
Guus Sliepen 48e8e12b07 Remove 1 second delays. 2011-08-26 14:41:34 +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 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 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