Commit Graph

365 Commits

Author SHA1 Message Date
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 8ebc96b97c Allow arrow keys to speed up/reverse the scrolling of the statistics. 2012-03-11 17:52:10 +01:00
Guus Sliepen 76a1507c1b Miscellaneous fixes. 2012-03-11 15:23:12 +01:00
Guus Sliepen b9d9158619 Add missing array with face names. 2012-03-11 15:22:38 +01:00
Guus Sliepen da50d090f5 Fix whitespace issues. 2012-03-11 15:21:38 +01:00
Guus Sliepen f5eaa991cf Remove arrays with strings from defs.h.
These are now put in the .cpp files where they are used.
2012-03-11 15:19:25 +01:00
Guus Sliepen a45df516df Remove useless string initialisation code.
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.
2012-03-11 15:16:19 +01:00
Guus Sliepen 7f58f02277 Fix compiler warning. 2012-03-11 15:11:15 +01:00
Guus Sliepen d93c0c9400 Don't call setAllyMessages() anymore. 2012-03-11 15:10:36 +01:00
Guus Sliepen 1b1170a183 Remove unused string copying code. 2012-03-11 14:09:04 +01:00
Guus Sliepen ad19fe2672 Replace message initialisation routines by static arrays. 2012-03-11 14:02:58 +01:00
Guus Sliepen 6467b72501 Let Sid say death messages when he is a wingmate. 2012-03-11 13:54:21 +01:00
Guus Sliepen 3460884167 Don't do interceptions at the very end of traveling between planets.
Right after arriving at the destination planet, the code would do one more
check for a possible interception.  The chance of this happening is small, but
if it happened, it would leave the game in an inconsistent state.  This might
have caused the game to immediately start a real mission, which would loop
indefinitely.
2012-03-11 13:12:12 +01:00
Guus Sliepen a1b3da48c1 Fix crash happening on 8 and 16 bit color displays.
Commit f51dbd0669 changed the way of generating
images of ships taking damage, and assumed that the SDL_Surfaces containing the
images were always 24 or 32 bpp. However, SDL will already have converted them
to the display format, so we need to properly handle 8 and 16 bpp as well.
2012-03-09 16:08:31 +01:00
Guus Sliepen 6987eebd3d Remove unused "missile2" sound. 2012-03-06 21:53:33 +01:00
Guus Sliepen db4cc78dab Add item pickup sound. 2012-03-06 21:48:22 +01:00
Guus Sliepen ebb5d197ac Add laser sound. 2012-03-06 21:04:54 +01:00
Guus Sliepen 2a3d03bea3 Remove messages about cleaning up resources when quitting. 2012-03-06 00:20:42 +01:00
Guus Sliepen dbf38ab5e4 Remove debug message accidentily left in the audio code. 2012-03-06 00:16:30 +01:00
Guus Sliepen bd87c8964f Better explosion sound.
Use an exponential function for the amplitude envelope of the noise function
instead of a linear on.
2012-03-06 00:09:11 +01:00
Guus Sliepen 4a7571f44c Expand "Drums" song. 2012-03-03 15:47:05 +01:00
Guus Sliepen b1d351cd77 Use freeverb instead of reverbsc, adjust music volume.
Freeverb seems more stable. The volume of the music was adjusted roughly
according to the output of vorbisgain.
2012-03-03 13:49:10 +01:00
Guus Sliepen b6f8daaec3 Remove .ogg version of explode3. 2012-03-03 11:56:07 +01:00
Guus Sliepen 14b08e6193 Add second debris explosion sound.
This one combines the filtered noise and the random spline approach,
creating a more complex explosion sound.
2012-03-03 11:47:01 +01:00
Guus Sliepen 3ddba1af85 Add debris explosion sound.
This is one of the two sounds played when debris from a large object (like an
asteroid or boss) explodes. This one uses a random spline function instead of
filtered noise
2012-03-03 11:35:46 +01:00
Guus Sliepen 2fe877c3e8 Add impact explosion sound.
This is the sound played when shots hit an enemy, but do not yet destroy it.
It's a small explosion sound combined with a metallic sound, simulating the
impact of the shot on the enemy's hull.
2012-03-03 11:27:22 +01:00
Guus Sliepen 209d785a23 Add synthesized explosion sound. 2012-03-03 10:50:49 +01:00
Guus Sliepen 8e4d5ccfd6 Make audio 48 kHz stereo, pan sound effects. 2012-03-02 23:00:35 +01:00
Guus Sliepen 46fd85829b Add README files explaining how to create sound and music. 2012-03-02 21:20:06 +01:00
Guus Sliepen fd0aaa576a Improved "Drums" music.
- Removed beat accents.
- Gradually add more voices.
- Avoid flat notes in drum map.
- Use better program for chords.
2012-03-02 21:03:35 +01:00
Guus Sliepen 3be6a63fd8 Start of new music using ABC and Csound.
Two basic, unfinished songs, written in ABC notation are added. The Makefile
will convert the .abc files to MIDI files, which are rendered using Csound. At
the moment, Csound is set up to use the Fluidsynth engine to render sound using
soundfonts, and the reverbsc opcode is used to add a reverb effect.

