Skip to content
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

MOHAWK: MYST: Make Dini/Atrus endings an enum #1169

Merged
merged 1 commit into from Apr 27, 2018
Merged

Conversation

@dafioram
Copy link
Member

dafioram commented Apr 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.

@@ -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.

Copy link
@Deledrius

Deledrius Apr 27, 2018

Contributor

Typo. The location is called D'ni, not Dini. DniEnding would be sufficiently readable.

@dafioram dafioram force-pushed the dafioram:mystEndingEnum branch from 150832f to 1000b03 Apr 27, 2018
@dafioram
Copy link
Member Author

dafioram commented Apr 27, 2018

Good catch I made that change as well as a previously commited Dini usage in ActiveAge (kDini->kDni).

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.

Copy link
@bgK

bgK Apr 27, 2018

Member

Value 0 used when the played has not yet entered K'veer is missing.

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.
@dafioram dafioram force-pushed the dafioram:mystEndingEnum branch from 1000b03 to 09b5031 Apr 27, 2018
@dafioram
Copy link
Member Author

dafioram commented Apr 27, 2018

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.

@bgK bgK merged commit 52e247e into scummvm:master Apr 27, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bgK
Copy link
Member

bgK commented Apr 27, 2018

All good, thanks!

@dafioram dafioram deleted the dafioram:mystEndingEnum branch Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.