returns a bitmaps height (based on miplevel), else -1 if something is wrong
| 1125 | } |
| 1126 | // returns a bitmaps height (based on miplevel), else -1 if something is wrong |
| 1127 | int 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 |
| 1145 | int bm_miplevels(int handle) { |
no test coverage detected