diff options
-rw-r--r-- | src/map.cpp | 5 | ||||
-rw-r--r-- | src/resources/imagehelper.h | 31 |
2 files changed, 16 insertions, 20 deletions
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 <code>NULL</code> 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); |