summary refs log tree commit diff stats
path: root/src/muxer.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-19 21:07:50 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-19 21:07:50 -0400
commit514b240348a7c401fa6725ae74540d5f3ee29cfb (patch)
tree6c4dd02b3aacc1bf57f8e4c2b2b46ed34fa73fdd /src/muxer.cpp
parent5c92093bd82b54e79c63937cb0dbefabc5f47624 (diff)
downloadether-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.cpp14
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
36void Muxer::setPlayerLoc(int x, int y) { 31void Muxer::setPlayerLoc(int x, int y) {
@@ -96,6 +91,15 @@ void Muxer::setMusicLevel(int level) {
96 } 91 }
97} 92}
98 93
94void 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
99void Muxer::stopMusic() { 103void Muxer::stopMusic() {
100 switch (transition_state_) { 104 switch (transition_state_) {
101 case TransitionState::Pre: { 105 case TransitionState::Pre: {