Only dying with 0 lifes left should cause a gameover.
That behaviour has unintentionally changed with this commit: 14ef066d14
Beware of prefix/postfix operators, @makise-homura!
Removed the compile-time option. Instead, added a new keybinding that toggles god mode (default: q), only usable if built with DEBUG. This makes toggling god mode much more convenient and makes replays consistent between release and debug builds
* Score is now preserved between stages in story mode as it was intended
* Score given for shooting enemies is now based on the projectile damage
* Some score is also given for shooting the boss, also based on the projectile damage
* Score given for grazing has been increased substantially
* Grazing range has been increased
* The graze counter is now reset between stages
All events are now stored at the end of the file, after the metadata of all stages.
It's now possible to load a replay partially to examine the metadata, and optionally load the input events later if needed.
This is not used yet. The replay menu code will be updated to make use of this feature soon.
Player power is now internally an integer. There is no good reason to use floating point math there. Stored as an uint16 in replays.
Player coordinates are now floored when a stage starts. This is unnoticable to the player. Stored as a pair of uint16s in replays.
Looks like some sdl2main magic is overriding this, so we don't get a console window anyway.
Still, I made the effect of that option the default: the WIN32 flag is no longer passed to add_executable()
This means -mwindows won't be passed to the compiler when linking. That option is effectively useless in our case, and some compilers/linkers do not support it.
For example wclang, a clang wrapper that can be used as a drop-in replacement for mingw64's gcc, will try to fallback to gcc for linking when it encounters that option.
See previous commit as for why. Note that this slightly changes the processing order, unlike the previous change, so any replays recorded prior to this commit will desync. The new behaviour, however, should be slightly more correct.
There was a piece of code in the Scythe drawing function that altered the game state. I hope I don't have to explain why that is a vector for bugs in general, but in particular, this always breaks replays in frameskip mode.
I've also moved the BGM handling from stage_draw to stage_logic for similar reasons.