Remove Overlayhader and support loading overlays
This commit is contained in:
@@ -7,13 +7,15 @@ namespace JabyEngine {
|
||||
enum struct CDFileType : uint8_t {
|
||||
SimpleTIM = 0,
|
||||
CopyTo,
|
||||
Overlay,
|
||||
};
|
||||
|
||||
struct __no_align CDFile {
|
||||
union __no_align Payload {
|
||||
uint32_t empty;
|
||||
uint32_t raw;
|
||||
SimpleTIM simple_tim;
|
||||
CopyTo copy_to;
|
||||
Overlay overlay;
|
||||
};
|
||||
|
||||
uint8_t rel_lba_idx;
|
||||
@@ -31,6 +33,10 @@ namespace JabyEngine {
|
||||
static constexpr CDFile copy_to(uint8_t rel_lba_idx, uint32_t* dst) {
|
||||
return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::CopyTo, .payload = {.copy_to = CopyTo{dst}}};
|
||||
}
|
||||
|
||||
static constexpr CDFile overlay(uint8_t rel_lba_idx, uint32_t* overlay_dst) {
|
||||
return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::Overlay, .payload = {.overlay = Overlay{overlay_dst}}};
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif //!__JABYENGINE_CD_FILE_TYPES_HPP__
|
@@ -42,5 +42,7 @@ namespace JabyEngine {
|
||||
struct __no_align CopyTo {
|
||||
uint32_t* dst;
|
||||
};
|
||||
|
||||
typedef CopyTo Overlay;
|
||||
}
|
||||
#endif // !__JABYENGINE_FILE_TYPES_HPP__
|
Reference in New Issue
Block a user