Commit Graph

409 Commits

Author SHA1 Message Date
onpon4 08b68ab894 Lots more cleanup. 2017-01-20 23:48:53 -05:00
onpon4 82dc26f949 More cleanup. 2017-01-20 23:26:49 -05:00
onpon4 1454b56db7 Cleaned up some custom uses of rand(). 2016-11-28 15:50:47 -05:00
onpon4 90450ee16e Small code cleanup. 2016-11-28 15:35:26 -05:00
onpon4 49c3260dcc Modified the way collectables are dropped.
I've made a couple of improvements here:

1. There is now a limit to how much value can be in a single
   collectable. This means, most importantly, that there will be
   no more 1000 plasma collectables or anything else ridiculous
   like that. It also means that bosses now tend to drop a ton of
   different collectable objects.

2. Collectables dropped by ships now live longer if a lot of
   collectables were dropped. In practice, this only affects bosses;
   no normal enemy drops enough to trigger this.

The combined results of these changes are that you're less likely
to get stuck with a useless item when you kill a boss (such as
plasma you don't need) rather than money, and you are more capable
of collecting the huge wads of cash left behind by the bosses that
drop more.
2016-11-28 00:26:28 -05:00
onpon4 bf9605387d Fixed banter in Jupiter level. 2016-11-27 23:56:59 -05:00
onpon4 6e98804e0f Don't allow selling powerup plasma less than 2 in Classic difficulty. 2016-11-27 23:46:36 -05:00
onpon4 ac5daa5d08 Restored Kline's original health for Classic difficulty. 2016-11-27 23:39:41 -05:00
onpon4 cf034ffa4a Don't combine temporary and permanent upgrade price in Classic difficulty. 2016-11-27 23:24:03 -05:00
onpon4 c1d5a9c9c6 Marked drones as not boastable. 2016-11-27 23:14:41 -05:00
onpon4 eecdb15445 Don't auto-sell rocket capacity when buying laser/charger in Classic.
Classic difficulty penalizes you for selling items, so it's best not
to automatically sell anything that doesn't need to be. It could be,
for example, that you want to switch to a laser and then back to
rockets, in which case the auto-selling could make this much more
costly or cripple your missiles when you come back to them.
2016-11-26 13:12:15 -05:00
onpon4 dd4e0b3855 Fixed failure to display proper powerup messages in Classic difficulty. 2016-11-26 13:08:53 -05:00
onpon4 f39fa5cbae More work on relativizing positions. 2016-11-26 01:34:54 -05:00
onpon4 682c233250 Several tweaks toward making the intermission adaptable to diff sizes. 2016-11-26 00:36:33 -05:00
onpon4 6a463ab8f5 Renamed "bRect" to "LinkedRect". 2016-11-25 18:41:55 -05:00
onpon4 1ba51f0e58 Moved most structs to the modules they obviously belong to.
The ones with names that don't correspond to modules and are used
in multiple places have been left alone.
2016-11-25 18:35:25 -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 65e8142959 Removed remaining references to engine.cheatCredits. 2016-11-25 17:24:45 -05:00
onpon4 c8e561eeec Added a "Credits" option to the main menu. 2016-11-25 17:23:23 -05:00
onpon4 b43c52dc23 More cleanup. 2016-11-25 17:10:08 -05:00
onpon4 5b4fa64360 Tweaked the way the laser is handled.
The tweak causes you to be able to fire the laser for more time,
but the difference is subtle (112 frames instead of 100 frames).
2016-11-25 14:36:56 -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 3400ff180c Renamed "currentMission" to "mission". 2016-11-25 12:53:53 -05:00
onpon4 f9cefa99e3 Merged the "resources" module into the "gfx" module. 2016-11-25 12:50:32 -05:00
onpon4 dc7209164a Renamed the "object" and "collectables" structs.
This was done with "replace all" actions, but I have checked and
the only collatoral damage has been to capitalize some instances
of "objective" in comments.
2016-11-25 12:37:26 -05:00
onpon4 de1cd7c674 Cleaned up the "missions" module, renamed to "mission". 2016-11-25 12:29:15 -05:00
onpon4 aec30bbc3d Reorganized "misc.cpp".
Most functions have been placed into "info.cpp" and "radio.cpp",
while one has been placed into "engine.cpp".
2016-11-22 21:16:49 -05:00
onpon4 800d278f78 Added a "NOBANTER" flag for ships that shouldn't cause it.
This is mainly for the asteroids, but it's also useful for the bosses
and Krass's team.
2016-11-19 12:29:26 -05:00
onpon4 96274ec90e Small tweaks to some of the banter. 2016-11-19 12:06:42 -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 e0cac7850c Converted the "missfire" messages. Deleted the now empty messages.cpp. 2016-11-19 08:51:26 -05:00
onpon4 7afd322a71 Some tweaks to prevent silent errors. 2016-11-19 08:34:28 -05:00
onpon4 e9330907b7 Reconstructed player hit messages. 2016-11-19 08:24:12 -05:00
onpon4 7578f3814f Removed the death messages.
At first I was doing the same thing to them I did to the bragging
messages, but when it came to actually thinking of things these
characters should say, nothing I liked came up. The main problem
is nothing fits the characters' expressions. Add to that the
complexity of making this really work right, and it's just not
worth it.

The Sid death message has also been removed, both for consistency
and because of the mismatch of Chris's face with what he said there.
2016-11-19 08:10:25 -05:00
onpon4 3c6c41ee49 Added simpler kill messages for Phoebe and Ursula. 2016-11-17 22:36:53 -05:00
onpon4 3987ffc9b1 Added some kill messages for Chris.
I'll be adding some more that include talking to Phoebe and Ursula
later.
2016-11-16 21:14:53 -05:00
onpon4 94b93c6ddb Removed the intro text.
I considered rewriting it, but I don't think the intro text really
adds anything. Starfighter is an action game, not an adventure game,
so it's just out of place to show a paragraph of backstory before
the game starts.
2016-11-16 19:46:42 -05:00
onpon4 063020df22 More cleanup. 2016-11-16 19:43:03 -05:00
onpon4 61d4c32b81 Fixed an incorrect SDL include. 2016-08-04 20:26:24 -04:00
Richard Smith 65c773cafb changed OS X style SDL includes back to Linux style 2016-08-04 20:58:38 +01:00
Richard Smith 6a165e8f0b Source code changes necessary to compile on OS X. 2016-08-04 16:51:46 +01:00
onpon4 dda76c8fe4 Added a message to make it clearer to newcomers that you can leave early.
The game previously didn't give any clear indication that secondary
objectives are optional. This message should make this feature more
obvious.
2016-06-02 11:19:07 -04:00
onpon4 ff48ca6204 Increased the shield bonus for Nightmare difficulty. 2016-06-01 11:04:45 -04:00
onpon4 ac5b31457b Removed a now unused function. 2016-04-04 21:20:45 -04:00
onpon4 59088cce0c Make mines simply disappear when they time out rather than exploding.
The explosions of mines off in the distance are extremely annoying in
the Mars mission, in particular. There's no real point in them
doing a timed off-screen explosion, anyway; if they just disappear,
the player won't notice.
2016-01-13 16:09:06 -05:00
onpon4 47c8dfd1d9 And thus ends the saga of stupidity. 2016-01-12 14:54:41 -05:00
onpon4 a3afb0a133 Whoops
Just... whoops. *game*.timeTaken, not *engine*.timeTaken. Fixed that...
2016-01-12 14:53:34 -05:00
onpon4 a2e2207a67 Reversed a ruinous change.
Dur... event times can be negative, and yet here I am changing it to
unsigned.
2016-01-12 14:43:42 -05:00
onpon4 3c35f4043d Added installation of starfighter.desktop and starfighter.png. 2016-01-12 14:03:08 -05:00
onpon4 a0f68d722b Fixed type inconsistency.
SDL_GetTicks() returns Uint32, but I was using the long int type,
which could mean signed or unsigned, not to mention any size. Changed
missionCompleteTimer and timeTaken to Uint32 for consistency.
2016-01-12 10:41:42 -05:00
onpon4 e6bd534cdf More magic numbers. 2016-01-11 22:42:45 -05:00
onpon4 c764c4d8b7 Added code to prevent loud sounds from being overtaken by quiet sounds.
This prevents the weird effect where you hear a bunch of sounds of
majorly different volumes starting and stopping. If, for example, you
have several mines exploding nearby as well as several mines exploding
far away at the same time, you will hear the near ones and not the far
ones.
2016-01-11 00:10:55 -05:00
onpon4 0929abf3a3 Added a Y component to audio_playSound, and reduction of volume by distance.
This makes it possible to remove code that made mines that exploded
off-screen completely inaudible.
2016-01-10 23:56:26 -05:00
onpon4 5ba8759804 Increased the chance of the cloak fighter running.
Also fixed the chance in Classic difficulty; accidentally made it
10 times as likely as in the original.
2016-01-10 19:07:16 -05:00
onpon4 1ada79e695 Don't hide the "Load Game" menu. 2016-01-09 22:30:25 -05:00
onpon4 285fb8e614 Made the Continue and Load options not appearing work again.
This must have been screwed up a loooong time ago. Anyway, it now
hides these menu options as it should when there is no autosave
available.
2016-01-09 22:26:31 -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 edacc25821 Fixed incomplete transition to the new save format.
Had to slightly adjust the save format as well.
2016-01-09 22:00:20 -05:00
onpon4 b66bb4bf98 Replaced the struct dump "save format" with a proper save format.
This format is actually portable, and there isn't a risk of it just
breaking any time the format is changed, since the version number
can be read independently of everything else.
2016-01-09 19:58:07 -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 fa43f2aabe Fixed the experimental fighter not running away from chargers.
This oddity was caused by exactly what I thought it was caused by:
the code assumed that all bullets are created equal, and each bullet
had a 1 in 50 chance of causing the ship to run away. Well, the
charger inflicts so much damage that 50 shots would be a ridiculous
amount of damage for even the experimental fighter.

So now, except in Classic difficulty, whether or not it runs away
is determined partly by how much damage a weapon inflicts.
Specifically, the chance is now the damage of the bullet out of 150.

High-damage weapons are still a useful idea; after all, a 100 damage
weapon is 100 guaranteed damage, even if the fighter is likely to flee.
However, it gets rid of the skewed nature of the fleeing behavior and
prevents the charger from subverting the purpose of the behavior.
2016-01-09 08:01:23 -05:00
onpon4 efb7a135be Some cleanup 2016-01-09 07:50:12 -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 14a9dace7e Let Kline switch weapons on Venus (except in Classic difficulty).
It's a modified version of the weapon switching: if Kline's health
is less than 1500, the spread shot replaces the concentrated triple
shot.

This also keeps Kline with bullet weapons during the third phase.

The main purpose of this change is to make Kline consistent. He now
switches his secondary weapon, and that's about it. The way it was
in the original, it started out much easier than previous encounters,
then it went to slightly easier than previous encounters, then
something completely unlike previous encounters, and finally
something noticeably harder than previous encounters. Now, it starts
out exactly the same as previous encounters, and then gets
progressively harder.
2016-01-08 18:09:35 -05:00
onpon4 66faa897a5 Permit Kline to drop mines in all of his appearances.
I don't understand why there is code to prevent Kline from dropping
mines after his first appearance. So except in Classic difficulty,
this limitation has been removed. He now drops mines in all of his
appearances.
2016-01-08 17:37:18 -05:00
onpon4 54eb5230fe Fixed failure to use left-pointing images for a couple ships.
Whoops!
2016-01-08 17:09:42 -05:00
onpon4 6c52a63bc3 Removed the code that caused you to briefly stop when you finished Ellesh.
This was just really weird-looking and had no particular benefit.
I guess theoretically you can use the couple of seconds to grab stuff
you missed, but in practice, there usually isn't much stuff there.
2016-01-08 16:56:07 -05:00
onpon4 0fb6e85eb6 Changed the target in the Poswic mission to Sid.
Sure, the escort is what you're supposedly after, but it's
invincible, and your real priority is to protect Sid. It helps that
it now says "Sid" when Sid is the target; that should prevent
any possible confusion. :)
2016-01-08 16:43:41 -05:00
onpon4 75029e45ee Fixed being able to get hurt after the mission is over.
There were two problems:

