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

Function bm_ClearBitmap

bitmap/bitmain.cpp:1405–1417  ·  view source on GitHub ↗

clears bitmap

Source from the content-addressed store, hash-verified

1403
1404// clears bitmap
1405void bm_ClearBitmap(int handle) {
1406 int dx, dy;
1407 // DAJ int rowsize_w = bm_rowsize(handle,0) >> 1;
1408 uint16_t *bmpdata = bm_data(handle, 0);
1409 int w = bm_w(handle, 0);
1410 int h = bm_h(handle, 0);
1411 for (dy = 0; dy < h; dy++) {
1412 for (dx = 0; dx < w; dx++)
1413 bmpdata[dx] = NEW_TRANSPARENT_COLOR;
1414
1415 bmpdata += w;
1416 }
1417}
1418// Given a bitmap handle, breaks a bitmap into smaller pieces.
1419// Note, this routine isn't terrible fast or efficient, and you
1420// must free the bitmaps returned to you in the bm_array

Callers 5

bm_CreateChunkedBitmapFunction · 0.85
makecornerFunction · 0.85
RenderBmpBlurFunction · 0.85
RenderBmpScanlineFunction · 0.85

Calls 3

bm_dataFunction · 0.85
bm_wFunction · 0.85
bm_hFunction · 0.85

Tested by

no test coverage detected