diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-19 21:07:50 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-19 21:07:50 -0400 |
commit | 514b240348a7c401fa6725ae74540d5f3ee29cfb (patch) | |
tree | 6c4dd02b3aacc1bf57f8e4c2b2b46ed34fa73fdd /src/muxer.cpp | |
parent | 5c92093bd82b54e79c63937cb0dbefabc5f47624 (diff) | |
download | ether-514b240348a7c401fa6725ae74540d5f3ee29cfb.tar.gz ether-514b240348a7c401fa6725ae74540d5f3ee29cfb.tar.bz2 ether-514b240348a7c401fa6725ae74540d5f3ee29cfb.zip |
added fade in to new game
and fixed music on new game
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: { |