summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being/actorsprite.cpp2
-rw-r--r--src/dyetool/dyemain.cpp2
-rw-r--r--src/gui/models/langlistmodel.h2
-rw-r--r--src/gui/popups/itempopup.cpp2
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/skilldata.cpp2
-rw-r--r--src/gui/windows/mailviewwindow.cpp2
-rw-r--r--src/gui/windows/minimap.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/particle/particle.cpp2
-rw-r--r--src/particle/particleemitter.cpp6
-rw-r--r--src/particle/particleengine.cpp2
-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
-rw-r--r--src/soundmanager.cpp6
-rw-r--r--src/textcommand.cpp4
25 files changed, 35 insertions, 35 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 9b9361fb8..6d072adc7 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -416,7 +416,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
break;
}
imagePath = combineDye2(imagePath, color);
- Image *img = ImageLoader::getImage(imagePath);
+ Image *img = Loader::getImage(imagePath);
if (!img)
img = Theme::getImageFromTheme("unknown-item.png");
diff --git a/src/dyetool/dyemain.cpp b/src/dyetool/dyemain.cpp
index 4a94e76ed..4625e95fc 100644
--- a/src/dyetool/dyemain.cpp
+++ b/src/dyetool/dyemain.cpp
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
dst = argv[2];
}
- Image *image = ImageLoader::getImage(src);
+ Image *image = Loader::getImage(src);
if (!image)
{
printf("Error loading image\n");
diff --git a/src/gui/models/langlistmodel.h b/src/gui/models/langlistmodel.h
index e38c84a74..1c7ee99dd 100644
--- a/src/gui/models/langlistmodel.h
+++ b/src/gui/models/langlistmodel.h
@@ -95,7 +95,7 @@ class LangListModel final : public ExtendedListModel
const std::string icon = LANG_NAME[f].icon;
if (!icon.empty())
{
- mIcons[f] = ImageLoader::getImage("graphics/flags/"
+ mIcons[f] = Loader::getImage("graphics/flags/"
+ icon);
}
else
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 9ea7b2d9a..25ba7dafe 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -179,7 +179,7 @@ void ItemPopup::setItem(const ItemInfo &item,
if (showImage)
{
- Image *const image = ImageLoader::getImage(combineDye2(
+ Image *const image = Loader::getImage(combineDye2(
paths.getStringValue("itemIcons").append(item.getDisplay().image),
item.getDyeIconColorsString(color)));
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 796c27216..638b57c28 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -644,7 +644,7 @@ std::string Theme::resolveThemePath(const std::string &path)
Image *Theme::getImageFromTheme(const std::string &path)
{
- return ImageLoader::getImage(resolveThemePath(path));
+ return Loader::getImage(resolveThemePath(path));
}
ImageSet *Theme::getImageSetFromTheme(const std::string &path,
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index bb79ccb38..ba0698b5f 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -630,7 +630,7 @@ int BrowserBox::calcHeight()
const size_t sz = str.size();
if (sz > 2 && str.substr(sz - 1) == "~")
str = str.substr(0, sz - 1);
- Image *const img = ImageLoader::getImage(str);
+ Image *const img = Loader::getImage(str);
if (img)
{
img->incRef();
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 304533c3a..76d5d90b0 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -38,7 +38,7 @@ Icon::Icon(const Widget2 *const widget,
const std::string &file,
const AutoRelease autoRelease) :
Widget(widget),
- mImage(ImageLoader::getImage(file)),
+ mImage(Loader::getImage(file)),
mAutoRelease(autoRelease)
{
if (mImage)
diff --git a/src/gui/widgets/skilldata.cpp b/src/gui/widgets/skilldata.cpp
index f412cb7a0..507942e1b 100644
--- a/src/gui/widgets/skilldata.cpp
+++ b/src/gui/widgets/skilldata.cpp
@@ -61,7 +61,7 @@ SkillData::~SkillData()
void SkillData::setIcon(const std::string &iconPath)
{
if (!iconPath.empty())
- icon = ImageLoader::getImage(iconPath);
+ icon = Loader::getImage(iconPath);
if (!icon)
{
diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp
index 586703937..eb075a624 100644
--- a/src/gui/windows/mailviewwindow.cpp
+++ b/src/gui/windows/mailviewwindow.cpp
@@ -110,7 +110,7 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) :
{
const ItemInfo &item = ItemDB::get(message->itemId);
// +++ need use message->cards and ItemColorManager for colors
- Image *const image = ImageLoader::getImage(combineDye2(
+ Image *const image = Loader::getImage(combineDye2(
paths.getStringValue("itemIcons").append(
item.getDisplay().image),
item.getDyeIconColorsString(ItemColor_one)));
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index 746b452fe..1677169e0 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -187,7 +187,7 @@ void Minimap::setMap(const Map *const map)
}
if (!minimapName.empty())
- mMapImage = ImageLoader::getImage(minimapName);
+ mMapImage = Loader::getImage(minimapName);
else
mMapImage = nullptr;
mCustomMapImage = false;
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 92a57da43..b4323feb6 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -730,7 +730,7 @@ void NpcDialog::parseListItems(const std::string &itemString)
else
{
mItems.push_back(tmp.substr(pos + 1));
- Image *const img = ImageLoader::getImage(std::string(
+ Image *const img = Loader::getImage(std::string(
path).append(tmp.substr(0, pos)).append(".png"));
mImages.push_back(img);
}
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp
index 3c3a0b836..f7ecccd93 100644
--- a/src/particle/particle.cpp
+++ b/src/particle/particle.cpp
@@ -440,7 +440,7 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile,
imageSrc = XmlChildContent(node);
if (!imageSrc.empty() && !dyePalettes.empty())
Dye::instantiate(imageSrc, dyePalettes);
- Image *const img = ImageLoader::getImage(imageSrc);
+ Image *const img = Loader::getImage(imageSrc);
newParticle = new ImageParticle(img);
newParticle->setMap(mMap);
diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp
index eaebc16fd..1cfe93f6e 100644
--- a/src/particle/particleemitter.cpp
+++ b/src/particle/particleemitter.cpp
@@ -122,7 +122,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode,
{
if (!dyePalettes.empty())
Dye::instantiate(image, dyePalettes);
- mParticleImage = ImageLoader::getImage(image);
+ mParticleImage = Loader::getImage(image);
}
}
else if (name == "subimage")
@@ -134,7 +134,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode,
{
if (!dyePalettes.empty())
Dye::instantiate(image, dyePalettes);
- Image *img = ImageLoader::getImage(image);
+ Image *img = Loader::getImage(image);
if (img)
{
mParticleImage = Loader::getSubImage(img,
@@ -373,7 +373,7 @@ ImageSet *ParticleEmitter::getImageSet(XmlNodePtrConst node)
const int subX = XML::getProperty(node, "subX", -1);
if (subX != -1)
{
- Image *const img = ImageLoader::getImage(XML::getProperty(
+ Image *const img = Loader::getImage(XML::getProperty(
node, "imageset", ""));
if (!img)
return nullptr;
diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp
index bd05e967b..6fd9a79f9 100644
--- a/src/particle/particleengine.cpp
+++ b/src/particle/particleengine.cpp
@@ -176,7 +176,7 @@ Particle *ParticleEngine::addEffect(const std::string &restrict
imageSrc = XmlChildContent(node);
if (!imageSrc.empty() && !dyePalettes.empty())
Dye::instantiate(imageSrc, dyePalettes);
- Image *const img = ImageLoader::getImage(imageSrc);
+ Image *const img = Loader::getImage(imageSrc);
newParticle = new ImageParticle(img);
newParticle->setMap(mMap);
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());
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index 1ae9cb0a6..004cfacdf 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -330,7 +330,7 @@ static SDLMusic *loadMusic(const std::string &fileName,
reportAlways("Music file not found: %s", fileName.c_str());
return nullptr;
}
- return MusicLoader::getMusic(path);
+ return Loader::getMusic(path);
}
void SoundManager::playMusic(const std::string &fileName,
@@ -455,7 +455,7 @@ void SoundManager::playSfx(const std::string &path,
tmpPath = path;
else
tmpPath = paths.getValue("sfx", "sfx/").append(path);
- SoundEffect *const sample = MusicLoader::getSoundEffect(tmpPath);
+ SoundEffect *const sample = Loader::getSoundEffect(tmpPath);
if (sample)
{
logger->log("SoundManager::playSfx() Playing: %s", path.c_str());
@@ -497,7 +497,7 @@ void SoundManager::playGuiSfx(const std::string &path)
tmpPath = path;
else
tmpPath = paths.getValue("sfx", "sfx/").append(path);
- SoundEffect *const sample = MusicLoader::getSoundEffect(tmpPath);
+ SoundEffect *const sample = Loader::getSoundEffect(tmpPath);
if (sample)
{
logger->log("SoundManager::playGuiSfx() Playing: %s", path.c_str());
diff --git a/src/textcommand.cpp b/src/textcommand.cpp
index e83e1f08a..a89b916fe 100644
--- a/src/textcommand.cpp
+++ b/src/textcommand.cpp
@@ -128,8 +128,8 @@ void TextCommand::loadImage()
return;
const SpriteDisplay display = ItemDB::get(getIcon()).getDisplay();
- mImage = ImageLoader::getImage(paths.getStringValue("itemIcons")
- .append(display.image));
+ mImage = Loader::getImage(paths.getStringValue("itemIcons").append(
+ display.image));
if (!mImage)
mImage = Theme::getImageFromTheme("unknown-item.png");