This function 'compresses' the on-state background, to save space
| 907 | |
| 908 | // This function 'compresses' the on-state background, to save space |
| 909 | void CompressTelComOnImage(int bitmap, chunked_bitmap *array) { |
| 910 | if (!array) |
| 911 | return; |
| 912 | int count; |
| 913 | int width, height; |
| 914 | int handle; |
| 915 | |
| 916 | // the first hotspot bitmap doesn't exist so we can skip it |
| 917 | for (count = 1; count < hotspotmap.num_of_hotspots; count++) { |
| 918 | width = HotSpotW(count); |
| 919 | ASSERT(width != -1); // DAJ -1FIX |
| 920 | height = HotSpotH(count); |
| 921 | ASSERT(height != -1); // DAJ -1FIX |
| 922 | handle = bm_AllocBitmap(width, height, 0); |
| 923 | TelCom_BltToMem(handle, 0, 0, bitmap, HotSpotL(count), HotSpotT(count), width, height); |
| 924 | bm_CreateChunkedBitmap(handle, &array[count]); |
| 925 | bm_FreeBitmap(handle); |
| 926 | } |
| 927 | } |
| 928 | |
| 929 | // frees up on-state bitmaps |
| 930 | void FreeTelComOnBitmaps(chunked_bitmap *array) { |
no test coverage detected