Commit Graph

94 Commits

Author SHA1 Message Date
onpon4 73af622c54 Started getting rid of magic numbers on the intermission screen. 2016-01-04 22:25:00 -05:00
onpon4 5acc9f37f3 Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
onpon4 0da184f424 Moved the ship image definitions to C code.
Now, this has an unfortunate effect of screwing up cutscenes. I'll
fix that by moving cutscene definitions to C as well.
2016-01-04 16:34:29 -05:00
onpon4 c07f5678aa Fixed a memory leak, more cleanup.
Forgot to free the face surfaces. Whoops!
2016-01-04 12:41:19 -05:00
onpon4 aad7b550a9 Renamed "FACE_" enum values to "FS_". 2016-01-04 09:07:30 -05:00
onpon4 ab53fac4a8 Moved face sprites to their own array.
Man, that was really difficult. Every time something wrong happened,
segfault. Ugh... Anyway, that's done.
2016-01-04 09:01:54 -05:00
onpon4 697a302fc6 Some cleanup I forgot to do in gfx.cpp. 2016-01-03 22:39:16 -05:00
onpon4 e4633652f9 Fixed the compile option names.
Whoops, "SCREEN_H" is the definition screen.h checks.
2016-01-03 21:36:34 -05:00
onpon4 4f02865256 Added SCREEN_W and SCREEN_H definitions.
These are just there so that you can define these at compile time
without modifying the source code. In the future, I would like this
to only be the *default* screen width and height, because I'll want
to add an option in the menu to change the resolution from 640x480
up to whatever your monitor's resolution is.
2016-01-03 20:44:26 -05:00
onpon4 56240606e9 Changed all the magic number ship indexes to named ship indexes.
Also, now that the magic numbers are gone, I was able to get rid of
all the hardsetting of numbers for the special ship indexes (which
was only in place to avoid breaking the magic numbers).
2016-01-03 16:20:22 -05:00
onpon4 e5e7d6b9c4 Some cleanup. 2016-01-03 14:31:39 -05:00
onpon4 d911426c06 More cleanup. 2016-01-02 17:37:19 -05:00
onpon4 ce94477b70 More cleanup. 2016-01-02 16:59:48 -05:00
onpon4 651a7f55fb Did some more cleanup, removing more "shape" magic numbers. 2015-12-31 10:47:27 -05:00
onpon4 9a211d773c More reorganization. 2015-06-20 11:59:09 -04:00
onpon4 c6735cd88b More cleanup 2015-05-28 06:51:45 -04:00
onpon4 533d74447f Made auto-pausing an option. 2015-05-21 18:49:04 -04:00
onpon4 60968c7b0e Some more touch-ups. 2015-04-26 07:37:30 -04:00
onpon4 47fb2dc82a One more flag that has to be long 2015-03-31 13:15:08 -04:00
onpon4 e0809c02b0 Fixed a potential compatibility problem.
The plain int type is only guaranteed to be at least 16 bits, and
yet the flags variable was expecting at least 22 bits. This turns
out to be true for x86 and x86-64 systems, but to ensure compatibility,
the variable has been changed to an unsigned long int. Also added
the "L" suffix to flags that were more than 16 bits.
2015-03-31 13:02:09 -04:00
onpon4 5019244da1 Added an enum for missions/areas.
Eliminating another set of magic numbers, and God, that was tedious.
2015-03-29 13:11:12 -04:00
onpon4 576d254e4a Replaced rrand function with RANDRANGE macro. 2015-03-29 10:19:53 -04:00
onpon4 e105d6a1cc Added a new "original" difficulty.
This difficulty is meant to imitate the original Project: Starfighter
as closely as possible, for purists.
2015-03-28 09:51:49 -04:00
onpon4 1567595def Changed all the various unnecessarily specifically defined types to "int".
Most of these were defining various integers as char types, probably
in the naive belief that this is necessarily good because it uses less
RAM. There were also several unnecessary unsigned ints, though.
These have all been changed to just "int", so the compiler can decide
exactly what type to use.
2015-03-24 18:51:12 -04:00
onpon4 ad8a2f2ad9 Replaced various "limit" functions with LIMIT and LIMIT_ADD macros.
This is mainly because the old "limit" functions were all restricted
to certain types, which is incredibly silly given how simple they are.
Macros are much simpler, and a warning gets raised if they're used
improperly with multiple types, anyway.

