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

Function CreateBmpScanline

Descent3/TelComEffects.cpp:1142–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140}
1141
1142bool CreateBmpScanline(tceffect *tce, const char *filename) {
1143 ASSERT(filename);
1144
1145 tce->bmpinfo.chunk_bmp.pw = tce->bmpinfo.chunk_bmp.ph = 0;
1146 tce->bmpinfo.bm_handle = bm_AllocLoadFileBitmap(IGNORE_TABLE(filename), 0);
1147 tce->bmpinfo.temp_bmhandle = BAD_BITMAP_HANDLE;
1148 if (tce->bmpinfo.bm_handle == -1) {
1149 tce->bmpinfo.bm_handle = BAD_BITMAP_HANDLE;
1150 mprintf(0, "Unable to load bmp '%s'\n", filename);
1151 } else {
1152 tce->bmpinfo.temp_bmhandle = bm_AllocBitmap(bm_w(tce->bmpinfo.bm_handle, 0), bm_h(tce->bmpinfo.bm_handle, 0), 0);
1153 if (tce->bmpinfo.temp_bmhandle == -1)
1154 tce->bmpinfo.temp_bmhandle = BAD_BITMAP_HANDLE;
1155
1156 // create the chunk bitmap for use
1157 bm_CreateChunkedBitmap(tce->bmpinfo.bm_handle, &tce->bmpinfo.chunk_bmp);
1158 }
1159 return true;
1160}
1161
1162bool CreateBmpInvert(tceffect *tce, const char *filename) {
1163 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