refactoring PPU's unions to be used as intended

This commit is contained in:
Clément Le Bihan
2020-10-11 00:00:18 +02:00
parent 004cdae186
commit 10cead862f
3 changed files with 137 additions and 150 deletions
+7 -7
View File
@@ -11,14 +11,14 @@ namespace ComSquare::PPU
{
union TileMapData {
struct {
uint8_t posX: 4;
uint8_t posY: 6;
uint8_t palette: 3;
bool tilePriority: 1;
bool horizontalFlip: 1;
bool verticalFlip: 1;
uint16_t posX: 4;
uint16_t posY: 6;
uint16_t palette: 3;
uint16_t tilePriority: 1;
uint16_t horizontalFlip: 1;
uint16_t verticalFlip: 1;
};
uint16_t raw;
uint16_t raw = 0;
};
}