diff --git a/stepmania/src/BannerCache.cpp b/stepmania/src/BannerCache.cpp index 04e8d8b3c0..804139395e 100644 --- a/stepmania/src/BannerCache.cpp +++ b/stepmania/src/BannerCache.cpp @@ -159,9 +159,9 @@ struct BannerTexture: public RageTexture img->h > DISPLAY->GetMaxTextureSize() ) { LOG->Warn("Converted %s at runtime", GetID().filename.c_str() ); - RageSurfaceUtils::ConvertSurface(img, img->w, img->h, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000); - zoomSurface(img, min( img->w, DISPLAY->GetMaxTextureSize() ), - min( img->h, DISPLAY->GetMaxTextureSize() )); + int width = min( img->w, DISPLAY->GetMaxTextureSize() ); + int height = min( img->h, DISPLAY->GetMaxTextureSize() ); + RageSurfaceUtils::Zoom( img, width, height ); } /* We did this when we cached it. */ @@ -375,8 +375,7 @@ void BannerCache::CacheBannerInternal( CString BannerPath ) RageSurfaceUtils::ApplyHotPinkColorKey( img ); { - RageSurfaceUtils::ConvertSurface(img, img->w, img->h, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000); - zoomSurface(img, width, height); + RageSurfaceUtils::Zoom( img, width, height ); /* Dither to the final format. We use A1RGB5, since that's usually supported * natively by both OpenGL and D3D. */ diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 9c1e11c293..0b58b84ecc 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -151,9 +151,7 @@ void RageBitmapTexture::Create() } if( img->w != m_iImageWidth || img->h != m_iImageHeight ) - { - zoomSurface(img, m_iImageWidth, m_iImageHeight ); - } + RageSurfaceUtils::Zoom( img, m_iImageWidth, m_iImageHeight ); // Format of the image that we will pass to OpenGL and that we want OpenGL to use RageDisplay::PixelFormat pixfmt; diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index 160e2bc8fb..f372d5733f 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -660,7 +660,7 @@ bool RageDisplay::SaveScreenshot( CString sPath, GraphicsFileFormat format ) * there's no sense in saving 1280x960 screenshots, and if we're in a custom * resolution (eg. 640x240), we don't want to output in that resolution. */ if( format != SAVE_LOSSLESS && (surface->h != 640 || surface->w != 480) ) - zoomSurface( surface, 640, 480 ); + RageSurfaceUtils::Zoom( surface, 640, 480 ); RageFile out; if( !out.Open( sPath, RageFile::WRITE ) ) diff --git a/stepmania/src/SDL_rotozoom.cpp b/stepmania/src/SDL_rotozoom.cpp index 4934fe2e61..12f3af806f 100644 --- a/stepmania/src/SDL_rotozoom.cpp +++ b/stepmania/src/SDL_rotozoom.cpp @@ -131,7 +131,7 @@ static void ZoomSurface( const RageSurface * src, RageSurface * dst ) } -void zoomSurface( RageSurface *&src, int dstwidth, int dstheight ) +void RageSurfaceUtils::Zoom( RageSurface *&src, int dstwidth, int dstheight ) { if( src == NULL ) return; diff --git a/stepmania/src/SDL_rotozoom.h b/stepmania/src/SDL_rotozoom.h index dc40f7aa2c..83bcef46fe 100644 --- a/stepmania/src/SDL_rotozoom.h +++ b/stepmania/src/SDL_rotozoom.h @@ -2,7 +2,10 @@ #define SDL_ROTOZOOM_H struct RageSurface; -void zoomSurface( RageSurface *&src, int dstwidth, int dstheight ); +namespace RageSurfaceUtils +{ + void Zoom( RageSurface *&src, int width, int height ); +}; #endif diff --git a/stepmania/src/SDL_utils.cpp b/stepmania/src/SDL_utils.cpp index 966d58c760..64fcc0d352 100644 --- a/stepmania/src/SDL_utils.cpp +++ b/stepmania/src/SDL_utils.cpp @@ -124,9 +124,7 @@ void mySDL_WM_SetIcon( CString sIconFile ) /* Windows icons are 32x32 and SDL can't resize them for us, which * causes mask corruption. (Actually, the above icon *is* 32x32; * this is here just in case it changes.) */ - RageSurfaceUtils::ConvertSurface(srf, srf->w, srf->h, - 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); - zoomSurface(srf, 32, 32); + RageSurfaceUtils::Zoom( srf, 32, 32 ); SDL_Surface *sdl_srf = SDLSurfaceFromRageSurface( srf ); delete srf;