Swizzle the texture, explicitly setting the texture colour to the specified value (alpha is left alone!) void swizzle_fast_setcolour(u8* out, const u8* in, u32 width, u32 height, u32 mask, u32 colour) { u32 blockx, blocky; u32 j; u32 width_blocks = (width / 16); u32 height_blocks = (height / 8); u32 src_pitch = (width-16)/4; u32 src_row = width * 8; const u8* ysrc = in; u32* dst = (u32
| 231 | // |
| 232 | //***************************************************************************** |
| 233 | u32 GetTextureBlockWidth( u32 dimension, ETextureFormat texture_format ) |
| 234 | { |
| 235 | #ifdef DAEDALUS_ENABLE_ASSERTS |
| 236 | DAEDALUS_ASSERT( GetNextPowerOf2( dimension ) == dimension, "This is not a power of 2" ); |
| 237 | #endif |
| 238 | // Ensure that the pitch is at least 16 bytes |
| 239 | while( CalcBytesRequired( dimension, texture_format ) < 16 ) |
| 240 | { |
| 241 | dimension *= 2; |
| 242 | } |
| 243 | |
| 244 | return dimension; |
| 245 | } |
| 246 | |
| 247 | //***************************************************************************** |
| 248 | // |
no test coverage detected