Skip to content

Commit

Permalink
fix palette_color_opaque should mask out transparency bit
Browse files Browse the repository at this point in the history
  • Loading branch information
emrsmsrli committed Jun 12, 2021
1 parent 9e0ee6e commit 3d4b857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gba/include/gba/ppu/ppu.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class engine {

[[nodiscard]] FORCEINLINE color palette_color_opaque(const u8 color_idx, const u8 palette_idx = 0_u8) const noexcept
{
return color{memcpy<u16>(palette_ram_, (palette_idx * 16_u32 + color_idx) * 2_u16)};
return color{memcpy<u16>(palette_ram_, (palette_idx * 16_u32 + color_idx) * 2_u16) & 0x7FFF_u16};
}

void tile_line_8bpp(tile_line& out_line, u32 y, usize base_addr, bg_map_entry entry) const noexcept;
Expand Down

0 comments on commit 3d4b857

Please sign in to comment.