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

Function FreeViewports

Descent3/TelCom.cpp:891–906  ·  view source on GitHub ↗

Frees allocated memory used by the windows

Source from the content-addressed store, hash-verified

889
890// Frees allocated memory used by the windows
891void FreeViewports() {
892 int count;
893
894 if (windowmap.wm) {
895 for (count = 0; count < windowmap.num_of_windows; count++) {
896 if (windowmap.wm[count].lt_bmp > BAD_BITMAP_HANDLE)
897 bm_FreeBitmap(windowmap.wm[count].lt_bmp);
898 if (windowmap.wm[count].rt_bmp > BAD_BITMAP_HANDLE)
899 bm_FreeBitmap(windowmap.wm[count].rt_bmp);
900 if (windowmap.wm[count].lb_bmp > BAD_BITMAP_HANDLE)
901 bm_FreeBitmap(windowmap.wm[count].lb_bmp);
902 if (windowmap.wm[count].rb_bmp > BAD_BITMAP_HANDLE)
903 bm_FreeBitmap(windowmap.wm[count].rb_bmp);
904 }
905 }
906}
907
908// This function 'compresses' the on-state background, to save space
909void CompressTelComOnImage(int bitmap, chunked_bitmap *array) {

Callers 4

CBriefEditMethod · 0.85
TelComShowFunction · 0.85
TelComDeactivateFunction · 0.85
LoadTelcomBitmapFunction · 0.85

Calls 1

bm_FreeBitmapFunction · 0.85

Tested by

no test coverage detected