diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-23 21:29:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-23 21:29:47 +0300 |
commit | 90132a83c309b5ae0c699e4fbbb7c62656321301 (patch) | |
tree | 9bd6bbac6df7cfcd67d30535d30ef1b8bd25ab3f /src/resources | |
parent | 9c1e1e3c8af21342da1bdf616a800ff373cad433 (diff) | |
download | manaverse-90132a83c309b5ae0c699e4fbbb7c62656321301.tar.gz manaverse-90132a83c309b5ae0c699e4fbbb7c62656321301.tar.bz2 manaverse-90132a83c309b5ae0c699e4fbbb7c62656321301.tar.xz manaverse-90132a83c309b5ae0c699e4fbbb7c62656321301.zip |
Fix code style.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/iteminfo.cpp | 3 | ||||
-rw-r--r-- | src/resources/sdlgfxblitfunc.cpp | 19 | ||||
-rw-r--r-- | src/resources/sdlgfxblitfunc.h | 4 | ||||
-rw-r--r-- | src/resources/sdlmusic.cpp | 3 | ||||
-rw-r--r-- | src/resources/sdlmusic.h | 3 |
5 files changed, 17 insertions, 15 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 8a142ec4d..6c8840f75 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -31,10 +31,9 @@ #include "resources/db/colordb.h" #include "resources/db/itemdb.h" -#include "configuration.h" - #include "utils/checkutils.h" #include "utils/dtor.h" +#include "utils/stringutils.h" #include "debug.h" diff --git a/src/resources/sdlgfxblitfunc.cpp b/src/resources/sdlgfxblitfunc.cpp index d7bc956f2..97a6e7bc4 100644 --- a/src/resources/sdlgfxblitfunc.cpp +++ b/src/resources/sdlgfxblitfunc.cpp @@ -332,7 +332,7 @@ namespace }; } // namespace -static void _SDL_gfxBlitBlitterRGBA(SDL_gfxBlitInfo *info) +static void _SDL_gfxBlitBlitterRGBA(const SDL_gfxBlitInfo *const info) { const int width = info->d_width; int height = info->d_height; @@ -388,10 +388,10 @@ static void _SDL_gfxBlitBlitterRGBA(SDL_gfxBlitInfo *info) } } -static int _SDL_gfxBlitRGBACall(SDL_Surface *const src, - SDL_Rect *const srcrect, - SDL_Surface *const dst, - SDL_Rect *const dstrect) +static int _SDL_gfxBlitRGBACall(const SDL_Surface *const src, + const SDL_Rect *const srcrect, + const SDL_Surface *const dst, + const SDL_Rect *const dstrect) { /* * Set up source and destination buffer pointers, then blit @@ -433,9 +433,9 @@ static int _SDL_gfxBlitRGBACall(SDL_Surface *const src, } int SDLgfxBlitRGBA(SDL_Surface *const src, - SDL_Rect *const srcrect, + const SDL_Rect *const srcrect, SDL_Surface *const dst, - SDL_Rect *const dstrect) + const SDL_Rect *const dstrect) { SDL_Rect sr; SDL_Rect dr; @@ -447,7 +447,8 @@ int SDLgfxBlitRGBA(SDL_Surface *const src, /* * Make sure the surfaces aren't locked */ - if ((src == nullptr) || (dst == nullptr)) + if (src == nullptr || + dst == nullptr) { reportAlways("SDLgfxBlitRGBA: passed a NULL surface"); return -1; @@ -499,7 +500,7 @@ int SDLgfxBlitRGBA(SDL_Surface *const src, /* * Clip the destination rectangle against the clip rectangle */ - SDL_Rect *clip = &dst->clip_rect; + const SDL_Rect *const clip = &dst->clip_rect; int dx; int dy; diff --git a/src/resources/sdlgfxblitfunc.h b/src/resources/sdlgfxblitfunc.h index 5060e3552..77a0d1e42 100644 --- a/src/resources/sdlgfxblitfunc.h +++ b/src/resources/sdlgfxblitfunc.h @@ -35,8 +35,8 @@ struct SDL_Rect; // src surface can be any format (most time 32 bit surface with any masks) // dst surface always correct 32 sufraces (shared format for all) int SDLgfxBlitRGBA(SDL_Surface *const src, - SDL_Rect *const srcrect, + const SDL_Rect *const srcrect, SDL_Surface *const dst, - SDL_Rect *const dstrect); + const SDL_Rect *const dstrect); #endif // RESOURCE_SDLGFXBLITFUNC_H diff --git a/src/resources/sdlmusic.cpp b/src/resources/sdlmusic.cpp index 4d604c8cb..d3801d453 100644 --- a/src/resources/sdlmusic.cpp +++ b/src/resources/sdlmusic.cpp @@ -57,7 +57,8 @@ SDLMusic::~SDLMusic() #endif // USE_SDL2 } -bool SDLMusic::play(const int loops, const int fadeIn) +bool SDLMusic::play(const int loops, + const int fadeIn) const { if (fadeIn > 0) return Mix_FadeInMusicPos(mMusic, loops, fadeIn, 0.0) != 0; diff --git a/src/resources/sdlmusic.h b/src/resources/sdlmusic.h index 44262b840..70614c420 100644 --- a/src/resources/sdlmusic.h +++ b/src/resources/sdlmusic.h @@ -66,7 +66,8 @@ class SDLMusic final : public Resource * @return <code>true</code> if the playback started properly * <code>false</code> otherwise. */ - bool play(const int loops = -1, const int fadeIn = 0); + bool play(const int loops = -1, + const int fadeIn = 0) const; int calcMemoryLocal() const override final; |