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

Function bm_w

bitmap/bitmain.cpp:1111–1125  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1109}
1110// returns a bitmaps width (based on miplevel), else -1 if something is wrong
1111int bm_w(int handle, int miplevel) {
1112 int w;
1113 if (!GameBitmaps[handle].used) {
1114 Int3();
1115 return -1;
1116 }
1117 if (GameBitmaps[handle].flags & BF_NOT_RESIDENT)
1118 if (!bm_MakeBitmapResident(handle))
1119 return 0;
1120 if (!(GameBitmaps[handle].flags & BF_MIPMAPPED))
1121 miplevel = 0;
1122 w = GameBitmaps[handle].width;
1123 w >>= miplevel;
1124 return (w);
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;

Callers 15

rend_DrawChunkedBitmapFunction · 0.85
rend_DrawSimpleBitmapFunction · 0.85
opengl_MakeBitmapCurrentFunction · 0.85
rend_ScreenshotFunction · 0.85
d3d_GetTexClassFunction · 0.85
d3d_DrawPolygonFunction · 0.85

Calls 1

bm_MakeBitmapResidentFunction · 0.85

Tested by

no test coverage detected