1. Some areas did not have any code to protect against this.

2. In one area that did have such code, it was malformed, and actually
   caused the "no damage" cheat to be negated after the mission was
   completed.

Both have been fixed.
2016-01-08 16:36:20 -05:00
onpon4 a889d43296 Fixed drones and small asteroids being given special alien slots.
This could cause small asteroids and drones to be given labels that
said "Sid", "Phoebe", "Ursula", or "Kline".
2016-01-08 12:10:50 -05:00
onpon4 8de37af9cd A little cleanup. 2016-01-08 11:27:28 -05:00
onpon4 0f6807d4ad Adjusted the price of plasma and rocket ammo.
There are two adjustments here:

First, Classic difficulty now gives these items the same price as
the original (50), which is important because the original made it
very easy to grind by filling up on plasma at interceptions and then
selling it. $25 is a lot more than $5.

Second, for every other difficulty, the price has been dropped down
from 10 to 1. The reason I'm doing this is unlike in the original,
you now pretty much have to routinely fill up on rockets and/or
plasma ammo to use these weapons, and it puts the weapons which
don't need ammo (laser and charger) at an unfair advantage, basically
turning use of rockets into a mistake. By making the prices very low,
you still want to conserve plasma and rockets, but the effect is more
to deprive you of their use later on in the mission than to drain
your money.
2016-01-08 11:13:56 -05:00
onpon4 62d14c57f0 Added special target text for Kline. 2016-01-08 11:09:13 -05:00
onpon4 f8e23ab061 Added special target text when Sid or Phoebe is the target.
This is because it may not be obvious that Sid or Phoebe is the
target now that the indicator for them says their names.
2016-01-08 10:52:34 -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 efc2311f7a Added special indicators for Sid, Phoebe, and Ursula. 2016-01-08 10:31:01 -05:00
onpon4 401a306793 Added green versions of arrows for friendly ships. 2016-01-08 09:39:12 -05:00
onpon4 79bbe56849 Replaced the previous arrow positioning with a more simplistic one.
The previous one positioned the arrows based on the difference between
their X distance and Y distance; objects that were further away
would be closer to the center. However, the code was confusing, and
a major practical effect of this was it was impossible to really know
exactly where an object was.

