Commit Graph

519 Commits

Author SHA1 Message Date
Layla Marchant cfecdbd585 Made Chris not leave until all worthwhile collectables are gone.
This is something I've been thinking of doing for awhile. The
automatic leaving can be frustrating if you were trying to collect
the money dropped by the enemy and you're suddenly forced out of
the mission. This prevents that by simply waiting to do the exit
sequence until no worthwhile collectables are left in the area.

Ellesh and Mars are excluded since this won't really work in those
areas. Also excluded by Classic and Nightmare difficulties.
2020-03-07 13:45:59 -05:00
Layla Marchant becb2cc501 Made engine still show when smoke shows, made smoke come out less.
I reduced the chance of smoke happening a given frame from 1/5 to 1/10,
and removed the check that stopped adding the "engine" effect to the
player if low on shield, so it now shows both when damaged.
2020-03-07 12:23:37 -05:00
Layla Marchant 825e6afae1 Modified the HUD's powerup display for color accessibility. 2020-03-07 00:24:37 -05:00
Layla Marchant d96c8327e4 Bunch of fixes.
At first I just went in to fix some places that were missing gettext
translations, but on the way as I was doing that, I noticed some
places where ngettext should be used, a bug in the fallback legacy
text rendering, and some things that could be structured better in
the Autoconf / Automake setup. Fixed those.
2020-03-06 19:06:48 -05:00
Layla Marchant 47d876c15e Some cleanup and tweaks.
Basically removal of warnings + added missing info to the readme.
This also removes remaining uses of sprintf (which is dangerous).
2020-03-05 16:44:50 -05:00
Layla Marchant cdf555f17b Removed my old name.
I go by "Layla" now. Updated that. Also updated my email address.
2020-03-05 15:05:56 -05:00
Crestwave fcf2b5d1ee Add support for Haiku's config directory 2020-02-27 08:46:33 +08:00
Julie Marchant 00512c4490 Removed unnecessary part 2019-07-06 21:24:45 -04:00
Julie Marchant b4ccaf61ab Use XDG environment varaible standards, plus Windows env variable for win32
The Windows variable is untested, but hopefully should work and be
better than all that Windows API nonsense.
2019-07-03 17:00:46 -04:00
Julie Marchant 759bed096a Removed the attempt at Windows API code. 2019-07-03 13:20:18 -04:00
Julie Marchant 5594529239 Fixed some things for dist, plus a case mistake for the Windows code. 2019-06-30 10:26:08 -04:00
Julie Marchant c142191f6f Restore "always ignore bad targets" for Classic difficulty. 2019-06-22 08:48:06 -04:00
Julie Marchant 122624f89e Change the method for determining Sid's good targets outside Classic difficulty.
The original method just looked for non-firing targets, which caused
Sid to piss around a bit with the non-target transports.  This new
method just targets the specific classes Sid is always going after,
cargo ships and bosses.
2019-06-22 08:44:54 -04:00
Julie Marchant 75327aa3f8 Allow aliens to attack "less desirable" targets if they can't find a good one.
The way it previously was, in particular, Sid 100% refused to attack
fighting vessels and Phoebe and Ursula 100% refused to attack
non-fighting vessels.  This was most notable with the Urusor mission,
where Sid would just become completely idle after disabling the last
non-combat vessel and would often just drift off into the distance
as a result (especially annoying in Classic difficulty as this
could make it very difficult to find the remaining enemies).

So now, instead these targets are treated as "undesirables", which
normally will be avoided but will be accepted after 30 frames.
This stops allies from idling around forever.

This rule has also been applied to a rule that didn't allow targeting
enemies beyond a particular distance.

