[nostalgia/core] Add support for drawing NostalgiaGraphics in SDL

This commit is contained in:
2019-10-27 16:24:01 -05:00
parent 79a1a6f896
commit 52c4744242
9 changed files with 181 additions and 22 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ namespace {
QMap<QRgb, int> colors;
auto ng = std::make_unique<core::NostalgiaGraphic>();
ng->pal.resize(countColors(src, argTiles));
ng->pal.colors.resize(countColors(src, argTiles));
if (argBpp == 4) {
ng->tiles.resize(Pixels / 2);
} else {
@@ -112,7 +112,7 @@ namespace {
// store colors in palette with the corresponding color id
for (auto key : colors.keys()) {
auto colorId = colors[key];
ng->pal[colorId] = toGbaColor(key);
ng->pal.colors[colorId] = toGbaColor(key);
}
return ng;