Determines if a face draws with alpha blending Parameters: fp - pointer to the face in question bm_handle - the handle for the bitmap for this frame, or -1 if don't care about transparence Returns: bitmask describing the alpha blending for the face the return bits are the ATF_ flags in renderer.h
| 237 | // transparence Returns: bitmask describing the alpha blending for the face |
| 238 | // the return bits are the ATF_ flags in renderer.h |
| 239 | static inline int GetFaceAlpha(face *fp, int bm_handle) { |
| 240 | int ret = AT_ALWAYS; |
| 241 | if (GameTextures[fp->tmap].flags & TF_SATURATE) { |
| 242 | ret = AT_SATURATE_TEXTURE; |
| 243 | } else { |
| 244 | // Check the face's texture for an alpha value |
| 245 | if (GameTextures[fp->tmap].alpha < 1.0) |
| 246 | ret |= ATF_CONSTANT; |
| 247 | |
| 248 | // Check for transparency |
| 249 | if (GameBitmaps[bm_handle].format != BITMAP_FORMAT_4444 && GameTextures[fp->tmap].flags & TF_TMAP2) |
| 250 | ret |= ATF_TEXTURE; |
| 251 | } |
| 252 | return ret; |
| 253 | } |
| 254 | // Determine if you should render through a portal |
| 255 | // Parameters: rp - the room the portal is in |
| 256 | // pp - the portal we're checking |
no outgoing calls
no test coverage detected