diff --git a/stepmania/src/SDL_utils.cpp b/stepmania/src/SDL_utils.cpp index 1937a7a91a..ff12bf46be 100644 --- a/stepmania/src/SDL_utils.cpp +++ b/stepmania/src/SDL_utils.cpp @@ -1229,3 +1229,17 @@ SDL_RWops *OpenRWops( CString &sBuf ) rw->close = RWString_Close; return rw; } + +SDL_Surface *mySDL_MakeDummySurface( int height, int width ) +{ + SDL_Surface *ret_image = SDL_CreateRGBSurfaceSane( + SDL_SWSURFACE, width, height, 8, 0,0,0,0); + ASSERT( ret_image != NULL ); + + SDL_Color pink = { 0xFF, 0x10, 0xFF, 0xFF }; + SDL_SetPalette( ret_image, SDL_LOGPAL, &pink, 0, 1 ); + + memset( ret_image->pixels, 0, ret_image->h*ret_image->pitch ); + + return ret_image; +} diff --git a/stepmania/src/SDL_utils.h b/stepmania/src/SDL_utils.h index a5c406afce..ba88717241 100644 --- a/stepmania/src/SDL_utils.h +++ b/stepmania/src/SDL_utils.h @@ -75,6 +75,7 @@ SDL_Surface *SDL_LoadImage( const CString &sPath ); SDL_RWops *OpenRWops( const CString &sPath, bool Write=false ); SDL_RWops *OpenRWops( CString &sBuf ); +SDL_Surface *mySDL_MakeDummySurface( int height, int width ); #endif