diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-15 17:44:47 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-15 17:44:47 +0300 |
| commit | e94640b3493700a266619388d75dac5e56b3189a (patch) | |
| tree | b24b8f976d40b64a8e0da04ebd5c3bc78017bdc4 /src/aocharmovie.cpp | |
| parent | a2f9df4042585ab0849b54e2bb0b9699f9064aed (diff) | |
Looping SFX system - Defined this way:
[SoundL]
sfx-roar = 1
Diffstat (limited to 'src/aocharmovie.cpp')
| -rw-r--r-- | src/aocharmovie.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp index efe24735..d67cf98e 100644 --- a/src/aocharmovie.cpp +++ b/src/aocharmovie.cpp @@ -67,26 +67,34 @@ void AOCharMovie::load_image(QString p_char, QString p_emote, QString emote_pref movie_effects.resize(max_frames); for (int e_frame = 0; e_frame < max_frames; ++e_frame) { +#ifdef DEBUG_CHARMOVIE qDebug() << p_char << p_emote << e_frame; +#endif QString effect = ao_app->get_screenshake_frame(p_char, emote_prefix + p_emote, e_frame); if (effect != "") { movie_effects[e_frame].append("shake"); +#ifdef DEBUG_CHARMOVIE qDebug() << e_frame << "shake"; +#endif } effect = ao_app->get_flash_frame(p_char, emote_prefix + p_emote, e_frame); if (effect != "") { movie_effects[e_frame].append("flash"); +#ifdef DEBUG_CHARMOVIE qDebug() << e_frame << "flash"; +#endif } effect = ao_app->get_sfx_frame(p_char, emote_prefix + p_emote, e_frame); if (effect != "") { movie_effects[e_frame].append("sfx^"+effect); +#ifdef DEBUG_CHARMOVIE qDebug() << e_frame << effect; +#endif } } #ifdef DEBUG_CHARMOVIE @@ -138,20 +146,26 @@ void AOCharMovie::play_frame_effect(int frame) if(effect == "shake") { shake(); +#ifdef DEBUG_CHARMOVIE qDebug() << "Attempting to play shake on frame" << frame; +#endif } if(effect == "flash") { flash(); +#ifdef DEBUG_CHARMOVIE qDebug() << "Attempting to play flash on frame" << frame; +#endif } if(effect.startsWith("sfx^")) { QString sfx = effect.section("^", 1); play_sfx(sfx); +#ifdef DEBUG_CHARMOVIE qDebug() << "Attempting to play sfx" << sfx << "on frame" << frame; +#endif } } } |
