Commit Graph

69 Commits

Author SHA1 Message Date
onpon4 682c233250 Several tweaks toward making the intermission adaptable to diff sizes. 2016-11-26 00:36:33 -05:00
onpon4 d336bb2c83 More cleanup. 2016-11-25 18:21:31 -05:00
onpon4 60ed5cbd65 More cleanup.
It looks like I'm finally almost done with this! The only thing left
is gradually replacing "Starfighter.h" imports with imports of what
actually is needed.
2016-11-25 18:01:36 -05:00
onpon4 1be0fd1164 Lots of cleanup done on how weapons are handled.
I did one structural change to the way ship_fireBullet works. It
previously had two separate places for reducing ammo from the player.
I changed this so that it removes ammo in the same place regardless
of which weapon it is, but then performs the plasma "out of ammo"
action afterwards. It seems to work properly.

Also fixed a flaw in the saving which would in some cases cause
the stationed planet to not get saved properly.
2016-11-25 13:50:16 -05:00
onpon4 f9cefa99e3 Merged the "resources" module into the "gfx" module. 2016-11-25 12:50:32 -05:00
onpon4 de1cd7c674 Cleaned up the "missions" module, renamed to "mission". 2016-11-25 12:29:15 -05:00
onpon4 30b05b6b4e Replaced all bools with ints.
This is part of the conversion of Starfighter's code to C. C doesn't
have the bool type.
2016-11-19 11:43:50 -05:00
onpon4 063020df22 More cleanup. 2016-11-16 19:43:03 -05:00
onpon4 9dedf500c8 Adjusted the status screen.
Several pointless lines have been removed, and I've added a workaround
to fix a segfault that was happening when Phoebe or Ursula were not
wingmates yet.
2016-01-09 22:15:28 -05:00
onpon4 290d44386a Treat distance between planets as always 1 if no interception chance. 2016-01-09 10:40:29 -05:00
onpon4 8793aaa780 Added a small chance of getting intercepted in Spirit.
These interceptions only have "dualfighters" on them, since that is
in-line with the normal difficulty of Spirit.
2016-01-09 10:26:15 -05:00
onpon4 0fb3c04b5e Removed the instant teleportation in Spirit.
I understand where this came from; obviously, this was how travel
originally worked, and then the version that made interceptions
possible was added later. But the thing is, making Spirit a special
case causes the interface to suddenly change on you, and that breaks
the flow of the game for no particular reason other than saving a
bit of time. So this special code which causes you to instantly
teleport in Spirit has now been removed. There is still no danger
of encountering interceptions, but I'll be changing that for all
non-Classic difficulties as well in another commit.
2016-01-09 10:13:32 -05:00
onpon4 d5a66ffc01 Changed the text hint for Comms screen to "Missions".
This is more to-the-point. It should lower the learning curve a bit.
2016-01-09 10:06:16 -05:00
onpon4 336c047d8e Removed the unnecessary "INCOMPLETE" text from the Comms view. 2016-01-09 10:04:55 -05:00
onpon4 9104fcaa10 Changed the AI of the executive transport to "evasive".
This makes more sense; it's unarmed, after all. A quick test shows
that it doesn't cause any problems (like making the game annoying).
2016-01-09 07:37:36 -05:00
onpon4 9a474f1416 Some cleanup. 2016-01-08 22:57:06 -05:00
onpon4 ac844d8d54 Removed the "planets" data files.
This is the last of the data files I wanted to remove.

This commit also includes some dialog changes.

I copied some of this code into a comment elsewhere, because I want
to use it as a reference when creating a new save format.
2016-01-08 21:33:40 -05:00
onpon4 e557d9920a Removed the suggestion from the Comms screen that Phoebe's name is unknown.
I think this might partly be because of my dialog changes, but this
causes a minor continuity error, since the mission clearly states
that you're rescuing "Phoebe Lexx", and there's also the fact that
the indicator now says "Phoebe" instead of "Target". I figure just
make her name known from the start; the explanation can be that the
ship automatically transmits the name.
2016-01-08 10:37:19 -05:00
onpon4 e71e3b8a96 Moved the "brief" data files to C code. 2016-01-07 21:18:14 -05:00
onpon4 822ff849e4 Removed the very last of the image-related magic numbers (in source code).
The only magic numbers left now are related to positioning, image
sizing, and the remaining "data" files (the "planets" and "brief" ones).
At least, I'm pretty sure that's the case.
2016-01-06 20:35:37 -05:00
onpon4 6189a66866 Added CHANCE macro to replace difficult-to-read special rand() uses.
I found myself confused by the interception chances, because it looked
like the chance of interceptions was decreasing slowly over time.
Turns out, it was the denominator in a fraction; a "chance" of 300
meant that there was a 1 / 300 chance.
2016-01-05 06:59:37 -05:00
onpon4 97f1f441c2 Removed more magic numbers. 2016-01-05 06:44:26 -05:00
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 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 05323ed1fb Added code to handle different resolutions during missions.
This is capable of handling any resolution which is at least 640x360.
Actually, resolutions a bit smaller than that can be handled. No
manual adjustment is necessary. :)

Now, the intermission screen needs to be fixed...
2016-01-03 20:30:54 -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 1d02b3c71e More cleanup. 2015-11-20 14:11:12 -05:00
onpon4 17b5f60958 More cleanup. Also rewrote the method of frame delaying a bit.
I rewrote the method because what it was doing was so confusing, I
couldn't figure out whether it actually worked right or not. I think
it did, and it's only 2/3 of a milllisecond anyway (not noticeable
at all), but this new way of writing it is much clearer.
2015-11-06 21:35:07 -05:00
onpon4 7694d668ff More cleanup. 2015-11-06 19:43:34 -05:00
onpon4 4bdf871e66 drawString -> screen_renderString 2015-11-06 19:36:20 -05:00
onpon4 67d464433d Removed the second "drawString" function.
It wasn't very useful. All it did was offer the option to center
text and take away the option to wrap text. I've moved the text
centering option to gfx_renderString and replaced all uses of this
function with that function.
2015-11-06 10:12:57 -05:00
onpon4 7c67112a8b Some more cleanup. 2015-11-03 20:26:56 -05:00
onpon4 cce6d11510 More cleanup. 2015-11-02 17:53:05 -05:00
onpon4 9e6ff10c57 More cleanup. 2015-10-26 20:07:31 -04:00
onpon4 134a52e5f0 Some more cleanup. 2015-10-11 12:04:52 -04:00
onpon4 c68cb3f920 More cleanup. 2015-09-26 08:49:21 -04:00
onpon4 0f10c6d5c7 Converted the three "collision" functions to four differently-named ones.
The fourth is simply a duplicate of ship_collision for bullets. A
bit redundant, but I figure it's clearer of a definition. Besides,
this opens up the door to possibly making bullets a different struct
type in the future, if that turns out to be desirable.
2015-09-25 16:28:09 -04:00
onpon4 9a211d773c More reorganization. 2015-06-20 11:59:09 -04:00
onpon4 9be21cbd3a Made it possible to hit the Uranus boss via its wings.
The idea is clearly supposed to be breaking the boss in two and then
destroying the halves, so it makes no sense for the wings you break
off to also act as shields, which they did. Pretty much all this did
was cause a lot of shots to be wasted.
2015-06-02 12:43:06 -04:00
onpon4 c6735cd88b More cleanup 2015-05-28 06:51:45 -04:00
onpon4 f306825636 Removed the "nomove" and "nofire" cheats.
I honestly don't understand why these cheats were here. Preventing
enemies from moving breaks some missions and doesn't do anything
useful, and preventing enemies from firing is basically no better
than the invincibility cheat (and might even be worse, if it applies
to Sid; I didn't check).
2015-05-20 19:41:43 -04:00
onpon4 75990d42f8 Moved stuff in comms.cpp to intermission.cpp as static functions. 2015-04-24 22:40:50 -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