- Fixed a memory corruption when double sized sprites were used at screen borders

This commit is contained in:
shashclp 2007-03-04 18:05:15 +00:00
parent 610bc139bb
commit 98d254fb4f
1 changed files with 5 additions and 5 deletions

View File

@ -1123,7 +1123,7 @@ void sprite1D(GPU * gpu, u16 l, u8 * dst, u8 * prioTab)
if(sprX<0)
{
// If sprite is not in the window
if(sprX+sprSize.x<=0)
if(sprX + fieldX <= 0)
continue;
// Otherwise, is partially visible
@ -1134,7 +1134,7 @@ void sprite1D(GPU * gpu, u16 l, u8 * dst, u8 * prioTab)
}
else
{
if(sprX+sprSize.x>256)
if(sprX+fieldX>256)
lg = 255 - sprX;
}
@ -1365,7 +1365,7 @@ void sprite2D(GPU * gpu, u16 l, u8 * dst, u8 * prioTab)
if(sprX<0)
{
// If sprite is not in the window
if(sprX+sprSize.x<=0)
if(sprX + fieldX <= 0)
continue;
// Otherwise, is partially visible
@ -1376,7 +1376,7 @@ void sprite2D(GPU * gpu, u16 l, u8 * dst, u8 * prioTab)
}
else
{
if(sprX+sprSize.x>256)
if(sprX+fieldX>256)
lg = 255 - sprX;
}