From d2c0c4fa0dfdef2534fcc0826f8c36bc4568a631 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 22 Apr 2021 19:02:07 +0300 Subject: [PATCH 1/3] Fix charlayer regression not allowing us to *directly* refer to an emote we want to use with a file path (base/misc/blank for example) Actually use the helper funcs for searching images instead of reimplementing the same thing --- src/aolayer.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/aolayer.cpp b/src/aolayer.cpp index e4db75a..ccf2d63 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -197,20 +197,20 @@ void CharLayer::load_image(QString p_filename, QString p_charname, << " continuous: " << continuous; #endif QStringList pathlist = { - ao_app->get_image_suffix(ao_app->get_character_path( - p_charname, prefix + current_emote)), // Default path - ao_app->get_image_suffix(ao_app->get_character_path( + current_emote, // The path by itself + ao_app->get_character_path( + p_charname, prefix + current_emote), // Default path + ao_app->get_character_path( p_charname, - prefix + "/" + current_emote)), // Path check if it's categorized + prefix + "/" + current_emote), // Path check if it's categorized // into a folder - ao_app->get_image_suffix(ao_app->get_character_path( + ao_app->get_character_path( p_charname, - current_emote)), // Just use the non-prefixed image, animated or not - ao_app->get_image_suffix( - ao_app->get_theme_path("placeholder")), // Theme placeholder path - ao_app->get_image_suffix(ao_app->get_theme_path( - "placeholder", ao_app->default_theme))}; // Default theme placeholder path - start_playback(find_image(pathlist)); + current_emote), // Just use the non-prefixed image, animated or not + ao_app->get_theme_path("placeholder"), // Theme placeholder path + ao_app->get_theme_path( + "placeholder", ao_app->default_theme)}; // Default theme placeholder path + start_playback(ao_app->get_image_path(pathlist)); } void SplashLayer::load_image(QString p_filename, QString p_charname, From d3e5cb933cd91d5393943ab3385bac0fc233cdc9 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 22 Apr 2021 19:09:44 +0300 Subject: [PATCH 2/3] Charlayer - only check for direct path after the previous checks fail but before missingno --- src/aolayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aolayer.cpp b/src/aolayer.cpp index ccf2d63..795274f 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -197,7 +197,6 @@ void CharLayer::load_image(QString p_filename, QString p_charname, << " continuous: " << continuous; #endif QStringList pathlist = { - current_emote, // The path by itself ao_app->get_character_path( p_charname, prefix + current_emote), // Default path ao_app->get_character_path( @@ -207,6 +206,7 @@ void CharLayer::load_image(QString p_filename, QString p_charname, ao_app->get_character_path( p_charname, current_emote), // Just use the non-prefixed image, animated or not + current_emote, // The path by itself after the above fail ao_app->get_theme_path("placeholder"), // Theme placeholder path ao_app->get_theme_path( "placeholder", ao_app->default_theme)}; // Default theme placeholder path From 2c259a6337c66eb5900d2c46534c75e9d77586c1 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 22 Apr 2021 19:11:39 +0300 Subject: [PATCH 3/3] Do the same as previous commit for the get_asset_paths func - only check for the direct file path before missingno --- src/path_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path_functions.cpp b/src/path_functions.cpp index 5107349..79851c1 100644 --- a/src/path_functions.cpp +++ b/src/path_functions.cpp @@ -105,7 +105,6 @@ QString AOApplication::get_evidence_path(QString p_file) QStringList AOApplication::get_asset_paths(QString p_element, QString p_theme, QString p_subtheme, QString p_default_theme, QString p_misc, QString p_character, QString p_placeholder) { QStringList pathlist; - pathlist += p_element; // The path by itself if (p_character != "") pathlist += get_character_path(p_character, p_element); // Character folder if (p_misc != "" && p_theme != "" && p_subtheme != "") @@ -120,6 +119,7 @@ QStringList AOApplication::get_asset_paths(QString p_element, QString p_theme, Q pathlist += get_theme_path(p_element, p_theme); // Theme path if (p_default_theme != "") pathlist += get_theme_path(p_element, p_default_theme); // Default theme path + pathlist += p_element; // The path by itself if (p_placeholder != "" && p_theme != "") pathlist += get_theme_path(p_placeholder, p_theme); // Placeholder path if (p_placeholder != "" && p_default_theme != "")