eriktorbjorn's fix for a crash when sprite were completely outside of the screen
svn-id: r12106
This commit is contained in:
parent
74f958fdf1
commit
edea972b4b
1 changed files with 17 additions and 14 deletions
|
@ -710,6 +710,8 @@ void SwordScreen::spriteClipAndSet(uint16 *pSprX, uint16 *pSprY, uint16 *pSprWid
|
|||
*pSprX = (uint16)sprX;
|
||||
*pSprY = (uint16)sprY;
|
||||
|
||||
if (*pSprWidth && *pSprHeight) {
|
||||
// sprite will be drawn, so mark it in the grid buffer
|
||||
uint16 gridH = (*pSprHeight + SCRNGRID_Y - 1) / SCRNGRID_Y;
|
||||
uint16 gridW = (*pSprWidth + SCRNGRID_X - 1) / SCRNGRID_X;
|
||||
uint16 gridX = sprX / SCRNGRID_X;
|
||||
|
@ -725,6 +727,7 @@ void SwordScreen::spriteClipAndSet(uint16 *pSprX, uint16 *pSprY, uint16 *pSprWid
|
|||
gridBuf[cntx] |= 0x80;
|
||||
gridBuf += _gridSizeX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SwordScreen::fnFlash(uint8 color) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue