diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/animation/simpleanimation.cpp | 1 | ||||
-rw-r--r-- | src/resources/atlas/atlasmanager.cpp | 6 | ||||
-rw-r--r-- | src/resources/db/itemdb.cpp | 2 | ||||
-rw-r--r-- | src/resources/delayedmanager.cpp | 1 | ||||
-rw-r--r-- | src/resources/dye/dye.cpp | 4 | ||||
-rw-r--r-- | src/resources/dye/dye.h | 16 | ||||
-rw-r--r-- | src/resources/dye/dyepalette.h | 2 | ||||
-rw-r--r-- | src/resources/imagehelper.cpp | 5 | ||||
-rw-r--r-- | src/resources/loaders/imageloader.cpp | 1 | ||||
-rw-r--r-- | src/resources/map/map.cpp | 1 | ||||
-rw-r--r-- | src/resources/map/mapitem.cpp | 2 | ||||
-rw-r--r-- | src/resources/map/maplayer.cpp | 1 | ||||
-rw-r--r-- | src/resources/map/speciallayer.cpp | 1 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 2 | ||||
-rw-r--r-- | src/resources/openglimagehelper.cpp | 5 | ||||
-rw-r--r-- | src/resources/resourcemanager/resourcemanager.cpp | 1 | ||||
-rw-r--r-- | src/resources/safeopenglimagehelper.cpp | 5 | ||||
-rw-r--r-- | src/resources/sdlimagehelper.cpp | 4 | ||||
-rw-r--r-- | src/resources/sprite/animatedsprite.cpp | 1 | ||||
-rw-r--r-- | src/resources/sprite/imagesprite.cpp | 2 | ||||
-rw-r--r-- | src/resources/sprite/spritedef.cpp | 1 | ||||
-rw-r--r-- | src/resources/wallpaper.cpp | 6 |
22 files changed, 43 insertions, 27 deletions
diff --git a/src/resources/animation/simpleanimation.cpp b/src/resources/animation/simpleanimation.cpp index 818830383..98f8dbfab 100644 --- a/src/resources/animation/simpleanimation.cpp +++ b/src/resources/animation/simpleanimation.cpp @@ -37,6 +37,7 @@ #include "utils/checkutils.h" #include "utils/delete2.h" +#include "utils/performance.h" #include "debug.h" diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp index a2a4b112f..c9ea324dd 100644 --- a/src/resources/atlas/atlasmanager.cpp +++ b/src/resources/atlas/atlasmanager.cpp @@ -31,9 +31,6 @@ #include "fs/virtfs/rwops.h" -#include "utils/mathutils.h" -#include "utils/sdlcheckutils.h" - #include "resources/openglimagehelper.h" #include "resources/atlas/atlasresource.h" @@ -51,6 +48,9 @@ PRAGMA48(GCC diagnostic ignored "-Wshadow") PRAGMA48(GCC diagnostic pop) #include "utils/checkutils.h" +#include "utils/mathutils.h" +#include "utils/performance.h" +#include "utils/sdlcheckutils.h" #include "debug.h" diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 1370b7950..1280f8b79 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -349,7 +349,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, if (iconColors.empty()) iconColors = colors; - // check for empty hair palete + // check for empty hair palette if (id <= -1 && id > -100) { if (colors.empty()) diff --git a/src/resources/delayedmanager.cpp b/src/resources/delayedmanager.cpp index 6276665bb..997715dd8 100644 --- a/src/resources/delayedmanager.cpp +++ b/src/resources/delayedmanager.cpp @@ -24,6 +24,7 @@ #include "resources/sprite/animationdelayload.h" #include "utils/foreach.h" +#include "utils/performance.h" #include "utils/timer.h" #include "debug.h" diff --git a/src/resources/dye/dye.cpp b/src/resources/dye/dye.cpp index ff40545fc..a72bf8419 100644 --- a/src/resources/dye/dye.cpp +++ b/src/resources/dye/dye.cpp @@ -148,9 +148,9 @@ void Dye::instantiate(std::string &restrict target, int Dye::getType() const restrict2 noexcept2 { - if (mDyePalettes[sPaleteIndex] != nullptr) + if (mDyePalettes[sPaletteIndex] != nullptr) return 1; - if (mDyePalettes[aPaleteIndex] != nullptr) + if (mDyePalettes[aPaletteIndex] != nullptr) return 2; return 0; } diff --git a/src/resources/dye/dye.h b/src/resources/dye/dye.h index c359c9b24..442721c6a 100644 --- a/src/resources/dye/dye.h +++ b/src/resources/dye/dye.h @@ -31,8 +31,8 @@ class DyePalette; const int dyePalateSize = 9; -const int sPaleteIndex = 7; -const int aPaleteIndex = 8; +const int sPaletteIndex = 7; +const int aPaletteIndex = 8; /** * Class for dispatching pixel-recoloring amongst several palettes. @@ -62,16 +62,16 @@ class Dye final const std::string &restrict palettes); /** - * Return special dye palete (S) + * Return special dye palette (S) */ - const DyePalette *getSPalete() const restrict2 noexcept2 A_WARN_UNUSED - { return mDyePalettes[sPaleteIndex]; } + const DyePalette *getSPalette() const restrict2 noexcept2 A_WARN_UNUSED + { return mDyePalettes[sPaletteIndex]; } /** - * Return special dye palete (A) + * Return special dye palette (A) */ - const DyePalette *getAPalete() const restrict2 noexcept2 A_WARN_UNUSED - { return mDyePalettes[aPaleteIndex]; } + const DyePalette *getAPalette() const restrict2 noexcept2 A_WARN_UNUSED + { return mDyePalettes[aPaletteIndex]; } /** * Return dye type for S - 1, for A - 2, 0 for other diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h index 7f57e3c5f..cffa985d1 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -51,7 +51,7 @@ class DyePalette final * The string is either a file name or a sequence of hexadecimal RGB * values separated by ',' and starting with '#'. */ - DyePalette(const std::string &restrict pallete, + DyePalette(const std::string &restrict description, const uint8_t blockSize); A_DELETE_COPY(DyePalette) diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index b400dd1f9..71f3cc5a9 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -28,6 +28,7 @@ #include "resources/dye/dye.h" #include "resources/dye/dyepalette.h" +#include "utils/performance.h" #include "utils/sdlcheckutils.h" PRAGMA48(GCC diagnostic push) @@ -105,14 +106,14 @@ Image *ImageHelper::load(SDL_RWops *const rw, Dye const &dye) { case 1: { - const DyePalette *const pal = dye.getSPalete(); + const DyePalette *const pal = dye.getSPalette(); if (pal != nullptr) DYEPALETTEP(pal, SColor)(pixels, surf->w * surf->h); break; } case 2: { - const DyePalette *const pal = dye.getAPalete(); + const DyePalette *const pal = dye.getAPalette(); if (pal != nullptr) DYEPALETTEP(pal, AColor)(pixels, surf->w * surf->h); break; diff --git a/src/resources/loaders/imageloader.cpp b/src/resources/loaders/imageloader.cpp index a24e63e36..48100dce6 100644 --- a/src/resources/loaders/imageloader.cpp +++ b/src/resources/loaders/imageloader.cpp @@ -34,6 +34,7 @@ #include "resources/dye/dye.h" #include "utils/checkutils.h" +#include "utils/performance.h" #include "debug.h" diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index bfc7c7534..8b4196092 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -70,6 +70,7 @@ #include "utils/delete2.h" #include "utils/dtor.h" #include "utils/foreach.h" +#include "utils/performance.h" #include "utils/timer.h" #include <sys/stat.h> diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp index 5041165c3..27c3617db 100644 --- a/src/resources/map/mapitem.cpp +++ b/src/resources/map/mapitem.cpp @@ -34,6 +34,8 @@ #include "render/graphics.h" +#include "utils/performance.h" + #include "debug.h" MapItem::MapItem() : diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 44c71b0c9..d910edd1d 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -35,6 +35,7 @@ #ifdef USE_OPENGL #include "utils/foreach.h" #endif // USE_OPENGL +#include "utils/performance.h" #include "render/graphics.h" diff --git a/src/resources/map/speciallayer.cpp b/src/resources/map/speciallayer.cpp index 597d53141..b42302099 100644 --- a/src/resources/map/speciallayer.cpp +++ b/src/resources/map/speciallayer.cpp @@ -29,6 +29,7 @@ #include "utils/delete2.h" #include "utils/foreach.h" +#include "utils/performance.h" #include "debug.h" diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 88bd312d8..5b0dbc080 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -61,8 +61,8 @@ #include "utils/base64.h" #include "utils/checkutils.h" #include "utils/delete2.h" +#include "utils/performance.h" #include "utils/stringmap.h" - #include "utils/translation/podict.h" #include <zlib.h> diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 9f3b1fcd4..2221ffb05 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -45,6 +45,7 @@ #include "resources/image/image.h" #include "utils/checkutils.h" +#include "utils/performance.h" #include "utils/sdlcheckutils.h" #include "debug.h" @@ -86,14 +87,14 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye) { case 1: { - const DyePalette *const pal = dye.getSPalete(); + const DyePalette *const pal = dye.getSPalette(); if (pal != nullptr) DYEPALETTEP(pal, SOGLColor)(pixels, surf->w * surf->h); break; } case 2: { - const DyePalette *const pal = dye.getAPalete(); + const DyePalette *const pal = dye.getAPalette(); if (pal != nullptr) DYEPALETTEP(pal, AOGLColor)(pixels, surf->w * surf->h); break; diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp index ea3bb9133..45a17565e 100644 --- a/src/resources/resourcemanager/resourcemanager.cpp +++ b/src/resources/resourcemanager/resourcemanager.cpp @@ -36,6 +36,7 @@ #include "utils/cast.h" #include "utils/checkutils.h" #include "utils/foreach.h" +#include "utils/performance.h" #include "utils/stringutils.h" #if !defined(DEBUG_DUMP_LEAKS) && !defined(UNITTESTS) diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp index 7c273829e..962d1434a 100644 --- a/src/resources/safeopenglimagehelper.cpp +++ b/src/resources/safeopenglimagehelper.cpp @@ -41,6 +41,7 @@ #include "resources/image/image.h" +#include "utils/performance.h" #include "utils/sdlcheckutils.h" #include "debug.h" @@ -83,14 +84,14 @@ Image *SafeOpenGLImageHelper::load(SDL_RWops *const rw, { case 1: { - const DyePalette *const pal = dye.getSPalete(); + const DyePalette *const pal = dye.getSPalette(); if (pal != nullptr) DYEPALETTEP(pal, SOGLColor)(pixels, surf->w * surf->h); break; } case 2: { - const DyePalette *const pal = dye.getAPalete(); + const DyePalette *const pal = dye.getAPalette(); if (pal != nullptr) DYEPALETTEP(pal, AOGLColor)(pixels, surf->w * surf->h); break; diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index ab780cd33..d9a5e27dd 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -109,14 +109,14 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) { case 1: { - const DyePalette *const pal = dye.getSPalete(); + const DyePalette *const pal = dye.getSPalette(); if (pal != nullptr) DYEPALETTEP(pal, SColor)(pixels, surf->w * surf->h); break; } case 2: { - const DyePalette *const pal = dye.getAPalete(); + const DyePalette *const pal = dye.getAPalette(); if (pal != nullptr) DYEPALETTEP(pal, AColor)(pixels, surf->w * surf->h); break; diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp index 60a42e6ef..b443fcedb 100644 --- a/src/resources/sprite/animatedsprite.cpp +++ b/src/resources/sprite/animatedsprite.cpp @@ -43,6 +43,7 @@ #include "utils/delete2.h" #include "utils/likely.h" #include "utils/mrand.h" +#include "utils/performance.h" #include "debug.h" diff --git a/src/resources/sprite/imagesprite.cpp b/src/resources/sprite/imagesprite.cpp index 3e866ea9c..bbee6dba0 100644 --- a/src/resources/sprite/imagesprite.cpp +++ b/src/resources/sprite/imagesprite.cpp @@ -24,6 +24,8 @@ #include "render/graphics.h" +#include "utils/performance.h" + #include "debug.h" ImageSprite::ImageSprite(Image *const image) : diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp index 2bf1cf0a9..b317465dd 100644 --- a/src/resources/sprite/spritedef.cpp +++ b/src/resources/sprite/spritedef.cpp @@ -32,6 +32,7 @@ #include "utils/checkutils.h" #include "utils/foreach.h" +#include "utils/performance.h" #include "resources/action.h" #include "resources/imageset.h" diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 14dc07ae9..57229de5d 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -35,11 +35,11 @@ #include <algorithm> -#ifdef WIN32 +#ifdef _WIN32 #include <sys/time.h> -#else // WIN32 +#else // _WIN32 #include <ctime> -#endif // WIN32 +#endif // _WIN32 #include "debug.h" |