This new, simpler method makes aiming at targets that are off-screen
feasible, and it also utilizes the diagonal arrows.
2016-01-08 09:12:07 -05:00
onpon4 33a92b2294 Removed the code that actively prevented the "Target" text from showing.
It was triggered whenever there was a message being displayed.
Thing is, there's no legitimate reason to do this. It doesn't ever
obscure the radio message, and there wasn't some technical limitation
in place. It just did it... just because.
2016-01-07 23:15:01 -05:00
onpon4 409a2efe07 Updated copyright notices.
Apparently they've all been modified this year now. The earliest
modification date is alien.h, at January 2.
2016-01-07 21:32:40 -05:00
onpon4 e71e3b8a96 Moved the "brief" data files to C code. 2016-01-07 21:18:14 -05:00
onpon4 e7abfe30a6 Fixed the bug that caused mobile rays to shoot bullets.
This was a strange cause, and I wonder why it happened. Quite simply,
there was an assumption in the code that any alien's primary weapon
was a bullet, despite the fact that the secondary weapon code could
handle any weapon, including bullets. I've fixed this by getting rid
of the special primary weapon mechanism; the one for the secondary
weapons is used on primary weapons as well.
2016-01-07 19:01:25 -05:00
onpon4 6dad38bd20 Made powerups in Classic difficulty behave the same as the original.
There are two aspects to this:

