Commit Graph

15 Commits

Author SHA1 Message Date
onpon4 b43c52dc23 More cleanup. 2016-11-25 17:10:08 -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 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 063020df22 More cleanup. 2016-11-16 19:43:03 -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 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 96fb688601 Changed player's plasma weapon to spread by default. 2015-04-08 20:58:21 -04:00
onpon4 09e1f1f72e Some adjustments to weapons.
* Modified the upgrade limits, to both be uniform and allow upgrades for
  every factor. (In fact, each one can be upgraded exactly once now.)
* Gave triple-spread weapon double damage.
* Micro rocket damage down from 7 to 6. Total damage is now equal to
  double rockets.
2015-03-06 16:25:12 -05:00
onpon4 3f4c3b894a Increased the damage of micro rockets.
3 damage? Really?! No wonder this weapon felt so weak compared to
the double rockets!

I've increased the damage to 7, which causes the total damage of the
weapon to be 35 (slightly more than the total damage of the double
rockets, which is 30).
2015-03-05 08:19:44 -05:00
onpon4 9959c47f98 Updated copyright notices on all files based on git-blame. 2015-03-01 15:37:32 -05:00
onpon4 f385c9448e Upgraded to GPLv3. 2015-02-26 11:20:36 -05:00
Guus Sliepen 8810b090fa Remove external files for missions, shop items, aliens and weapons.
The source code contains routines to initialise all these resources, but also
functions to load from and store to external files.  Support for external files
has now been removed; this removes a potential difference between compiling
with or without USEPAK, and makes it easier to change missions in the code.
2013-07-11 15:29:37 +02:00
Guus Sliepen bd4a449e10 Rename code/ to src/. 2013-07-11 14:24:37 +02:00