From 5063880530c98d17e6d15a888f7c4a8462351e52 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 16 Feb 2021 11:04:07 +0300 Subject: Patch a segfault by play_frame_effect being wacky Split behavior for courtroom resizing into its own function Use that function to optimize character changing screen Fix reload theme breaking the background positioning Fix changing character breaking the background positioning Fix excessive set_widgets() calls that caused unnecessary lag Fix unnecessary set_size_and_pos calls that didn't need to be there Only call size_and_pos on the chatbox in the initialize_chatbox func Remove checks for a boolean that will always be true Simplify two functions that copy-paste code called set_size_and_pos into a single one Fix "disable custom chat" setting not being used when setting chat sizes and pos --- src/aolayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/aolayer.cpp') diff --git a/src/aolayer.cpp b/src/aolayer.cpp index e7664950..8d2c7960 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -450,6 +450,10 @@ void CharLayer::load_network_effects() void CharLayer::play_frame_effect(int p_frame) { + if (p_frame >= movie_effects.size()) { + qDebug() << "W: Attempted to play a frame effect bigger than the size of movie_effects"; + return; + } if (p_frame < max_frames) { foreach (QString effect, movie_effects[p_frame]) { if (effect == "shake") { -- cgit From 63128fea1362b0fe2388ff0b85b9f1120806b332 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 16 Feb 2021 11:20:54 +0300 Subject: Stop supporting the DRO way (we will make a .bat file or utility that does it for you automatically instead!) Add an option to enable/disable stickers Make stickers actually respect the custom chatbox setting properly --- src/aolayer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/aolayer.cpp') diff --git a/src/aolayer.cpp b/src/aolayer.cpp index 8d2c7960..e2a1f075 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -240,12 +240,11 @@ void InterfaceLayer::load_image(QString p_filename, QString p_miscname) void StickerLayer::load_image(QString p_charname) { - QString p_miscname = ao_app->get_chat(p_charname); + QString p_miscname; + if (ao_app->is_customchat_enabled()) + p_miscname = ao_app->get_chat(p_charname); transform_mode = ao_app->get_misc_scaling(p_miscname); QString final_image = ao_app->get_image("sticker/" + p_charname, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_miscname); - if (!file_exists((final_image))) - final_image = ao_app->get_image_suffix( - ao_app->get_character_path(p_charname, "showname")), // Scuffed DRO way start_playback(final_image); } -- cgit From f1aa57b1253ed267c1cab3c32a1ffc38ad29e854 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Sat, 20 Feb 2021 04:10:35 -0600 Subject: fix speedlines never being unhidden --- src/aolayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/aolayer.cpp') diff --git a/src/aolayer.cpp b/src/aolayer.cpp index e2a1f075..0488364f 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -260,7 +260,8 @@ void CharLayer::start_playback(QString p_image) void AOLayer::start_playback(QString p_image) { - + this->show(); + if (!ao_app->is_continuous_enabled()) { continuous = false; force_continuous = true; @@ -321,7 +322,6 @@ void AOLayer::start_playback(QString p_image) int f_delay = m_reader.nextImageDelay(); this->set_frame(f_pixmap); - this->show(); if (max_frames > 1) { movie_frames.append(f_pixmap); movie_delays.append(f_delay); -- cgit From 0ee6888dec0bc653468a9a24896e20d5de69ba06 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Sat, 20 Feb 2021 04:30:09 -0600 Subject: prevent static preanims from playing --- src/aolayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/aolayer.cpp') diff --git a/src/aolayer.cpp b/src/aolayer.cpp index 0488364f..f0d5779e 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -261,7 +261,7 @@ void CharLayer::start_playback(QString p_image) void AOLayer::start_playback(QString p_image) { this->show(); - + if (!ao_app->is_continuous_enabled()) { continuous = false; force_continuous = true; -- cgit