1. They now simply make sure your plasma ammo is at a minimum of
   50, rather than adding to your plasma ammo as in the other
   difficulties.

2. Added a simulation of a bug in Starfighter 1.1 which caused
   each aspect of the Supercharge to be lost when you picked up
   a different associated powerup. Even though this was a bug,
   without it, the Supercharge becomes extraordinarily more
   game-breaking, since it's the only thing that sort of limits
   its longevity.
2016-01-07 06:44:03 -05:00
onpon4 f7aab48a56 Revert "Added usage of plasma ammo by the charger cannon."
This reverts commit 05e645aeff.
2016-01-07 05:36:49 -05:00
onpon4 05e645aeff Added usage of plasma ammo by the charger cannon.
This should add some much-needed depth to the tacticality of the
weapon. It's not much: it takes 5 plasma cells to fully charge the
cannon. But it does eliminate the previous effect where the charger
was always preferable over plasma bullets; it's still preferable in
a lot of circumstances, but for smaller ships, it's now typically
better to use plain old plasma ammo. It also limits the amount of
times the charger can be used.
2016-01-06 21:56:53 -05:00
onpon4 cac29f72a2 Fixed positioning of mine explosions.
Accidentally put "x" instead of "y". Whoops! Fixed now.
2016-01-06 20:49:02 -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 4be080225b Fixed more magic numbers.
God, this one was definitely the biggest headache of all of the
magic number erasing. Never did I expect such cryptic problems.

