diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-15 02:16:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-15 02:16:54 +0300 |
commit | 25adf485cd4eae706ad0d49c05f247e935e8d267 (patch) | |
tree | 70f078c0668fe8e6527c3374708331bac7591076 | |
parent | 9aefc65b5f9802568c814f9768577e045b513f29 (diff) | |
download | manaplus-25adf485cd4eae706ad0d49c05f247e935e8d267.tar.gz manaplus-25adf485cd4eae706ad0d49c05f247e935e8d267.tar.bz2 manaplus-25adf485cd4eae706ad0d49c05f247e935e8d267.tar.xz manaplus-25adf485cd4eae706ad0d49c05f247e935e8d267.zip |
Fix code style.
-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); |