Commit Graph

560 Commits

Author SHA1 Message Date
Layla Marchant 21e16c157b Restored the old digital conversion of analog input for main menu.
This allows using an analog stick to control the main menu once
again. Part of #7.
2020-07-27 10:36:10 -04:00
Layla Marchant eb2c61cd04 Added a check for if the breakable byte is the start of char.
Fixes #9

Thanks to https://gamedev.net/forums/topic/707591-could-anyone-help-with-utf-8-line-breaking-in-c/5429529/
for helping with how to do this.
2020-07-27 10:12:47 -04:00
Layla Marchant 6e8d32fd64 Fixed a small discrepancy with the Venus mission in Classic difficulty
Since the original actually constantly had you drain Kline's health
to zero and then re-adjusted it, there were effectively stop points
limiting the amount of damage you could do to the amount designated
for the current stage. This has been simulated by setting the shield
to the proper amount of shield for the respective stage if the
difficulty is DIFFICULTY_ORIGINAL.
2020-07-27 00:37:04 -04:00
Layla Marchant 70f5112100 Revert "i - 1 instead of i for breaking text."
This reverts commit 5bc3657824.
2020-07-25 10:58:53 -04:00
Layla Marchant 91dcd81268 Revert "???"
This reverts commit 5fa977fb90.
2020-07-25 10:58:42 -04:00
Layla Marchant 5fa977fb90 ??? 2020-07-20 15:11:01 -04:00
Layla Marchant 5bc3657824 i - 1 instead of i for breaking text.
That's the right character to pick. It's actually still broken; will
look into more later. Will also need to make it so that it ignores
leading whitespace.
2020-07-20 14:09:06 -04:00
Layla Marchant 0201eddbe5 Added a setting for controlling language.
It doesn't seem to work and I don't understand why. It's as if
gettext is ignoring the setting.
2020-07-20 13:10:25 -04:00
Layla Marchant facc34b7ba Factored in radio life to the script radio messages.
This ensures that series of radio messages are stiched together
properly. An exception was given for the first Kline encounter;
timing stays the same for that one simply to make sure the music
cue isn't ruined.
2020-07-20 12:03:00 -04:00
Layla Marchant 82b35c5ce0 Added a text speed option, improved cutscene controls.
This is a pretty big one! Someone I know suggested that I should
make the textboxes able to stay on the screen for longer, so I've
added an option for that! In the process I also changed Fire and
Altfire to advance to the next box immediately (rather than skipping
outright), so that if you select a slower speed you can still make
the text go to the next one after you're finished reading one.
2020-07-16 13:22:16 -04:00
Layla Marchant 7b6eb5501f Fixed a couple typos. 2020-07-16 11:51:10 -04:00
Layla Marchant 9a5076bb93 Fixed some bugs with gamepad controls.
Included a bug where axis controls got stuck after the end of a mission,
and one where hat controls caused massive movement speed.
2020-07-16 11:43:45 -04:00
Layla Marchant 13a2f0fba5 Added proper analog support. 2020-06-21 22:19:28 -04:00
Layla Marchant afccdb741f Removed use of axes other than 0 and 1. 2020-06-06 15:23:07 -04:00
Layla Marchant b3856c6a3c Added a difficulty indicator to save slots, removed old format support 2020-05-26 22:20:38 -04:00
Layla Marchant 9a627a77bb Fixed double-cargo pods in Ceradse 2020-05-26 20:34:47 -04:00
Layla Marchant 97bcd873c7 Fixed Kline 2020-05-26 20:25:50 -04:00
Layla Marchant b73a56e587 Added some nerfs for the Mars mission in super-easy mode.
This makes mines much less frequent and spreads the asteroids out
much more. The other super-easy mode nerfs don't work on Mars, so
these custom nerfs are necessary to keep the difficulty consistent.
2020-05-26 20:03:42 -04:00
Layla Marchant 5e1892235c Less extreme buff 2020-05-26 19:19:20 -04:00
Layla Marchant b689e2bcfb Fixed health bar. 2020-05-26 19:11:45 -04:00
Layla Marchant b517275bd3 Really fixed nerfing this time 2020-05-26 17:57:41 -04:00
Layla Marchant a2ad01846a Fixed nerfing in super-easy mode 2020-05-26 17:35:24 -04:00
Layla Marchant d8734e5625 Give plasma ammo with powerups in super-easy mode. 2020-05-26 16:47:14 -04:00
Layla Marchant 1a4e2ea71e Removed some weird, pointless code for when Kline is disabled.
The code caused Kline's systemPower to be restored to full when
disabled. This would have had no effect on the code; the systemPower
variable is only used to add the FL_DISABLED flag when it reaches
0, and restoring systemPower has no effect on this. This might have
been an attempt to make it impossible to disable Kline, but it
wouldn't have worked that way (it might simply not have been noticed
because disabling Kline would take a ridiculous amount of time and
is unlikely to happen without conscious effort).
2020-05-26 16:34:44 -04:00
Layla Marchant 9749684468 Allow grinding in super-easy mode. 2020-05-26 16:33:22 -04:00
Layla Marchant 5c9b69dd0c Added a super-easy difficulty. 2020-05-26 15:51:04 -04:00
Layla Marchant 1a00e0df2c Changed default difficulty from Normal to Easy. 2020-05-26 12:44:30 -04:00
Layla Marchant 305e9fb05d Restored original charge cannon behavior for Classic difficulty. 2020-05-26 12:42:00 -04:00
Layla Marchant d31b65f50e Removed wide-spread in Classic difficulty.
I had set it this way because it's how version 1.2 behaves, but
having experimented and looked at the 1.1 source code, the way I
changed it to is actually the original behavior! So, now it spreads
as in the original.
2020-05-26 00:57:41 -04:00
Layla Marchant 9863aef0ba Fixed the warp escape delay bug.
That's embarassing.
2020-05-23 21:10:45 -04:00
Layla Marchant e382adb08a Reorganized the Mac stuff. 2020-03-12 16:01:13 -04:00
Layla Marchant 0ec878c213 Merge branch 'macos' of github.com:igilham/starfighter into macos 2020-03-12 15:30:32 -04:00
Ian Gilham 5bd2e96ece
revert commenting of chdir on macOS 2020-03-12 16:59:40 +00:00
Layla Marchant 34c42e8aa2 Modified preprocessor directives to be better. 2020-03-12 11:45:33 -04:00
Ian Gilham c4f3a1f936
build: fix MacOS support
- Detect host OS
- Add CoreFoundation framework to linker flags
- Comment out a chdir which breaks the app on load
- Document how to work around locale building on a Mac

Fixes #3
2020-03-09 09:31:59 +00:00
Layla Marchant d6731c09d4 Parentheses 2020-03-07 23:31:28 -05:00
Layla Marchant 44a536cd00 Exclude mines in non-Classic reduction in spread. 2020-03-07 23:30:09 -05:00
Layla Marchant 781b5c7f81 Halved speed of collectables outside of Classic difficulty.
This is meant so that bosses with huge drops, especially Krass Tyler,
don't have their stuff spread out too rapidly.
2020-03-07 23:12:42 -05:00
Layla Marchant b3a5344e21 Exclude interceptions from waiting for collectables. 2020-03-07 21:54:15 -05:00
Layla Marchant b3d3fa3a69 Don't count ore as a "good" collectable.
It's a mission collectable so it shouldn't be counted.
2020-03-07 21:24:49 -05:00
Layla Marchant 376df3cfe7 Fixed possibility of getting 0 rockets from powerup. 2020-03-07 21:10:47 -05:00
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