| 898 | } |
| 899 | |
| 900 | static cc_result ClassicPatcher_ProcessEntry(const cc_string* path, struct Stream* data, struct ZipEntry* source) { |
| 901 | static const cc_string guiClassicPng = String_FromConst("gui_classic.png"); |
| 902 | struct ResourceZipEntry* e; |
| 903 | cc_string name; |
| 904 | |
| 905 | name = *path; |
| 906 | Utils_UNSAFE_GetFilename(&name); |
| 907 | if (String_CaselessEqualsConst(&name, "gui.png")) name = guiClassicPng; |
| 908 | |
| 909 | e = ZipEntries_Find(&name); |
| 910 | |
| 911 | /* terrain.png requires special handling */ |
| 912 | if (String_CaselessEqualsConst(path, "terrain.png")) { |
| 913 | return Png_Decode(&e->value.bmp, data); |
| 914 | } |
| 915 | return ZipEntry_ExtractData(e, data, source); |
| 916 | } |
| 917 | |
| 918 | static cc_result ClassicPatcher_ExtractFiles(struct HttpRequest* req) { |
| 919 | struct Stream src; |
nothing calls this directly
no test coverage detected