From 73782055237ee8948b26935348e8ca2b8a71a95a Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 10 Sep 2019 21:57:06 +0300 Subject: Expand .apng and .webp support for get_image_suffix Add get_image_suffix for all .gif's so that all animated pieces can be .webp or .apng instead Expand on .webp .apng support and clean up the code somewhat --- src/courtroom.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/courtroom.cpp') diff --git a/src/courtroom.cpp b/src/courtroom.cpp index a1714163..cc69a1ee 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -909,7 +909,8 @@ void Courtroom::enter_courtroom(int p_cid) if (ao_app->custom_objection_enabled && (file_exists(ao_app->get_character_path(current_char, "custom.gif")) || - file_exists(ao_app->get_character_path(current_char, "custom.apng"))) && + file_exists(ao_app->get_character_path(current_char, "custom.apng")) || + file_exists(ao_app->get_character_path(current_char, "custom.webp"))) && file_exists(ao_app->get_character_path(current_char, "custom.wav"))) ui_custom_objection->show(); else @@ -2409,13 +2410,17 @@ void Courtroom::set_scene() f_desk_image = "prohelperdesk"; } else if (f_side == "jur" && (file_exists(ao_app->get_background_path("jurystand.png")) || - file_exists(ao_app->get_background_path("jurystand.gif")))) + file_exists(ao_app->get_background_path("jurystand.gif")) || + file_exists(ao_app->get_background_path("jurystand.apng")) || + file_exists(ao_app->get_background_path("jurystand.webp")))) { f_background = "jurystand"; f_desk_image = "jurydesk"; } else if (f_side == "sea" && (file_exists(ao_app->get_background_path("seancestand.png")) || - file_exists(ao_app->get_background_path("seancestand.gif")))) + file_exists(ao_app->get_background_path("seancestand.gif")) || + file_exists(ao_app->get_background_path("seancestand.apng")) || + file_exists(ao_app->get_background_path("seancestand.webp")))) { f_background = "seancestand"; f_desk_image = "seancedesk"; -- cgit