summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-25 19:32:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-25 19:32:59 +0300
commit1b1a7cea1c6b81438bacc86b93cb80a78430790f (patch)
treed23f4e0beea6b4e5c570afafd9ad9de6b68ba812 /src/resources
parentbb8be1acea37f09c134d7d4042869a679cf8a12b (diff)
downloadplus-1b1a7cea1c6b81438bacc86b93cb80a78430790f.tar.gz
plus-1b1a7cea1c6b81438bacc86b93cb80a78430790f.tar.bz2
plus-1b1a7cea1c6b81438bacc86b93cb80a78430790f.tar.xz
plus-1b1a7cea1c6b81438bacc86b93cb80a78430790f.zip
Change namespace in resources loaders from other to Loader.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/item/item.cpp4
-rw-r--r--src/resources/loaders/imageloader.cpp2
-rw-r--r--src/resources/loaders/imageloader.h4
-rw-r--r--src/resources/loaders/musicloader.cpp4
-rw-r--r--src/resources/loaders/musicloader.h4
-rw-r--r--src/resources/map/map.cpp4
-rw-r--r--src/resources/map/mapitem.cpp2
-rw-r--r--src/resources/mapreader.cpp2
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp2
9 files changed, 14 insertions, 14 deletions
diff --git a/src/resources/item/item.cpp b/src/resources/item/item.cpp
index 8400e2675..9d3a1b3f8 100644
--- a/src/resources/item/item.cpp
+++ b/src/resources/item/item.cpp
@@ -100,7 +100,7 @@ void Item::setId(const int id,
const std::string dye = combineDye2(paths.getStringValue(
"itemIcons").append(info.getDisplay().image),
info.getDyeIconColorsString(color));
- mImage = ImageLoader::getImage(dye);
+ mImage = Loader::getImage(dye);
if (!mImage)
{
@@ -121,7 +121,7 @@ Image *Item::getImage(const int id,
const ItemColor color)
{
const ItemInfo &info = ItemDB::get(id);
- Image *image = ImageLoader::getImage(combineDye2(paths.getStringValue(
+ Image *image = Loader::getImage(combineDye2(paths.getStringValue(
"itemIcons").append(info.getDisplay().image),
info.getDyeIconColorsString(color)));
diff --git a/src/resources/loaders/imageloader.cpp b/src/resources/loaders/imageloader.cpp
index 936d9b090..d3ab9facc 100644
--- a/src/resources/loaders/imageloader.cpp
+++ b/src/resources/loaders/imageloader.cpp
@@ -80,7 +80,7 @@ namespace
};
} // namespace
-Image *ImageLoader::getImage(const std::string &idPath)
+Image *Loader::getImage(const std::string &idPath)
{
DyedImageLoader rl = { idPath };
return static_cast<Image*>(resourceManager->get(idPath,
diff --git a/src/resources/loaders/imageloader.h b/src/resources/loaders/imageloader.h
index 6d60782a5..725511ede 100644
--- a/src/resources/loaders/imageloader.h
+++ b/src/resources/loaders/imageloader.h
@@ -29,13 +29,13 @@
class Image;
-namespace ImageLoader
+namespace Loader
{
/**
* Convenience wrapper around ResourceManager::get for loading
* images.
*/
Image *getImage(const std::string &idPath) A_WARN_UNUSED;
-} // namespace ImageLoader
+} // namespace Loader
#endif // RESOURCES_LOADERS_IMAGELOADER_H
diff --git a/src/resources/loaders/musicloader.cpp b/src/resources/loaders/musicloader.cpp
index 0b47cc269..2751dbfae 100644
--- a/src/resources/loaders/musicloader.cpp
+++ b/src/resources/loaders/musicloader.cpp
@@ -60,14 +60,14 @@ namespace
};
} // namespace
-SDLMusic *MusicLoader::getMusic(const std::string &idPath)
+SDLMusic *Loader::getMusic(const std::string &idPath)
{
ResourceLoader rl = { idPath, &SDLMusic::load };
return static_cast<SDLMusic*>(resourceManager->get(
idPath, ResourceLoader::load, &rl));
}
-SoundEffect *MusicLoader::getSoundEffect(const std::string &idPath)
+SoundEffect *Loader::getSoundEffect(const std::string &idPath)
{
ResourceLoader rl = { idPath, &SoundEffect::load };
return static_cast<SoundEffect*>(resourceManager->get(
diff --git a/src/resources/loaders/musicloader.h b/src/resources/loaders/musicloader.h
index 0d005414f..233fe9a03 100644
--- a/src/resources/loaders/musicloader.h
+++ b/src/resources/loaders/musicloader.h
@@ -31,7 +31,7 @@ class SDLMusic;
class Resource;
class SoundEffect;
-namespace MusicLoader
+namespace Loader
{
/**
* Convenience wrapper around ResourceManager::get for loading
@@ -44,6 +44,6 @@ namespace MusicLoader
* samples.
*/
SoundEffect *getSoundEffect(const std::string &idPath) A_WARN_UNUSED;
-}
+} // namespace Loader
#endif // RESOURCES_RESOURCEMANAGER_MUSICLOADER_H
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index a5e14fc10..98a29a8e8 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -236,7 +236,7 @@ void Map::initializeAmbientLayers() restrict2
break; // the FOR loop
}
- Image *restrict const img = ImageLoader::getImage(
+ Image *restrict const img = Loader::getImage(
getProperty(name + "image"));
if (img)
{
@@ -266,7 +266,7 @@ void Map::initializeAmbientLayers() restrict2
toString(i)).append("image")); i ++)
{
const std::string name("background" + toString(i));
- Image *restrict const img = ImageLoader::getImage(
+ Image *restrict const img = Loader::getImage(
getProperty(name + "image"));
if (img)
diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp
index 6443bb196..eb7676342 100644
--- a/src/resources/map/mapitem.cpp
+++ b/src/resources/map/mapitem.cpp
@@ -115,7 +115,7 @@ void MapItem::setType(const int type)
}
if (!name.empty())
- mImage = ImageLoader::getImage(name);
+ mImage = Loader::getImage(name);
else
mImage = nullptr;
}
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 036918f66..161144a7d 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -1050,7 +1050,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
if (!source.empty())
{
- Image *const tilebmp = ImageLoader::getImage(
+ Image *const tilebmp = Loader::getImage(
resolveRelativePath(pathDir, source));
if (tilebmp)
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index e9b8c687b..aca30726b 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -539,7 +539,7 @@ struct ImageSetLoader final
const ImageSetLoader *const
rl = static_cast<const ImageSetLoader *const>(v);
- Image *const img = ImageLoader::getImage(rl->path);
+ Image *const img = Loader::getImage(rl->path);
if (!img)
{
reportAlways("Image loading error: %s", rl->path.c_str());