Port to latest GCC and fix CD loading bug

This commit is contained in:
Jaby Blubb
2023-09-03 01:57:28 +02:00
parent 86e1d76733
commit 30759b85c7
12 changed files with 83 additions and 67 deletions

View File

@@ -9,8 +9,9 @@ namespace JabyEngine {
CopyTo,
};
struct __no_align CDFile {
union __no_align Payload {
#pragma pack(push, 1)
struct CDFile {
union Payload {
uint32_t raw;
SimpleTIM simple_tim;
CopyTo copy_to;
@@ -23,6 +24,7 @@ namespace JabyEngine {
static_assert(sizeof(Payload) == sizeof(uint32_t));
};
#pragma pack(pop)
struct CDFileBuilder {
static constexpr CDFile simple_tim(uint8_t rel_lba_idx, SimpleTIM simple_tim) {

View File

@@ -5,10 +5,11 @@
#include "../jabyengine_defines.h"
namespace JabyEngine {
struct __no_align Nothing {
#pragma pack(push, 1)
struct Nothing {
};
struct __no_align SimpleTIM {
struct SimpleTIM {
static constexpr auto TextureX = BitRange::from_to(0, 8);
static constexpr auto TextureY = BitRange::from_to(9, 16);
static constexpr auto ClutX = BitRange::from_to(17, 22);
@@ -46,9 +47,10 @@ namespace JabyEngine {
}
};
struct __no_align CopyTo {
struct CopyTo {
uint32_t* dst;
};
#pragma pack(pop)
typedef CopyTo Overlay;
}