starfighter/src
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
..
Starfighter.cpp Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
Starfighter.h Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
alien.cpp Removed more magic numbers. 2016-01-05 06:44:26 -05:00
alien.h More cleanup. 2016-01-02 16:59:48 -05:00
audio.cpp More cleanup. 2016-01-02 16:59:48 -05:00
audio.h More cleanup. 2016-01-02 16:59:48 -05:00
bullet.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
bullet.h More cleanup. 2016-01-02 16:59:48 -05:00
cargo.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
cargo.h More cleanup. 2016-01-02 16:59:48 -05:00
collectable.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
collectable.h More cleanup. 2016-01-02 16:59:48 -05:00
colors.cpp More cleanup. 2016-01-02 16:59:48 -05:00
colors.h More cleanup. 2016-01-02 16:59:48 -05:00
cutscene.cpp Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
cutscene.h Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
defs.h Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
engine.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
engine.h More cleanup. 2016-01-02 17:37:19 -05:00
event.cpp Renamed "FACE_" enum values to "FS_". 2016-01-04 09:07:30 -05:00
event.h Some cleanup. 2016-01-03 14:31:39 -05:00
explosion.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
explosion.h More cleanup. 2016-01-02 16:59:48 -05:00
game.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
game.h More cleanup. 2016-01-02 16:59:48 -05:00
gfx.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
gfx.h Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
intermission.cpp Added CHANCE macro to replace difficult-to-read special rand() uses. 2016-01-05 06:59:37 -05:00
intermission.h More cleanup. 2016-01-02 16:59:48 -05:00
loadSave.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
loadSave.h More cleanup. 2016-01-02 16:59:48 -05:00
messages.cpp Renamed "FACE_" enum values to "FS_". 2016-01-04 09:07:30 -05:00
messages.h More cleanup. 2016-01-02 16:59:48 -05:00
misc.cpp Renamed "FACE_" enum values to "FS_". 2016-01-04 09:07:30 -05:00
misc.h Moved face sprites to their own array. 2016-01-04 09:01:54 -05:00
missions.cpp NONE -> M_NONE 2016-01-05 07:07:04 -05:00
missions.h More cleanup. 2016-01-02 16:59:48 -05:00
player.cpp Moved the ship image definitions to C code. 2016-01-04 16:34:29 -05:00
player.h More cleanup. 2016-01-02 16:59:48 -05:00
renderer.cpp More cleanup. 2016-01-02 16:59:48 -05:00
renderer.h More cleanup. 2016-01-02 16:59:48 -05:00
resources.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
resources.h More cleanup. 2016-01-02 16:59:48 -05:00
screen.cpp Some cleanup I forgot to do in gfx.cpp. 2016-01-03 22:39:16 -05:00
screen.h More cleanup. 2016-01-02 16:59:48 -05:00
ship.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
ship.h More cleanup. 2016-01-02 16:59:48 -05:00
shop.cpp Removed more magic numbers. 2016-01-05 06:44:26 -05:00
shop.h More cleanup. 2016-01-02 16:59:48 -05:00
structs.h Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
title.cpp Some cleanup I forgot to do in gfx.cpp. 2016-01-03 22:39:16 -05:00
title.h More cleanup. 2016-01-02 16:59:48 -05:00
weapons.cpp Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
weapons.h Fixed more magic numbers. 2016-01-05 22:12:29 -05:00
window.cpp More cleanup. 2016-01-02 16:59:48 -05:00
window.h More cleanup. 2016-01-02 16:59:48 -05:00