Reduce extra sprites in tiled images. Mild speedup to the danger

background.

The background isn't (usually) the screen size anymore, so SCREEN_*
doesn't seem to make much sense here.  Actually, I'm not sure it ever
really did, since unless the screen is 640x480, the image will get resized
anyway ... we should probably have a way of specifying the tile dimensions.
This commit is contained in:
Glenn Maynard
2002-10-16 03:32:18 +00:00
parent 74d7f20479
commit 7b8526af26
+2 -2
View File
@@ -231,8 +231,8 @@ found_effect:
case EFFECT_TILE_PULSE:
{
m_Sprites[0].Load( sPath );
int iNumTilesWide = SCREEN_WIDTH /(int)m_Sprites[0].GetUnzoomedWidth() + 2;
int iNumTilesHigh = SCREEN_HEIGHT/(int)m_Sprites[0].GetUnzoomedHeight() + 2;
int iNumTilesWide = int(ceil(SCREEN_WIDTH /m_Sprites[0].GetUnzoomedWidth()));
int iNumTilesHigh = int(ceil(SCREEN_HEIGHT/m_Sprites[0].GetUnzoomedHeight()));
iNumTilesWide = min( iNumTilesWide, MAX_TILES_WIDE );
iNumTilesHigh = min( iNumTilesHigh, MAX_TILES_HIGH );