From 7b8526af26d5a3375739bdcf4d5f520a85a35a28 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 16 Oct 2002 03:32:18 +0000 Subject: [PATCH] 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. --- stepmania/src/BGAnimationLayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index 1f132f2ce8..893bd52935 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -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 );