mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
sms renderer, fix unaligned bg-filled tiles
This commit is contained in:
parent
b23725dd9f
commit
d05e2eb3d6
1 changed files with 8 additions and 2 deletions
10
pico/mode4.c
10
pico/mode4.c
|
@ -60,8 +60,14 @@ static int CollisionDetect(u8 *mb, u16 sx, unsigned int pack, int zoomed)
|
|||
|
||||
static void TileBGM4(u16 sx, int pal)
|
||||
{
|
||||
u32 *pd = (u32 *)(Pico.est.HighCol + sx);
|
||||
pd[0] = pd[1] = pal * 0x01010101;
|
||||
if (sx & 3) {
|
||||
u8 *pd = (u8 *)(Pico.est.HighCol + sx);
|
||||
pd[0] = pd[1] = pd[2] = pd[3] = pal;
|
||||
pd[4] = pd[5] = pd[6] = pd[7] = pal;
|
||||
} else {
|
||||
u32 *pd = (u32 *)(Pico.est.HighCol + sx);
|
||||
pd[0] = pd[1] = pal * 0x01010101;
|
||||
}
|
||||
}
|
||||
|
||||
// 8 pixels are arranged in 4 bitplane bytes in a 32 bit word. To pull the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue