MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / LoadLargeBitmap

Function LoadLargeBitmap

Descent3/newui.cpp:808–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806// large bitmap library
807
808int LoadLargeBitmap(const char *filename, tLargeBitmap *bmp) {
809 chunked_bitmap chunk;
810 int bm_handle = bm_AllocLoadFileBitmap(IGNORE_TABLE(filename), 0);
811 if (bm_handle == -1) {
812 bmp->bm_array = NULL;
813 bmp->bmps_w = 0;
814 bmp->bmps_h = 0;
815 return 0;
816 }
817
818 bm_CreateChunkedBitmap(bm_handle, &chunk);
819
820 if (bm_handle > BAD_BITMAP_HANDLE)
821 bm_FreeBitmap(bm_handle);
822
823 bmp->bmps_w = chunk.w;
824 bmp->bmps_h = chunk.h;
825 bmp->bm_array = chunk.bm_array;
826
827 return 1;
828}
829
830void FreeLargeBitmap(tLargeBitmap *bmp) {
831 chunked_bitmap chunk;

Callers 3

PostLevelResultsFunction · 0.85
LoadLevelProgressFunction · 0.85
CreateMethod · 0.85

Calls 3

bm_AllocLoadFileBitmapFunction · 0.85
bm_CreateChunkedBitmapFunction · 0.85
bm_FreeBitmapFunction · 0.85

Tested by

no test coverage detected