metaforce/Runtime/Graphics/CGraphicsPalette.hpp

32 lines
582 B
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-03-18 17:07:31 -07:00
#include <memory>
#include "Runtime/RetroTypes.hpp"
2016-03-18 17:07:31 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
class CInputStream;
2016-03-18 17:07:31 -07:00
2018-12-07 21:30:43 -08:00
enum class EPaletteFormat {
IA8 = 0x0,
RGB565 = 0x1,
RGB5A3 = 0x2,
2016-03-18 17:07:31 -07:00
};
2018-12-07 21:30:43 -08:00
class CGraphicsPalette {
static u32 sCurrentFrameCount;
2018-12-07 21:30:43 -08:00
friend class CTextRenderBuffer;
EPaletteFormat x0_fmt;
u32 x4_frameLoaded{};
u32 x8_entryCount;
std::unique_ptr<u8[]> xc_entries;
/* GXTlutObj x10_; */
bool x1c_locked = false;
2018-12-07 21:30:43 -08:00
2016-03-18 17:07:31 -07:00
public:
explicit CGraphicsPalette(EPaletteFormat fmt, int count);
explicit CGraphicsPalette(CInputStream& in);
2016-03-18 17:07:31 -07:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce