Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upMOHAWK: MYST: Make Dini/Atrus endings an enum #1169
Merged
Conversation
engines/mohawk/myst_state.h
Outdated
| @@ -86,6 +86,15 @@ enum ActiveAge { | |||
| kAchenarEnding = 10 | |||
| }; | |||
|
|
|||
| // Various states that Atrus can be in when in Dini | |||
| enum DiniEnding { | |||
This comment has been minimized.
This comment has been minimized.
Deledrius
Apr 27, 2018
Contributor
Typo. The location is called D'ni, not Dini. DniEnding would be sufficiently readable.
|
Good catch I made that change as well as a previously commited Dini usage in ActiveAge (kDini->kDni). |
engines/mohawk/myst_state.h
Outdated
| kMystStart = 7, | ||
| kCredits = 8, | ||
| kSirrusEnding = 9, | ||
| kAchenarEnding = 10 | ||
| }; | ||
|
|
||
| // Various states that Atrus can be in when in Dni | ||
| enum DniEnding { | ||
| kAtrusWantsPage = 1, // Player is in Dni with the white page |
This comment has been minimized.
This comment has been minimized.
The global variable "ending" tracks various states that Atrus can be in. This variable determines what video of Atrus will be playing and if the brother books have been destroyed. Despite this variable being called ending there are other endings not captured by this variable (like the brother endings). Also change spelling of Dini to Dni for one usage of ActiveAge from a previous commit.
|
Done. I'm guessing _globals.ending was set to 0 (its first state) originally through the memset in MystGameState. Now I have explicitly set it to its first state (kDniNotVisited) as well as _globals.heldPage = kNoPage; in the MystGameState constructor. |
|
All good, thanks! |
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.
dafioram commentedApr 26, 2018
The global variable "ending" tracks various
states that Atrus can be in.
This variable determines what video of
Atrus will be playing and if the brother
books have been destroyed.
Despite this variable being called ending
there are other endings not captured by
this variable (like the brother endings).
Additionally, the enum could also be called DiniState.
I originally had the 4rth enum called kAtrusReturns since that state is also associated with him returning, but because of it usage in places like Myst::toggleVar were the brother book states were being checked it made sense to give it the kBooksDestroyed name. So I could have a 5th enum value that is called kAtrusReturns and just map that to kBooksDestroyed so that when it is more clear to use one form, kAtrusReturns in Dini, and, kBooksDestroyed in the myst library.