Knights of Valour sprite alignment fix. This should resolve a graphical issue JackC pointed out to me ages ago. Will someone else please test to make sure I didn't re-introduce the crash bug in dmnfront?
This commit is contained in:
parent
2b173db380
commit
7018449fef
|
@ -154,18 +154,17 @@ static void pgm_draw_sprite_nozoom(INT32 wide, INT32 high, INT32 palt, INT32 bof
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yoff >= 0 && yoff < nScreenHeight && xpos >= 0 && (xpos + wide + 8) < nScreenWidth)
|
if (yoff >= 0 && yoff < nScreenHeight && xpos >= 0 && (xpos + wide) < nScreenWidth)
|
||||||
{
|
{
|
||||||
for (INT32 xcnt = 0; xcnt < wide; xcnt+=8)
|
for (INT32 xcnt = 0; xcnt < wide; xcnt+=8)
|
||||||
{
|
{
|
||||||
if (flipx) {
|
if (flipx) {
|
||||||
xoff = xpos + (wide - xcnt);
|
xoff = xpos + ((wide - 8) - xcnt);
|
||||||
} else {
|
} else {
|
||||||
xoff = xpos + xcnt;
|
xoff = xpos + xcnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
aoffset += drawsprite[bdata[boffset & bdatasize]](dest + xoff, pdest + xoff, PGMSPRColROM + (aoffset & nPGMSPRColMaskLen), palt, prio);
|
aoffset += drawsprite[bdata[boffset & bdatasize]](dest + xoff, pdest + xoff, PGMSPRColROM + (aoffset & nPGMSPRColMaskLen), palt, prio);
|
||||||
|
|
||||||
boffset++;
|
boffset++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -182,7 +181,7 @@ static void pgm_draw_sprite_nozoom(INT32 wide, INT32 high, INT32 palt, INT32 bof
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flipx) {
|
if (flipx) {
|
||||||
xoff = xpos + (wide - xcnt);
|
xoff = xpos + (wide - xcnt) - 1;
|
||||||
|
|
||||||
if (xoff < -7 || xoff >= nScreenWidth+8) {
|
if (xoff < -7 || xoff >= nScreenWidth+8) {
|
||||||
aoffset += sprmsktab[msk];
|
aoffset += sprmsktab[msk];
|
||||||
|
|
Loading…
Reference in New Issue