| 176 | } |
| 177 | |
| 178 | static void argb8888ToRGBA(const uint8_t* src, uint8_t* dst, int w, int h) |
| 179 | { |
| 180 | const auto* in = reinterpret_cast<const uint32_t*>(src); |
| 181 | for (int i = 0; i < w * h; ++i) |
| 182 | { |
| 183 | uint32_t p = in[i]; |
| 184 | dst[i * 4 + 0] = (p >> 16) & 0xFF; // R |
| 185 | dst[i * 4 + 1] = (p >> 8) & 0xFF; // G |
| 186 | dst[i * 4 + 2] = p & 0xFF; // B |
| 187 | dst[i * 4 + 3] = (p >> 24) & 0xFF; // A |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | // --- DXT decompression (standalone, for ConvertPixels) --- |
| 192 |