In the process, I also found and fixed a bug: it seems the original
author intended for escaping enemies to gradually accelerate to
fleeing speed, but the low value was indicated as the max value, and
the way limitFloat was written, that caused the max value to be used
(it was supposed to reduce the speed to a minimum of -15, but it
instead effectively assigned the speed to -15). It might be a good
idea to re-implement the old buggy behavior intentionally; depends
on whether the acceleration of jumping looks better or worse than
just immediately going to jump speed.
2015-03-17 19:00:13 -04:00
onpon4 05c370feb4 Capitalized "max" and "min" macros. 2015-03-17 16:54:00 -04:00
onpon4 ce5df0013d Some tweaks.
Mostly to the charge cannon, but also to Kline.
2015-03-08 22:01:37 -04:00
onpon4 31a8383f90 Changed the way Kline works.
Kline previously had a maximum of 500 or 750 health, and uses some
hacks to cause it to flee just as it was destroyed, and to advance
to new stages in the final battle.

I've replaced this with a much larger amount of health, and progression
being based on how much health he has.

Also some other stuff.
2015-03-08 20:59:33 -04:00
onpon4 28cc1fcc6d Updated audio module. 2015-03-08 10:38:58 -04:00
onpon4 a3efbc06cc Substantially increased the cost of plasma upgrades.
I feel these were extremely underpriced. $1000 for triple bullets?
That's dirt-cheap! Even in hard mode, I have no trouble getting that.
2015-03-07 09:42:24 -05:00
onpon4 09e1f1f72e Some adjustments to weapons.
* Modified the upgrade limits, to both be uniform and allow upgrades for
  every factor. (In fact, each one can be upgraded exactly once now.)
* Gave triple-spread weapon double damage.
* Micro rocket damage down from 7 to 6. Total damage is now equal to
  double rockets.
2015-03-06 16:25:12 -05:00
onpon4 dad8a41114 Improved shop code. 2015-03-06 15:22:10 -05:00
onpon4 aa187ef5f7 Prevent inclusion of headers multiple times, on an individual level.
Previously, Starfighter depended on a single check in Starfighter.h
to prevent this. Now, the proper code is in all header files.
2015-03-04 09:11:04 -05:00
onpon4 cc6989328d Fixed the ammo limit of double missiles. 2015-03-03 09:25:32 -05:00
onpon4 1f2ef8ac50 Dedicated autosave slot + much improved menu code.
I found it kind of odd to be able to manually save to the autosave
slot, *and* have no reliable way to even know what the autosave
slot is. I noticed that it's an actual problem when my brothers
played Starfighter; one of them used an autosave slot, and the
other unwittingly ended up erasing the first one's save because of
this. To fix this, I have replaced the behavior of allowing the
player to define a slot as autosave, with a dedicated autosave
slot.

While I was there, I had no choice but to vastly improve on this
game's *atrocious* menu system. Granted, I didn't do much more
than replace the magic numbers with enums, but it makes the code
much more clear and more easy to edit.
2015-03-02 23:32:48 -05:00
onpon4 9959c47f98 Updated copyright notices on all files based on git-blame. 2015-03-01 15:37:32 -05:00
onpon4 23d95f99b6 Fixed a problem. 2015-03-01 04:48:47 -05:00
onpon4 23a92bb594 Define compile-time options in defs.h, unless already defined. 2015-03-01 04:30:11 -05:00
onpon4 e6c59d2a24 Some cleanup, bumped version number. 2015-02-27 14:53:23 -05:00
onpon4 8e753d9525 Added code to center the camera when not moving. 2015-02-27 00:26:29 -05:00
onpon4 02c93d8b52 Added a separate constant for each view border direction. 2015-02-26 23:28:31 -05:00
onpon4 182ea70ba1 Removed gameplay option, have different max shield based on difficulty 2015-02-26 20:52:20 -05:00
onpon4 f385c9448e Upgraded to GPLv3. 2015-02-26 11:20:36 -05:00
Guus Sliepen bd4a449e10 Rename code/ to src/. 2013-07-11 14:24:37 +02:00