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

JADE: Play background music on main menu #272

Closed
wants to merge 1 commit into from

Conversation

dressupgeekout
Copy link
Contributor

I mean, it works, I dunno :}

@DrMcCoy
Copy link
Member

DrMcCoy commented May 28, 2018

Hmm, could you rather save that ChannelHandle and use SoundMan.stopChannel()? Put this into their own methods, playMenuMusic() and stopMenuMusic() too, please.

I.e. similar to how KotOR does it: https://github.com/xoreos/xoreos/blob/master/src/engines/kotor/game.cpp#L105

@dressupgeekout
Copy link
Contributor Author

Oh heh that's definitely cleaner.

@dressupgeekout
Copy link
Contributor Author

OK let's try this. I decided that Jade::Game::playMenuMusic() shouldn't accept a parameter to let the caller decide which menu music to play, because, unlike KOTOR, there's only one menu music (even during character creation and stuff like that)

Copy link
Member

@DrMcCoy DrMcCoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, in principle what I imagined, but two minor style issue. Please fix :)

@@ -100,6 +102,17 @@ void Game::runModule() {
_module->clear();
}

void Game::playMenuMusic()
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That opening brace needs to go into the previous line, please.

}

void Game::stopMenuMusic()
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too

@dressupgeekout
Copy link
Contributor Author

OK, here we go

@DrMcCoy
Copy link
Member

DrMcCoy commented May 28, 2018

Merged as b9555a1, thanks! :)

@DrMcCoy DrMcCoy closed this May 28, 2018
@dressupgeekout dressupgeekout deleted the jade_music branch May 29, 2018 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants