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.
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.
* 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.
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).
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.