diff options
Diffstat (limited to 'src/muxer.cpp')
-rw-r--r-- | src/muxer.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/muxer.cpp b/src/muxer.cpp index c93c45a..6ae6936 100644 --- a/src/muxer.cpp +++ b/src/muxer.cpp | |||
@@ -26,11 +26,6 @@ Muxer::Muxer() { | |||
26 | 26 | ||
27 | FMOD::Studio::Bank* stringsBank = nullptr; | 27 | FMOD::Studio::Bank* stringsBank = nullptr; |
28 | ERRCHECK(system_->loadBankFile("../res/fmod/Build/Desktop/Master Bank.strings.bank", FMOD_STUDIO_LOAD_BANK_NORMAL, &stringsBank)); | 28 | ERRCHECK(system_->loadBankFile("../res/fmod/Build/Desktop/Master Bank.strings.bank", FMOD_STUDIO_LOAD_BANK_NORMAL, &stringsBank)); |
29 | |||
30 | FMOD::Studio::EventDescription* exploration_desc = nullptr; | ||
31 | ERRCHECK(system_->getEvent("event:/exploration", &exploration_desc)); | ||
32 | ERRCHECK(exploration_desc->createInstance(&exploration_event_)); | ||
33 | ERRCHECK(exploration_event_->start()); | ||
34 | } | 29 | } |
35 | 30 | ||
36 | void Muxer::setPlayerLoc(int x, int y) { | 31 | void Muxer::setPlayerLoc(int x, int y) { |
@@ -96,6 +91,15 @@ void Muxer::setMusicLevel(int level) { | |||
96 | } | 91 | } |
97 | } | 92 | } |
98 | 93 | ||
94 | void Muxer::startMusic() { | ||
95 | FMOD::Studio::EventDescription* exploration_desc = nullptr; | ||
96 | ERRCHECK(system_->getEvent("event:/exploration", &exploration_desc)); | ||
97 | ERRCHECK(exploration_desc->createInstance(&exploration_event_)); | ||
98 | ERRCHECK(exploration_event_->start()); | ||
99 | |||
100 | transition_state_ = TransitionState::Pre; | ||
101 | } | ||
102 | |||
99 | void Muxer::stopMusic() { | 103 | void Muxer::stopMusic() { |
100 | switch (transition_state_) { | 104 | switch (transition_state_) { |
101 | case TransitionState::Pre: { | 105 | case TransitionState::Pre: { |