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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user