| 801 | } |
| 802 | |
| 803 | void makecorner(int corner_bmp, int back_bmp, const char *tmap, int l, int t, int r, int b) { |
| 804 | int real_x, real_y, awidth, ax, ay; |
| 805 | int16_t *backdata, *cornerdata; |
| 806 | int back_rowsize, corner_rowsize; |
| 807 | |
| 808 | awidth = r - l; |
| 809 | bm_ClearBitmap(corner_bmp); |
| 810 | backdata = (int16_t *)bm_data(back_bmp, 0); |
| 811 | back_rowsize = bm_rowsize(back_bmp, 0); |
| 812 | cornerdata = (int16_t *)bm_data(corner_bmp, 0); |
| 813 | corner_rowsize = bm_rowsize(corner_bmp, 0); |
| 814 | |
| 815 | backdata += (t * (back_rowsize / 2)); |
| 816 | |
| 817 | for (real_y = t, ay = 0; real_y < b; real_y++, ay++) { |
| 818 | for (real_x = l, ax = 0; real_x < r; real_x++, ax++) { |
| 819 | if (!tmap[ay * awidth + ax]) { |
| 820 | // not transparent |
| 821 | cornerdata[ax] = backdata[real_x]; |
| 822 | } |
| 823 | } |
| 824 | cornerdata += (corner_rowsize / 2); |
| 825 | backdata += (back_rowsize / 2); |
| 826 | } |
| 827 | } |
| 828 | |
| 829 | // This function frees up the allocated memory within a hotspotmap struct. It does not free up the struct though. |
| 830 | void FreeHotSpotMapInternals(hotspotmap_t *hsmap) { |
no test coverage detected