I'm keeping it in Classic difficulty for now, but might add an
exception later.
2019-06-22 08:34:57 -04:00
Julie Marchant cda23d7f7c Whitespace 2019-06-20 22:19:34 -04:00
Julie Marchant 8f0013ac6b Whitespace 2019-06-20 12:28:54 -04:00
Julie Marchant 8ca0fd45a5 Revert the thing where an extra surf was created for rendering radio messages.
It caused the text to be poorly rendered.
2019-06-19 21:29:02 -04:00
Julie Marchant c0216735db Fixed barriers bouncing off and killing each other. 2019-06-19 17:55:59 -04:00
Julie Marchant f2ef6a50df Fixed unicode shadows possibly being separated from real text. 2019-06-15 14:26:50 -04:00
Julie Marchant c1aea797b1 Render mission planet names as Unicode. 2019-06-13 12:51:57 -04:00
Julie Marchant 9b782de4e4 Fixed the collision-caused segfault. 2019-06-13 12:02:42 -04:00
Julie Marchant f43c81ec07 Switch back to SDL_UpdateTexture.
Hopefully temporary until I findout what I'm doing wrong.
2019-06-13 11:39:45 -04:00
Julie Marchant 28c68842a1 Fixed some size/position things
Now I gotta figure out why renderer_reset double-frees, and why
the collision behavior is causing segfaults...
2019-06-13 02:25:58 -04:00
Julie Marchant e9e5e43452 Fixed completion screen not showing up 2019-06-13 01:34:41 -04:00
Julie Marchant 373f87de0c Added a condition I forgot
The collision behavior in the original had an exception for Ellesh.
Added this exception in.
2019-06-12 17:53:23 -04:00
Julie Marchant d262806105 Added back in collision support (Classic difficulty only)
I completely forgot about this stupid feature of the original game.
Nonetheless, it's a part of the original experience and thus has
been added back in, albeit implemented in a slightly different way
(the result is still the same). Because this is such a stupid and
badly designed mechanic, this is of course in Classic difficulty
only.
2019-06-12 17:49:09 -04:00
Julie Marchant 98afecf1c3 Fixed some translation documentation, updated POT and en.po 2019-06-12 11:50:38 -04:00
Julie Marchant a2d9120903 Dynamically choose the number of credits by checking the number of lines.
That's the last of our FIXME, XXX, and TODO! Woohoo! ^o^
2019-06-12 11:25:03 -04:00
Julie Marchant 604443c4b3 Fixed the positioning of the "Plasma Cells" and "rockets" shop texts. 2019-06-12 10:57:16 -04:00
Julie Marchant c323e17c2e Replaced SDL_UpdateTexture with SDL_LockTexture.
The SDL wiki indicates that this is the preferred way to do this
for textures like renderer_texture that are updated often, since it
is faster.
2019-06-12 10:46:56 -04:00
Julie Marchant 5434ce43c4 MOAR MOAR 2019-06-11 20:08:29 -04:00
Julie Marchant cea10fd3fb Moar translation support 2019-06-10 09:23:56 -04:00
Julie Marchant f205d7cc44 Plural support for "x more" messages, plus fixed those problems from last commit 2019-06-10 01:08:01 -04:00
Julie Marchant cc80af45ab Yes, I know it's broken. Missing semicolons. Will fix next commit. 2019-06-09 16:08:30 -04:00
Julie Marchant d8d8d9cab2 Moar translations! 2019-06-07 17:08:35 -04:00
Julie Marchant 268637343c Everything is translatable! (I think) 2019-06-07 00:18:24 -04:00
Julie Marchant 94f23dc39e More cleanup 2019-06-06 09:46:30 -04:00
Julie Marchant 3f1febc2fc Some code cleanup. 2019-06-06 09:30:22 -04:00
Julie Marchant caf963ba19 Added translation support.
No, really, just added the whole thing. This took literally the
entire day. I'm soooo glad it's working now!

Also includes tons of other small fixes I didn't bother to keep
track of.
2019-06-05 22:13:48 -04:00
Julie Marchant 24e565680b Lots of Unicode usages, + title screen efficiency 2019-06-04 19:10:24 -04:00
Julie Marchant c665d2451d FINALLY fixed the unicode rendering! 100% good now!
Font switched to TakaoGothic. May change again later, we'll see.
I think I'll make it so that translations can specify a custom font.
2019-06-04 11:45:57 -04:00
Julie Marchant 4ca7cbe0c9 Fixed coloring. 2019-06-04 09:49:26 -04:00
Julie Marchant d675800a17 Fixed the text breaking part.
Now for the rendering... Seems to be a font issue.
2019-06-04 09:31:45 -04:00
Julie Marchant c798d0d7ec Starting to fix the core problem.
Using Pango's pango_get_log_attrs function.

Not finished yet, but this is the start of it.
2019-06-03 22:36:03 -04:00
Julie Marchant 0a522faea6 Ugh, it doesn't work at all. 2019-06-03 21:05:38 -04:00
Julie Marchant 1f3f1d46b1 Turn on use of Unicode. (Still not actually used.) 2019-06-03 20:20:13 -04:00
Julie Marchant edd1239f01 Finally fixed, I think. 2019-06-03 15:54:02 -04:00
Julie Marchant 8a7edc7202 Completely reworked that. Hopefully good now? Will test later. 2019-06-03 14:05:31 -04:00
Julie Marchant a3e2867ae9 Ugh, this is broken beyond belief... 2019-06-02 23:37:40 -04:00
Julie Marchant 1b8581f471 A bit more 2019-06-02 19:53:03 -04:00
Julie Marchant 1af6cfd75b Boy was I wrong...
Not surprising. Anyway, made some further progress.
2019-06-02 17:40:32 -04:00
Julie Marchant f23307f34c A little more progress 2019-06-02 14:39:52 -04:00
Julie Marchant 24f44e509f Implemented Unicode text rendering... I think?
I'm in a bit of a rush so I can't check yet (also it's deactivated
for now). But I think I'm finished? Will check later.
2019-06-02 11:30:39 -04:00
Julie Marchant e17247aa99 Always update options surface. 2019-06-02 07:39:54 -04:00
Julie Marchant 56ac26c794 Improved the pause screen somewhat when resizing.
I unfortunately can't make it perfect because rendering is too
closely tied into game logic, but this way, you at least see the
"PAUSED" text.
2019-06-01 23:42:13 -04:00
Julie Marchant 47e2aa7a40 Fixed status screen. 2019-06-01 23:28:54 -04:00
Julie Marchant ee3ba27fe8 Fixed copyright text in title screen. 2019-06-01 23:06:52 -04:00
Julie Marchant 4a2b05b6d6 Updated all remaining blitTextInPlace calls. Removed legacy function. 2019-06-01 23:04:19 -04:00
Julie Marchant a4760466fe Fixed some more 2019-06-01 18:16:32 -04:00
Julie Marchant 356a6472b4 Converted the main menu. 2019-06-01 15:12:02 -04:00
Julie Marchant 7011080965 Adapt shop positioning when window resized, plus removed several magic numbers 2019-05-31 22:33:28 -04:00
Julie Marchant 6a945685b9 More conversions 2019-05-31 14:23:48 -04:00
Julie Marchant 3369b6c5c1 Fixed screen_adjustDimensions, plus updated some more blitTexts. 2019-05-30 23:09:10 -04:00
Julie Marchant d38c82ea69 More conversions, incl. status screen 2019-05-30 22:15:51 -04:00
Julie Marchant bf01637f57 A couple more. 2019-05-30 18:42:10 -04:00
Julie Marchant ba248f8264 Started migrating to the new blitText, plus a small fix
The fix is simpl to make blitTextInPlace center text to the
screen rather than the text creation doing it. That way you don't
get weird behavior with screen_blitText (which already handles centering).
2019-05-30 18:33:31 -04:00
Julie Marchant 0ac42df374 Added a new screen_blitText function.
The old one still remains while I adapt the code to the new one.
This is simply a decoupling of the absolute position of text from
the creation of the text, to better facilitate position adaptation
to changes in screen size. Position indicated at creation remains
only for relative position (for use by e.g. credits and status lines).
2019-05-30 18:09:15 -04:00
Julie Marchant 3c866fe150 Revert "Adapt the menu properly when resizing the window."
This reverts commit 4b2811b56b.
2019-05-30 18:02:33 -04:00
Julie Marchant dabda7f436 Revert "Adapt HUD during missions"
This reverts commit 9d825e5415.
2019-05-30 18:02:18 -04:00
Julie Marchant 9d825e5415 Adapt HUD during missions 2019-05-30 17:52:58 -04:00
Julie Marchant 4b2811b56b Adapt the menu properly when resizing the window. 2019-05-30 17:35:40 -04:00
Julie Marchant 840b7fbd30 Rescale backgrounds when resizing window. 2019-05-30 16:51:02 -04:00
Julie Marchant 12a3fcdbab Started on adaptive aspect ratio adjustment.
Just one problem: the backgrounds don't get resized and so you get
awful mush on the right side/bottom of the screen. Will fix in
the next commit.
2019-05-30 13:14:32 -04:00
Julie Marchant f10af4aaf3 Made the window resizable. 2019-05-30 12:29:47 -04:00
Julie Marchant 7296b8ab76 Fixed some graphical problems.
Problem 1: fullscreen switching was leaving artifacts. Fixed by
drawing all black when switching fullscreen (and switching fullscreen
is now handled by its own function).

