diff options
Diffstat (limited to 'text_file_functions.cpp')
| -rw-r--r-- | text_file_functions.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/text_file_functions.cpp b/text_file_functions.cpp index 5b057a4b..a6ad4f76 100644 --- a/text_file_functions.cpp +++ b/text_file_functions.cpp @@ -360,6 +360,22 @@ QString AOApplication::get_sfx_suffix(QString sound_to_check) return sound_to_check + ".wav"; } +QString AOApplication::get_image_suffix(QString path_to_check) +{ + QString apng_check = path_to_check + ".apng"; + QString gif_check = path_to_check + ".gif"; + if(file_exists(apng_check)) + { + return path_to_check + ".apng"; + } + if(file_exists(gif_check)) + { + return path_to_check + ".gif"; + } + return path_to_check + ".gif"; +} + + //returns whatever is to the right of "search_line =" within target_tag and terminator_tag, trimmed //returns the empty string if the search line couldnt be found QString AOApplication::read_char_ini(QString p_char, QString p_search_line, QString target_tag, QString terminator_tag) |
