| 42 | } |
| 43 | |
| 44 | bool createTexture(const TextureData* src, const u32* palette, UiTexture* tex, MagFilter filter) |
| 45 | { |
| 46 | if (!src || !tex) { return false; } |
| 47 | tex->scale = { 1.0f, 1.0f }; |
| 48 | |
| 49 | s_imageBuffer.resize(src->width * src->height); |
| 50 | u32* image = s_imageBuffer.data(); |
| 51 | convertDfTextureToTrueColor(src, palette, image); |
| 52 | |
| 53 | tex->texture = TFE_RenderBackend::createTexture(src->width, src->height, image, filter); |
| 54 | |
| 55 | tex->scale.x = 1.0f; |
| 56 | tex->scale.z = 1.0f; |
| 57 | tex->rect[0] = 0.0f; |
| 58 | tex->rect[1] = 0.0f; |
| 59 | tex->rect[2] = 0.0f; |
| 60 | tex->rect[3] = 0.0f; |
| 61 | return true; |
| 62 | } |
| 63 | } |
no test coverage detected