eriktorbjorn's fix for a crash when sprite were completely outside of the screen

svn-id: r12106
This commit is contained in:
Robert Göffringmann 2004-01-03 10:49:08 +00:00
parent 74f958fdf1
commit edea972b4b

View file

@ -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) {