Update SNESPalette, SNESColor, add tests

This commit is contained in:
scawful
2023-08-04 22:51:12 -04:00
parent 7d0b09a589
commit 9ea107bc8d
17 changed files with 299 additions and 263 deletions

View File

@@ -352,11 +352,11 @@ absl::Status OverworldEditor::LoadGraphics() {
absl::Status OverworldEditor::LoadSpriteGraphics() {
// Render the sprites for each Overworld map
for (int i = 0; i < 3; i++)
for (auto &sprite : overworld_.Sprites(i)) {
for (auto const &sprite : overworld_.Sprites(i)) {
int width = sprite.Width();
int height = sprite.Height();
int depth = 0x40;
auto spr_gfx = sprite.PreviewGraphics().data();
auto spr_gfx = sprite.PreviewGraphics();
sprite_previews_[sprite.id()].Create(width, height, depth, spr_gfx);
sprite_previews_[sprite.id()].ApplyPalette(palette_);
rom_.RenderBitmap(&(sprite_previews_[sprite.id()]));