rename ApplyPalette with SetPalette

This commit is contained in:
scawful
2025-03-02 17:06:46 -05:00
parent a7d933eb14
commit c99a4b0bc4
11 changed files with 106 additions and 112 deletions

View File

@@ -68,8 +68,7 @@ absl::StatusOr<std::array<gfx::Bitmap, kNumLinkSheets>> LoadLinkGraphics(
auto link_sheet_8bpp = gfx::SnesTo8bppSheet(link_sheet_data, /*bpp=*/4);
link_graphics[i].Create(gfx::kTilesheetWidth, gfx::kTilesheetHeight,
gfx::kTilesheetDepth, link_sheet_8bpp);
RETURN_IF_ERROR(
link_graphics[i].ApplyPalette(rom.palette_group().armors[0]);)
RETURN_IF_ERROR(link_graphics[i].SetPalette(rom.palette_group().armors[0]);)
Renderer::GetInstance().RenderBitmap(&link_graphics[i]);
}
return link_graphics;
@@ -109,10 +108,10 @@ absl::StatusOr<std::array<gfx::Bitmap, kNumGfxSheets>> LoadAllGraphicsData(
if (graphics_sheets[i].is_active()) {
if (i > 115) {
// Apply sprites palette
RETURN_IF_ERROR(graphics_sheets[i].ApplyPaletteWithTransparent(
RETURN_IF_ERROR(graphics_sheets[i].SetPaletteWithTransparent(
rom.palette_group().global_sprites[0], 0));
} else {
RETURN_IF_ERROR(graphics_sheets[i].ApplyPaletteWithTransparent(
RETURN_IF_ERROR(graphics_sheets[i].SetPaletteWithTransparent(
rom.palette_group().dungeon_main[0], 0));
}
}