2021-11-12 20:03:04 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-11-14 23:44:55 +01:00
|
|
|
#include <ati3dcif/ATI3DCIF.h>
|
2021-11-12 20:03:04 +01:00
|
|
|
|
|
|
|
#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();
|
2021-11-14 23:59:19 +01:00
|
|
|
bool keyOnAlpha();
|
2021-11-12 20:03:04 +01:00
|
|
|
bool isTranslucent();
|
|
|
|
std::vector<uint8_t>& translucencyMap();
|
|
|
|
|
|
|
|
private:
|
|
|
|
C3D_COLOR m_chromaKey;
|
2021-11-14 23:59:19 +01:00
|
|
|
bool m_keyOnAlpha;
|
2021-11-12 20:03:04 +01:00
|
|
|
std::vector<uint8_t> m_translucency_map;
|
2021-11-14 23:59:19 +01:00
|
|
|
bool m_is_translucent;
|
2021-11-12 20:03:04 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace cif
|
|
|
|
} // namespace glrage
|