diff options
Diffstat (limited to 'src/message_system.cpp')
-rw-r--r-- | src/message_system.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/message_system.cpp b/src/message_system.cpp index 08ef799..0b0d53e 100644 --- a/src/message_system.cpp +++ b/src/message_system.cpp | |||
@@ -3,7 +3,7 @@ | |||
3 | #include "util.h" | 3 | #include "util.h" |
4 | 4 | ||
5 | const int CHARS_TO_REVEAL = 1; | 5 | const int CHARS_TO_REVEAL = 1; |
6 | const int CHARS_PER_BEEP = 10; | 6 | const int CHARS_PER_BEEP = 8; |
7 | 7 | ||
8 | void MessageSystem::tick(double dt) { | 8 | void MessageSystem::tick(double dt) { |
9 | if (barsState_ == BarsState::Opening || barsState_ == BarsState::Closing) { | 9 | if (barsState_ == BarsState::Opening || barsState_ == BarsState::Closing) { |
@@ -59,6 +59,27 @@ void MessageSystem::tick(double dt) { | |||
59 | 59 | ||
60 | linesToShow_.push_back(MessageLine { .text = lines_.front() }); | 60 | linesToShow_.push_back(MessageLine { .text = lines_.front() }); |
61 | lines_.pop_front(); | 61 | lines_.pop_front(); |
62 | } else { | ||
63 | showNextArrow_ = true; | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | |||
68 | if (showNextArrow_) { | ||
69 | nextArrowBobTimer_.accumulate(dt); | ||
70 | while (nextArrowBobTimer_.step()) { | ||
71 | if (nextArrowBobDown_) { | ||
72 | nextArrowBobPos_++; | ||
73 | |||
74 | if (nextArrowBobPos_ >= 4) { | ||
75 | nextArrowBobDown_ = false; | ||
76 | } | ||
77 | } else { | ||
78 | nextArrowBobPos_--; | ||
79 | |||
80 | if (nextArrowBobPos_ <= 0) { | ||
81 | nextArrowBobDown_ = true; | ||
82 | } | ||
62 | } | 83 | } |
63 | } | 84 | } |
64 | } | 85 | } |
@@ -172,6 +193,7 @@ void MessageSystem::advanceText() { | |||
172 | } | 193 | } |
173 | 194 | ||
174 | lines_.pop_front(); | 195 | lines_.pop_front(); |
196 | showNextArrow_ = false; | ||
175 | 197 | ||
176 | if (lines_.empty()) { | 198 | if (lines_.empty()) { |
177 | linesToShow_.clear(); | 199 | linesToShow_.clear(); |