From 303b3fae53227446f683909bbf13edc6b2f1450b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 12 Feb 2021 00:59:10 -0500 Subject: Added sfx for selecting message choices --- res/sfx/left_selection.wav | Bin 0 -> 55880 bytes res/sfx/right_selection.wav | Bin 0 -> 54056 bytes src/message_system.cpp | 8 ++++++++ 3 files changed, 8 insertions(+) create mode 100644 res/sfx/left_selection.wav create mode 100644 res/sfx/right_selection.wav diff --git a/res/sfx/left_selection.wav b/res/sfx/left_selection.wav new file mode 100644 index 0000000..ce7c0bb Binary files /dev/null and b/res/sfx/left_selection.wav differ diff --git a/res/sfx/right_selection.wav b/res/sfx/right_selection.wav new file mode 100644 index 0000000..faff212 Binary files /dev/null and b/res/sfx/right_selection.wav differ diff --git a/src/message_system.cpp b/src/message_system.cpp index 98b5f83..32ee847 100644 --- a/src/message_system.cpp +++ b/src/message_system.cpp @@ -236,6 +236,14 @@ void MessageSystem::advanceText() { showNextArrow_ = false; if (lines_.empty()) { + if (isChoiceActive()) { + if (choiceSelection_ == 0) { + game_.getMixer().playSound("../res/sfx/left_selection.wav"); + } else { + game_.getMixer().playSound("../res/sfx/right_selection.wav"); + } + } + linesToShow_.clear(); } else { game_.getMixer().playSound("../res/sfx/pageflip.wav"); -- cgit 1.4.1