MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / ExtractUserTextures

Function ExtractUserTextures

src/TexturePack.c:617–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615#endif
616
617static cc_result ExtractUserTextures(void) {
618 const char* default_path;
619 cc_string path;
620 cc_result res;
621
622 /* TODO: Log error for multiple default texture pack extract failure */
623 res = TexturePack_ExtractDefault(ExtractFromFile, &default_path);
624 /* Game shows a warning dialog if default textures are missing */
625 TexturePack_DefaultMissing = res == ReturnCode_FileNotFound;
626
627 path = TexturePack_Path;
628 if (default_path && String_CaselessEqualsConst(&path, default_path)) return res;
629 if (Game_ClassicMode || path.length == 0) return res;
630
631 /* override default textures with user's selected texture pack */
632 return ExtractFromFile(&path);
633}
634
635static cc_bool usingDefault;
636cc_result TexturePack_ExtractCurrent(cc_bool forceReload) {

Callers 1

Calls 3

ExtractFromFileFunction · 0.85

Tested by

no test coverage detected