2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:07:42 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -3,38 +3,32 @@
#include <memory>
#include "RetroTypes.hpp"
namespace urde
{
namespace urde {
enum class EPaletteFormat
{
IA8 = 0x0,
RGB565 = 0x1,
RGB5A3 = 0x2,
enum class EPaletteFormat {
IA8 = 0x0,
RGB565 = 0x1,
RGB5A3 = 0x2,
};
class CGraphicsPalette
{
friend class CTextRenderBuffer;
EPaletteFormat x0_fmt;
u32 x4_;
int x8_entryCount;
std::unique_ptr<u16[]> xc_entries;
/* x10_ GXTlutObj here */
bool x1c_ = false;
class CGraphicsPalette {
friend class CTextRenderBuffer;
EPaletteFormat x0_fmt;
u32 x4_;
int x8_entryCount;
std::unique_ptr<u16[]> xc_entries;
/* x10_ GXTlutObj here */
bool x1c_ = false;
public:
CGraphicsPalette(EPaletteFormat fmt, int count)
: x0_fmt(fmt), x8_entryCount(count), xc_entries(new u16[count]) {}
CGraphicsPalette(CInputStream& in)
: x0_fmt(EPaletteFormat(in.readUint32Big()))
{
u16 w = in.readUint16Big();
u16 h = in.readUint16Big();
x8_entryCount = w * h;
CGraphicsPalette(EPaletteFormat fmt, int count) : x0_fmt(fmt), x8_entryCount(count), xc_entries(new u16[count]) {}
CGraphicsPalette(CInputStream& in) : x0_fmt(EPaletteFormat(in.readUint32Big())) {
u16 w = in.readUint16Big();
u16 h = in.readUint16Big();
x8_entryCount = w * h;
/* GX Tlut init here */
}
/* GX Tlut init here */
}
};
}
} // namespace urde