The first problem was that the entirety of the player's weapon
struct was a part of the save file, *including the weapon's "image
indexes"*. Since the indexes have been changed, and the originally
used one is now unavailable when it's requested, this was causing
a segfault later on. Had to fix this by setting the image index
when the game is loaded.

The second problem was related to another bug I've been confused
about for years: the one that causes mobile rays to fire 5 green
shots. The entire reason those shots were green was because
the weapon's image indexes were undefined, and *that was causing
them to default to 0*. 0 was simply the index of green plasma.
Of course, though, now attempting to use that image causes a
segfault, so for now, I've fixed this by changing the image index
of the mobile rays to the red plasma bolts.

There are still some magic numbers left, related to the intermission
screen. But the hardest part is now done, thank God.
2016-01-05 22:12:29 -05:00
onpon4 4a921947c1 NONE -> M_NONE 2016-01-05 07:07:04 -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 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 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 26add18109 Repositioned the Starfighter logo and the menu.
This places the logo at 1/3 of the way down the screen, rather than
half of the way down, and the menu ends up about in the middle of
the screen now. This doesn't really matter as it is, but it should
help some with lower resolutions.
2016-01-03 18:19:20 -05:00
onpon4 a2cb637507 Added in my copyright notice to the title screen. 2016-01-03 18:00:22 -05:00
onpon4 ac7a524588 Fixed wrong event index in the Jupiter mission. 2016-01-03 17:18:24 -05:00
onpon4 6af4e67874 Added back in the annoying ships for Urusor in Classic difficulty. 2016-01-03 16:41: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 5400ce6205 Fixed displaying blank messages with non-message events.
Honestly, I don't get why the special string "@none@" was chosen
for non-message events to begin with, so I've changed it to an
empty string.
2016-01-03 15:59:17 -05:00
onpon4 7677aa24f1 Reduced the amount of extra money classic difficulty gives. 2016-01-03 15:54:26 -05:00
onpon4 02d0263f56 Renamed "original" difficulty to "classic" difficulty.
This name is better since the difficulty isn't actually *exactly*
like the original; it's just trying to be as similar to the classic
experience as possible.
2016-01-03 15:03:30 -05:00
onpon4 e5e7d6b9c4 Some cleanup. 2016-01-03 14:31:39 -05:00
onpon4 16473a715f Moved alien definitions from ".dat" files to alien.cpp.
Like "scripts", these definitions in text files make absolutely no
sense. They are completely unreadable, and Starfighter's engine is
inflexible anyway.
2016-01-03 14:14:31 -05:00
onpon4 e258921987 Moved all "script" files to C code.
I'm going to do this for all of the stuff in the "data" directory.
It was obviously an attempt to make Starfighter more flexible
somehow, but it fails at that entirely. More importantly, these
things are both unreadable and easy to make mistakes on. Simple
C code is much easier to read.

