diff options
| author | iamgoofball <iamgoofball@gmail.com> | 2019-01-21 15:45:51 -0800 |
|---|---|---|
| committer | iamgoofball <iamgoofball@gmail.com> | 2019-01-21 15:45:51 -0800 |
| commit | a7a614482e379ad13f8e0ca1e7f3e31c33bb1c21 (patch) | |
| tree | f3c938a31e9697183ab5fd0c43567f4a1c6a331a /src/aocharmovie.cpp | |
| parent | debd386a7176327d481470621a7a3a65cd715f2e (diff) | |
final commit
Diffstat (limited to 'src/aocharmovie.cpp')
| -rw-r--r-- | src/aocharmovie.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp index cbf9b79f..3d650551 100644 --- a/src/aocharmovie.cpp +++ b/src/aocharmovie.cpp @@ -18,6 +18,7 @@ AOCharMovie::AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_ void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix) { + apng = false; QString original_path = ao_app->get_character_path(p_char, emote_prefix + p_emote + ".gif"); QString alt_path = ao_app->get_character_path(p_char, emote_prefix + p_emote + ".png"); QString apng_path = ao_app->get_character_path(p_char, emote_prefix + p_emote + ".apng"); @@ -27,7 +28,10 @@ void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix) current_emote = emote_prefix + p_emote; current_char = p_char; if (file_exists(apng_path)) + { gif_path = apng_path; + apng = true; + } else if (file_exists(original_path)) gif_path = original_path; else if (file_exists(alt_path)) @@ -145,6 +149,9 @@ void AOCharMovie::sfx_two_network_boogaloo() void AOCharMovie::movie_ticker() { + if(apng){ + ticker->start(m_movie->nextFrameDelay()); + } if(m_movie->currentFrameNumber() == m_movie->frameCount() - 1) { delete m_movie; @@ -165,10 +172,10 @@ void AOCharMovie::movie_ticker() this->LoadImageWithStupidMethodForFlipSupport(m_movie->currentImage()); // imagine if QT had sane stuff like "mirror on QMovie" or "resize the image on QT" or "interface with the current QMovie image" or anything else // ps: fuck private functions/variables as a concept, freedom 2 do dangerous things 5ever this->play_frame_sfx(); - qDebug() << "Current frame number: " << m_movie->currentFrameNumber(); - qDebug() << "Frames Left: " << m_movie->frameCount() - 1; - qDebug() << "Frame Delay: " << m_movie->nextFrameDelay(); - ticker->start(m_movie->nextFrameDelay()); + if(!apng){ + ticker->start(m_movie->nextFrameDelay()); + } + } void AOCharMovie::LoadImageWithStupidMethodForFlipSupport(QImage image) |
