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

Function bm_data

bitmap/bitmain.cpp:1182–1200  ·  view source on GitHub ↗

returns a bitmaps data (based on given miplevel), else NULL if something is wrong

Source from the content-addressed store, hash-verified

1180}
1181// returns a bitmaps data (based on given miplevel), else NULL if something is wrong
1182uint16_t *bm_data(int handle, int miplevel) {
1183 uint16_t *d;
1184 int i;
1185 if (!GameBitmaps[handle].used) {
1186 Int3();
1187 return NULL;
1188 }
1189
1190 // If this bitmap is not page in, do so!
1191 if (GameBitmaps[handle].flags & BF_NOT_RESIDENT)
1192 if (!bm_MakeBitmapResident(handle))
1193 return NULL;
1194
1195 d = GameBitmaps[handle].data16;
1196 for (i = 0; i < miplevel; i++) {
1197 d += (GameBitmaps[handle].width >> i) * (GameBitmaps[handle].height >> i);
1198 }
1199 return (d);
1200}
1201// Given a source bitmap, generates mipmaps for it
1202void bm_GenerateMipMaps(int handle) {
1203 int width = bm_w(handle, 0);

Callers 15

rend_ScreenshotFunction · 0.85
d3d_ScreenshotFunction · 0.85
opengl_ScreenshotFunction · 0.85
extract_fontFunction · 0.85
DoWallEffectsFunction · 0.85
UpdateDialogMethod · 0.85

Calls 1

bm_MakeBitmapResidentFunction · 0.85

Tested by

no test coverage detected