ABC notation is much easier to write music in than using "raw" Csound score
notation. Also, the abcm2ps utility can create very nice sheet music from ABC
files.
2012-03-01 00:07:13 +01:00
Guus Sliepen c72fa54344 Replace plasma sound effect with one generated using Csound.
This is the first sound effect which is generated from scratch
using Csound. The advantages of this are:

- Real source code for sound.
- Anyone with a text editor can tweak the sound effects.
- Source code is much more compact that the sound file itself.
- Sound files can be regenerated with arbitrary quality.
2012-02-29 22:13:26 +01:00
Guus Sliepen 7bc36c16b2 Make the very first cutscene a little bit more interesting.
Before, all the ships were moving at exactly the same speed, making them appear
static on screen.  Now, Chris is moving slowly to the right, but the WEAPCO
fighters are changing velocity now and then, both horizontally and vertically,
never quite reaching Chris but increasing their attempts.
2012-02-29 14:49:12 +01:00
Guus Sliepen 3c9f8e2135 Do not allow player to switch destinations in flight.
When travelling between planets, while the progress bar was growing, it was
possible to click on planets, thereby changing the final destination planet.
2012-02-29 14:12:22 +01:00
Guus Sliepen f51dbd0669 Use a better way to create images of ships taking damage.
The old technique was to overlay a semi-transparent red rectangle over an
existing ship image, and then make 50% red pixels transparent. For some reason,
the transparency is not working correctly. Instead, don't overlay anything,
but set the red component of all non-black pixels to the maximum value.
2012-02-28 13:35:39 +01:00
Guus Sliepen 336a0798fa Don't overwrite static data files.
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.
2012-02-27 15:35:56 +01:00
Guus Sliepen 4c5eed148f chdir() to the data directory before loading data.
This is necessary for starfighter to find the data files if it is not
using a .pak file.
2012-02-27 15:33:58 +01:00
Guus Sliepen 78459e9fdb Update copyright notices, bump version to 1.2. 2012-02-26 22:25:57 +01:00
Guus Sliepen 66ce3f2b4e Make sure error messages are shown. 2012-02-26 22:23:34 +01:00
Guus Sliepen 230620a1f1 Do not complain about missing music files in the PAK file. 2012-02-26 22:22:27 +01:00
Guus Sliepen fdd63c14cc Don't play music in first Kline battle when music is disabled. 2011-09-18 00:54:44 +02:00
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 2c64485272 Toggle fullscreen mode with F11 or Alt+Enter. 2011-09-05 22:13:11 +02:00
Guus Sliepen 7a59631189 Simplify bullet code even more. 2011-09-05 21:55:23 +02:00
Guus Sliepen bde2d5c8cf Update credits.
- Explicitly mention all the authors and licenses used for the new graphics
  and sounds.
- Remove credits for the old music.
- Mention Valgrind and cppcheck under the Quality Assurance section.
- Add myself as additional programmer, Astrid as replacement graphics and sound
  finder.
2011-09-05 13:56:04 +02:00
Guus Sliepen 350aabfa23 Pause the game when the window loses input focus. 2011-09-05 11:41:03 +02:00
Guus Sliepen f8c4a72170 Display "PAUSED" when paused. 2011-09-05 11:40:35 +02:00
Guus Sliepen e7f5c3825b Simplify spread bullet code.
There were three flags, WF_STRAIGHT, WF_THIN_SPREAD and WF_WIDE_SPREAD,
when only one flag, WF_SPREAD suffices. This makes the code simpler and
gets rid of some duplication.
2011-09-04 18:24:54 +02:00
Guus Sliepen 45664437e1 Replace maledeath sound by one from OLPC. 2011-09-04 17:14:32 +02:00