The only disadvantage is that recompiling is now needed to change
the "scripts", but considering that they had hidden limits and
no one was making custom missions to begin with, I don't consider
this to be a real loss.
2016-01-02 22:37:44 -05:00
onpon4 d911426c06 More cleanup. 2016-01-02 17:37:19 -05:00
onpon4 85de61e2cd Changed struct definitions to use typedef (C style) 2016-01-02 17:15:50 -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 8375c36433 Added a patch by Guus Sliepen fixing mouse cursor position. 2015-07-05 00:31:36 -04:00
onpon4 9a211d773c More reorganization. 2015-06-20 11:59:09 -04:00
onpon4 1c833b1818 More reorganization.
Added colors.cpp and colors.h to contain some of the stuff in
graphics.
2015-06-20 11:31:41 -04:00
onpon4 3850f8e946 Removed "asteroid collision damage" message. 2015-06-16 10:36:42 -04:00
onpon4 e95f55565c Improvements to text display.
Starfighter uses an absurdly crude method for wrapping text which
basically fails very frequently when large words are chosen. The only
reason it got away with it is because text strings don't vary. Well,
I've been quite annoyed by having to test for this and rework my
text so much, so I've added in a secondary system: if it's really
close to the edge, and the next three characters are going to be
letters, it adds a hyphen and moves on to the next line. This still
isn't 100% fool-proof, but it should catch most problems.

Also removed the "temp fix" which shifted the letters by a pixel in
code, and just shifted them in the actual image. I don't understand
why the "temp fix" was there in the first place, to be honest.
2015-06-15 23:56:20 -04:00
onpon4 6fa0321d31 Edited dialog.
Mainly to better match Chris's new portrait.
2015-06-11 12:51:57 -04:00
onpon4 30ace4d67b Returned the obscene power of the original charger to origial difficulty.
Also made some tweaks to the code that displays the charge shots
to make it look a little better.
2015-06-09 01:06:26 -04:00
onpon4 5964066969 Sell for only half price in original difficulty. 2015-06-07 22:51:16 -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 51ae0dc659 Made *all* enemies face forward in Ellesh mission.
I don't really understand why this code was implemented only for the
boss and not for anyone else. My only guess is it was designed to make
the level harder by letting enemies fire backwards while you can't,
but mine-droppers can already effectively do that.

The primary reason I decided to make sure they all face forward is I
was finding it to be nearly impossible to get through this level in
Nightmare difficulty; those ships being able to shoot backwards is
a HUGE advantage, because it's almost impossible to position yourself
in an area that's safe.

It may be that the unfair previous behavior was put in to compensate
for the AI's frankly asinine movement pattern. The random movement is
fine most places, but here, it's blatantly obvious that it's random,
and the enemy ships pay a steep price for it. What the ships should
be doing is positioning themselves so that they end up shooting or
dropping mines at the player. But the boss itself also has such a
positioning problem anyway; that should be properly fixed in the
future, so I might as well do the same for the smaller ships when
that time comes.
2015-06-01 20:09:33 -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 e4664b9b1a Revert "Removed the game's automatic pausing when window focus is lost."
This reverts commit d4ff9213b5.
2015-05-21 18:30:23 -04:00
onpon4 46a80eb30b More reorganization. 2015-05-20 19:49:37 -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 3559106ff5 Allow skipping the credits with the fire and alt fire buttons. 2015-05-20 10:53:10 -04:00