Correct the charset inode read for the charset tiles

This commit is contained in:
Gary Talent 2017-04-19 01:06:51 -05:00
parent e0addbdea2
commit 7a6934187a
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ typedef uint16_t Pallete[256];
typedef Tile CharBlock[512]; typedef Tile CharBlock[512];
typedef Tile8 CharBlock8[256]; typedef Tile8 CharBlock8[256];
struct __attribute__((packed)) GbaImageData { struct __attribute__((aligned(4))) GbaImageData {
Pallete pal; Pallete pal;
uint16_t tileCount; uint16_t tileCount;
uint8_t bpp; uint8_t bpp;

View File

@ -133,7 +133,7 @@ void initConsole() {
REG_BG0CNT |= (1 << 7); // set to use 8 bits per pixel REG_BG0CNT |= (1 << 7); // set to use 8 bits per pixel
if (fs) { if (fs) {
FileStore32::FsSize_t readSize = 0; FileStore32::FsSize_t readSize = 0;
fs->read(2, __builtin_offsetof(GbaImageData, tiles), 64 * 38, &TILE8_ADDR[0][1], nullptr); fs->read(1, __builtin_offsetof(GbaImageData, tiles), 64 * 38, &TILE8_ADDR[0][1], nullptr);
fs->read(1, 0, 512, &MEM_PALLETE_BG[0], &readSize); fs->read(1, 0, 512, &MEM_PALLETE_BG[0], &readSize);
} }
} }