OpenUT99-Plus
Unreal Engine 1, rebuilt from scratch
Loading...
Searching...
No Matches
texture.h
Go to the documentation of this file.
1// Palette and Texture to RGBA. Spec: docs/formats/texture.md; reference: tools/utex.py
2#pragma once
3#include <cstdint>
4#include <vector>
5
6#include "upkg.h"
7
8namespace ut {
9
10struct Image {
11 int width = 0, height = 0;
12 std::vector<uint8_t> rgba;
13};
14
15// Mip 0 of a texture export. P8 only (shortcut: other formats return an 8x8 grey checker, upgrade when
16// DXT/469 formats are decoded). masked: palette index 0 is transparent (PF_Masked surfaces).
17Image texture_rgba(const Package& p, const Export& tex, bool masked);
18
19} // namespace ut
Definition collision.cpp:7
Image texture_rgba(const Package &p, const Export &tex, bool masked)
Definition texture.cpp:17
Definition upkg.h:32
Definition texture.h:10
std::vector< uint8_t > rgba
Definition texture.h:12
int width
Definition texture.h:11
int height
Definition texture.h:11
Definition upkg.h:39