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

Function TexturePack_ExtractDefault

src/TexturePack.c:498–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498cc_result TexturePack_ExtractDefault(DefaultZipCallback callback, const char** default_path) {
499 cc_result res = ReturnCode_FileNotFound;
500 const char* defaults[3];
501 cc_string path;
502 int i;
503
504 defaults[0] = Game_Version.DefaultTexpack;
505 defaults[1] = "texpacks/default.zip";
506 defaults[2] = "texpacks/classicube.zip";
507
508 for (i = 0; i < Array_Elems(defaults); i++)
509 {
510 path = String_FromReadonly(defaults[i]);
511 res = callback(&path);
512 if (res) continue;
513
514 *default_path = defaults[i];
515 return 0;
516 }
517
518 *default_path = NULL;
519 return res;
520}
521
522
523static cc_bool SelectZipEntry(const cc_string* path) { return true; }

Callers 2

ExtractUserTexturesFunction · 0.85

Calls 2

String_FromReadonlyFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected