Include SplashImage and detect right type
This commit is contained in:
@@ -9,6 +9,10 @@ struct __no_align SimpleTIM : private ComplexBitMap<uint32_t> {
|
||||
static constexpr auto ClutX = BitRange<uint32_t>(17, 22);
|
||||
static constexpr auto ClutY = BitRange<uint32_t>(23, 31);
|
||||
|
||||
constexpr SimpleTIM() {
|
||||
this->raw = 0;
|
||||
}
|
||||
|
||||
constexpr SimpleTIM(uint16_t texX, uint16_t texY, uint16_t clutX, uint16_t clutY) : ComplexBitMap(ComplexBitMap::with(TextureX.with(texX), TextureY.with(texY), ClutX.with(clutX), ClutY.with(clutY))) {
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ namespace FileProcessor {
|
||||
class State {
|
||||
private:
|
||||
struct Reserved {
|
||||
uint32_t reserved[2];
|
||||
uint32_t reserved[4];
|
||||
};
|
||||
|
||||
struct Configuration;
|
||||
@@ -26,6 +26,12 @@ namespace FileProcessor {
|
||||
Configuration config;
|
||||
Reserved reserved;
|
||||
|
||||
template<typename T>
|
||||
static __always_inline State from(const T& reserved, const uint32_t* data_adr, bool (*process_routine)(Configuration&, T&, size_t)) {
|
||||
return {Configuration::from(process_routine, data_adr), *reinterpret_cast<const Reserved*>(&reserved)};
|
||||
static_assert(sizeof(T) <= sizeof(Reserved));
|
||||
}
|
||||
|
||||
public:
|
||||
bool process(size_t size) {
|
||||
return (*this->config.process_routine)(this->config, this->reserved, size);
|
||||
|
Reference in New Issue
Block a user