Problem 2: the mission briefing screen would distort if you changed
fullscreen during it. Fixed by redrawing the screen (it was previously
only drawn once).
2019-05-30 12:01:42 -04:00
Julie Marchant 04033b332e Added "desktop" fullscreen back in, plus removed key repeats. 2019-05-30 11:32:50 -04:00
Julie Marchant d8331ac14e Re-added the classic-mode-edge-behavior in a better way.
This way preserves checks for Classic difficulty within (where
auto-camera-centering is implemented) so that if the edge behavior
ever changes again, it won't have unintended side-effects.  The
conditional is also inverted to make it easier to read.
2019-05-29 21:08:54 -04:00
Julie Marchant 628ed07c8b Revert "Removed the camera fix for Classic difficulty."
This reverts commit 0bacdfa494.
2019-05-29 20:58:12 -04:00
Julie Marchant ec2d532435 Fixed up some stuff in the Apple code (or at least I think I did) 2019-05-27 00:56:51 -04:00
Julie Marchant c0ca361da6 Added proper Windows support.
I think this should be good, but I can't test it right now because
I don't have a Windows compiler handy at the moment. Will make sure
to do so before making a release.
2019-05-27 00:28:04 -04:00
Julie Marchant 44f3d05533 Sell secondary for "none" in Classic difficulty, as in the original.
The modern version sells for rockets (i.e. you get rockets back when
you sell your secondary), but the original instead left you with
no secondary at all in this case. This behavior has now been restored.
2019-05-26 20:31:34 -04:00
Julie Marchant 5c6d4e5134 Restored use of the word "Target" for all target life bars in Classic mode.
At some point I replaced the "Target" text with "Sid", "Phoebe", and
"Kline" for those respective characters. Classic difficulty now always
uses the word "Target" once again.
2019-05-26 20:18:10 -04:00
Julie Marchant dcd4fd735b Fixed the bug that caused the time cheat to make Mars unwinnable.
Am I going crazy? I could have swore this was fixed years ago.
2019-05-26 20:01:16 -04:00
Julie Marchant 431358e7ae Fixed a bug that caused mobile shields to resurrect the boss from the dead.
The main problem with this bug was simply that it caused a constant
cycle of resurrection and death, which generated tons and tons of
powerups. It was only realistically achievable with cheats enabled,
but still, this seems undesirable.
2019-05-26 19:49:28 -04:00
Julie Marchant 87253b7212 Always show the arrow as red in Classic difficulty. 2019-05-26 19:41:31 -04:00
Julie Marchant 7a066e08a0 Implemented centering of the target arrow in Classic difficulty. 2019-05-26 19:32:52 -04:00
Julie Marchant e86e5210df Re-implemented a targeting system similar to the original for Classic.
It's not exactly the same technically, but in function it is. The
only functional difference is that the original would sometimes show
an unexpected health bar for a small(ish) enemy, whereas the new
implementation never does that.

Also different is that exact location is still shown. Will fix that
next.
2019-05-26 18:22:08 -04:00
Julie Marchant ac44cbdf75 fixed the long-standing segfault, plus fixed a bug with the Dorim mission.
So, that segfault? Turns out there's a place where I forgot to check
if something was NULL before accessing it, which turned out to be
important because for some reason, gfx_textSprites[TS_RADIO] got
set to 32 at some point while gfx_messageBox remained NULL.

This may be indicative of a memory leak somewhere, but it's
also possible that maybe it was left-over from a previous mission
or something, which may have been what made it so hard to spot (that
would make the bug time-sensitive as well as context-sensitive). In
any case, at least the segfault is fixed now.
2019-05-26 17:43:14 -04:00
Julie Marchant 8ca4522ac9 Target the exec transport instead of Sid in Poswic for Classic difficulty.
Also added missing entries about Classic differences in the readme.
2019-05-26 16:19:33 -04:00
Julie Marchant 3e453a2f3c Added an "original AI type" definition for the sake of the exec transport.
This is something I forgot about before: the executive transport
A.I. was changed by me at some point from "Normal" to "Evasive".
This change re-introduces "Normal" A.I. for this ship in Classic
difficulty.
2019-05-26 15:35:46 -04:00
Julie Marchant 72cb75fb7e Added a preference for giving the player needed items. 2019-05-26 01:08:58 -04:00
Julie Marchant d7dc0844c8 Adjusted the delay of ray damage, plus some misc code fixes. 2019-05-24 22:05:09 -04:00
Julie Marchant 281687b1c5 Small adjustment to some checks. 2019-05-23 12:18:29 -04:00
Julie Marchant d17a8f36c7 Better malloc practice, plus several missing warnings 2019-05-23 11:25:54 -04:00
Julie Marchant b251acb4fe Removed the now unnecessary casting for malloc calls. 2019-05-23 11:07:03 -04:00
Julie Marchant 908a6059ac Finished C conversion! Hoorah!
Note: Autoconf files must be cleaned up and regenerated to ensure
proper compilation.
2019-05-23 11:02:48 -04:00
Julie Marchant ed0cc2ec97 Updated one more copyright notice. 2019-05-22 23:35:18 -04:00
Julie Marchant 7dc10025f0 Merge branch 'master' of git.savannah.nongnu.org:/srv/git/starfighter 2019-05-22 22:19:52 -04:00
Julie Marchant f552b66c10 Restored behavior of attachments for Classic difficulty. 2019-05-22 22:19:34 -04:00
Julie Marchant 371896eb60 Updated copyright dates. 2019-05-21 18:47:32 -04:00