diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-10 21:57:06 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-10 21:57:06 +0300 |
| commit | 73782055237ee8948b26935348e8ca2b8a71a95a (patch) | |
| tree | 23bb2cdb6f994deab925d7337c7a0f94fd54fcf5 /src/courtroom.cpp | |
| parent | 961563daf3af7fd0167b281ed101d11c67a4eaf7 (diff) | |
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
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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"; |
