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

Function CreateBmpInvert

Descent3/TelComEffects.cpp:1162–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1160}
1161
1162bool CreateBmpInvert(tceffect *tce, const char *filename) {
1163 ASSERT(filename);
1164
1165 tce->bmpinfo.chunk_bmp.pw = tce->bmpinfo.chunk_bmp.ph = 0;
1166 tce->bmpinfo.bm_handle = bm_AllocLoadFileBitmap(IGNORE_TABLE(filename), 0);
1167 tce->bmpinfo.temp_bmhandle = BAD_BITMAP_HANDLE;
1168 if (tce->bmpinfo.bm_handle == -1) {
1169 tce->bmpinfo.bm_handle = BAD_BITMAP_HANDLE;
1170 mprintf(0, "Unable to load bmp '%s'\n", filename);
1171 } else {
1172 tce->bmpinfo.temp_bmhandle = bm_AllocBitmap(bm_w(tce->bmpinfo.bm_handle, 0), bm_h(tce->bmpinfo.bm_handle, 0), 0);
1173 if (tce->bmpinfo.temp_bmhandle == -1)
1174 tce->bmpinfo.temp_bmhandle = BAD_BITMAP_HANDLE;
1175
1176 // create the chunk bitmap for use
1177 bm_CreateChunkedBitmap(tce->bmpinfo.bm_handle, &tce->bmpinfo.chunk_bmp);
1178 }
1179 return true;
1180}
1181
1182bool CreateBmpStretch(tceffect *tce, const char *filename) {
1183 ASSERT(filename);

Callers 1

CreateBitmapEffectFunction · 0.85

Calls 5

bm_AllocLoadFileBitmapFunction · 0.85
bm_AllocBitmapFunction · 0.85
bm_wFunction · 0.85
bm_hFunction · 0.85
bm_CreateChunkedBitmapFunction · 0.85

Tested by

no test coverage detected