Commit Graph

22 Commits

Author SHA1 Message Date
Julie Marchant cbdbf94498 Replaced some uses of sprintf with snprintf. 2018-04-21 10:44:33 -04:00
onpon4 209a007775 Open files as text, not binary. 2017-03-28 10:35:11 -04:00
onpon4 427f92ce2b Fixed the method for checking whether compiling for Windows. 2017-02-10 10:39:27 -05:00
onpon4 e36a1e82e7 Changed the game to use true fullscreen.
The fake "windowed fullscreen" is less invasive, but it sometimes
causes ugly artifacts and as a general rule isn't really all that
useful.

However, I also defined it in defs.h, so that it can be more easily
changed in the future.
2017-02-05 16:40:59 -05:00
onpon4 59db629f5f Fixed a failure to properly delete save files when requested.
Also added removal of save files in the old (deprecated) format,
after re-saving in the current format.
2017-02-04 15:42:59 -05:00
onpon4 e981acded2 Made the minimal changes to allow Starfighter to be compiled on Windows.
It's not perfect, but I honestly just can't be arsed to figure out
how to use the Windows API to do the same thing that pwd.h does.
At the very least, Starfighter can now be successfully compiled for
Windows with MinGW simply by defining the "SF_WINDOWS" environment
variable to 1 (or any other non-empty value). The only downside is
that it uses the current working directory to decide where
.config/starfighter should go, meaning it can't be installed into
restricted directories like Program Files.
2017-02-01 16:10:48 -05:00
onpon4 788ee5eae4 Finished removing Starfighter.h. 2017-01-25 10:48:29 -05:00
onpon4 932b86da42 Added NOSOUND definition option, which disables use of SDL_mixer entirely. 2017-01-22 00:11:13 -05:00
onpon4 d6b31a270c More cleanup, updated copyright notices. 2017-01-21 23:55:54 -05:00
onpon4 08b68ab894 Lots more cleanup. 2017-01-20 23:48:53 -05:00
onpon4 6a463ab8f5 Renamed "bRect" to "LinkedRect". 2016-11-25 18:41:55 -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 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 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 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 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 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 697a302fc6 Some cleanup I forgot to do in gfx.cpp. 2016-01-03 22:39:16 -05:00
onpon4 ce94477b70 More cleanup. 2016-01-02 16:59:48 -05:00
onpon4 46a80eb30b More reorganization. 2015-05-20 19:49:37 -04:00