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

Function ExtractPng

src/TexturePack.c:531–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531static cc_result ExtractPng(struct Stream* stream) {
532 struct Bitmap bmp;
533 cc_result res = Png_Decode(&bmp, stream);
534 if (!res && Atlas_TryChange(&bmp)) return 0;
535
536 Mem_Free(bmp.scan0);
537 return res;
538}
539
540static cc_bool needReload;
541static cc_result ExtractFrom(struct Stream* stream, const cc_string* path) {

Callers 1

ExtractFromFunction · 0.85

Calls 3

Png_DecodeFunction · 0.85
Atlas_TryChangeFunction · 0.85
Mem_FreeFunction · 0.70

Tested by

no test coverage detected