From 25adf485cd4eae706ad0d49c05f247e935e8d267 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 15 Jun 2012 02:16:54 +0300 Subject: Fix code style. --- src/map.cpp | 5 +---- src/resources/imagehelper.h | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/map.cpp b/src/map.cpp index 516ae833c..505830db8 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -583,10 +583,7 @@ void Map::drawAmbientLayers(Graphics *graphics, LayerType type, layers = &mBackgrounds; break; default: - // New type of ambient layers added here without adding it - // to Map::drawAmbientLayers. - assert(false); - break; + return; } // Draw overlays diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h index 7ba5cbc98..7e2bee20d 100644 --- a/src/resources/imagehelper.h +++ b/src/resources/imagehelper.h @@ -56,30 +56,29 @@ class ImageHelper */ Resource *load(SDL_RWops *rw); - /** - * Loads an image from an SDL_RWops structure and recolors it. - * - * @param rw The SDL_RWops to load the image from. - * @param dye The dye used to recolor the image. - * - * @return NULL if an error occurred, a valid pointer - * otherwise. - */ +#ifdef __GNUC__ + virtual Resource *load(SDL_RWops *rw, Dye const &dye) = 0; + + virtual Image *load(SDL_Surface *) = 0; + + virtual Image *createTextSurface(SDL_Surface *tmpImage, + float alpha) = 0; + + virtual int useOpenGL() = 0; +#else virtual Resource *load(SDL_RWops *rw, Dye const &dye) - { } + { return nullptr; } - /** - * Loads an image from an SDL surface. - */ virtual Image *load(SDL_Surface *) - { } + { return nullptr; } virtual Image *createTextSurface(SDL_Surface *tmpImage, float alpha) - { } + { return nullptr; } virtual int useOpenGL() - { } + { return 0; } +#endif SDL_Surface *convertTo32Bit(SDL_Surface* tmpImage); -- cgit v1.2.3-60-g2f50