diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-12-05 22:46:26 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-12-05 22:46:26 +0300 |
| commit | eb014a97785db4a196d41fb38ee61612a54e0f6e (patch) | |
| tree | 5b4ffab854baa211e13a2a11f1587b8e69528f8d /src/courtroom.cpp | |
| parent | 07763c5ac0914d1255c4b28b29f14825ac810282 (diff) | |
Add a message delay modifier when punctuation is reached to simulate Ace Attorney 1 chat parsing (replicating the effect where characters would make a short pause, as if saying the line out loud)
TODO: Make this a configurable thing
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 0695fe7c..f4f513a2 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2638,6 +2638,7 @@ void Courtroom::chat_tick() } else { + int msg_delay = message_display_speed[current_display_speed]; //Do the colors, gradual showing, etc. in here ui_vp_message->setHtml(additive_previous + filter_ic_text(f_message, true, tick_pos, m_chatmessage[TEXT_COLOR].toInt())); @@ -2667,6 +2668,12 @@ void Courtroom::chat_tick() ++blip_ticker; } + //Punctuation delayer + if (punctuation_chars.contains(f_character)) + { + msg_delay *= punctuation_modifier; + } + //If this color is talking if (color_is_talking && anim_state != 2 && anim_state < 4) //Set it to talking as we're not on that already (though we have to avoid interrupting a non-interrupted preanim) { @@ -2681,7 +2688,7 @@ void Courtroom::chat_tick() anim_state = 3; } //Continue ticking - chat_tick_timer->start(message_display_speed[current_display_speed]); + chat_tick_timer->start(msg_delay); } } |
