Remove Overlayhader and support loading overlays

This commit is contained in:
2023-04-10 17:01:28 +02:00
parent 7a373a38ff
commit 1a0d175779
8 changed files with 47 additions and 65 deletions

View File

@@ -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__

View File

@@ -42,5 +42,7 @@ namespace JabyEngine {
struct __no_align CopyTo {
uint32_t* dst;
};
typedef CopyTo Overlay;
}
#endif // !__JABYENGINE_FILE_TYPES_HPP__