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

Function bm_h

bitmap/bitmain.cpp:1127–1142  ·  view source on GitHub ↗

returns a bitmaps height (based on miplevel), else -1 if something is wrong

Source from the content-addressed store, hash-verified

1125}
1126// returns a bitmaps height (based on miplevel), else -1 if something is wrong
1127int bm_h(int handle, int miplevel) {
1128 int h;
1129 if (!GameBitmaps[handle].used) {
1130 Int3();
1131 return -1;
1132 }
1133 // If this bitmap is not page in, do so!
1134 if (GameBitmaps[handle].flags & BF_NOT_RESIDENT)
1135 if (!bm_MakeBitmapResident(handle))
1136 return 0;
1137 if (!(GameBitmaps[handle].flags & BF_MIPMAPPED))
1138 miplevel = 0;
1139 h = GameBitmaps[handle].height;
1140 h >>= miplevel;
1141 return (h);
1142}
1143
1144// returns the number of levels of mips a bitmap should have
1145int bm_miplevels(int handle) {

Callers 15

rend_DrawChunkedBitmapFunction · 0.85
rend_DrawSimpleBitmapFunction · 0.85
opengl_MakeBitmapCurrentFunction · 0.85
rend_ScreenshotFunction · 0.85
d3d_ScreenshotFunction · 0.85

Calls 1

bm_MakeBitmapResidentFunction · 0.85

Tested by

no test coverage detected