-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
organize all available statetype variables in a states[] array #17
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This replaces the current relying on a specific order in which global variables are stored in the executable for e.g. saving and restoring of savegames and thus does not require the -fno-toplevel-reorder compiler flag anymore. Fixes #15.
turol
reviewed
Jul 8, 2020
extern void T_UShoot (objtype *); | ||
extern void T_Will (objtype *); | ||
|
||
statetype states[numstates] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the moment it is const
, yes. But once I will tackle #13, sprite numbers will have to get shuffled around.
There is currently no other way to "unload" the savegame.
fabiangreffrath
added a commit
that referenced
this pull request
Jul 14, 2020
* fix all compiler warnings, pt 1 * fix all compiler warnings, pt 2 * fix all compiler warnings, pt 3 * fix all cppcheck warnings * fix all compiler warnings, pt 4 * add Travis CI * git update-index --chmod=+x ./.travis.sh * switch Travis CI template to C++ * fix ignoring return value of read() * fix ignoring return value of read(), pt 2 * fix ignoring return value of fread(), pt 1 * fix output between x and y bytes into a destination of size z * remove license-mame.txt, we are not using code under this license anymore * organize all available statetype variables in a states[] array (#17) * organize all available statetype variables in a states[] array This replaces the current relying on a specific order in which global variables are stored in the executable for e.g. saving and restoring of savegames and thus does not require the -fno-toplevel-reorder compiler flag anymore. Fixes #15. * add the files containing the states[] array * simplify pointer arithmetics in SaveTheGame()/LoadTheGame() * display a message and quit the game when an invalid savegame is loaded There is currently no other way to "unload" the savegame. * back to main menu on failure instead of quitting * add copyright headers to newly added files * prevent crashes for subsequent games when loading invalid savegame * add some minimalistic comments * fix all compiler warnings, pt 1 * fix all compiler warnings, pt 2 * fix all compiler warnings, pt 3 * fix all cppcheck warnings * fix all compiler warnings, pt 4 * add Travis CI * git update-index --chmod=+x ./.travis.sh * switch Travis CI template to C++ * fix ignoring return value of read() * fix ignoring return value of read(), pt 2 * fix ignoring return value of fread(), pt 1 * fix output between x and y bytes into a destination of size z * unbreak rebase breakage * fix some more "ignoring return value of read()/write()/fread()" warnings * fix "ignoring return value of read()" in wl_menu.cpp * fix some misc errors * fix SOD compilation * fix "the current #pragma pack aligment value is modified" warning with clang++ * let Travis CI build 6 separate binaries * include wl_def.h in dosbox/dbopl.cpp instead of setting "#pragma pack()" there
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces the current relying on a specific order in which global variables
are stored in the executable for e.g. saving and restoring of savegames and thus
does not require the -fno-toplevel-reorder compiler flag anymore.
Fixes #15.