| 806 | // large bitmap library |
| 807 | |
| 808 | int 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 | |
| 830 | void FreeLargeBitmap(tLargeBitmap *bmp) { |
| 831 | chunked_bitmap chunk; |
no test coverage detected