mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-13 14:07:08 +03:00
38 lines
873 B
C++
38 lines
873 B
C++
![]() |
#pragma once
|
||
|
|
||
|
#include "ati3dcif.hpp"
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
#include <glrage/GLRage.hpp>
|
||
|
#include <glrage_gl/Texture.hpp>
|
||
|
|
||
|
namespace glrage {
|
||
|
namespace cif {
|
||
|
|
||
|
class Texture : public gl::Texture
|
||
|
{
|
||
|
public:
|
||
|
static const uint32_t TRANS_MAP_DIM = 32;
|
||
|
static const uint32_t TRANS_TEX_DIM = 1024;
|
||
|
static const uint32_t TRANS_MAP_FACTOR = 32;
|
||
|
Texture();
|
||
|
~Texture();
|
||
|
void load(C3D_PTMAP tmap, std::vector<C3D_PALETTENTRY>& palette);
|
||
|
C3D_COLOR& chromaKey();
|
||
|
bool keyOnAlpha();
|
||
|
bool isTranslucent();
|
||
|
std::vector<uint8_t>& translucencyMap();
|
||
|
|
||
|
private:
|
||
|
Config& m_config{GLRage::getConfig()};
|
||
|
C3D_COLOR m_chromaKey;
|
||
|
bool m_keyOnAlpha;
|
||
|
std::map<std::string, std::string>& getTextureKeys();
|
||
|
std::vector<uint8_t> m_translucency_map;
|
||
|
bool m_is_translucent;
|
||
|
};
|
||
|
|
||
|
} // namespace cif
|
||
|
} // namespace glrage
|