summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-18 00:26:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-18 00:26:00 +0300
commitb73e51c8993c6e2eef7a28a79ea79b7a6d61783d (patch)
treeba37e85ee798f606e68a4b084d8c8e7025d7d9af
parentbad30239e412c4e31aa8929039eaebc615d220ec (diff)
downloadmv-b73e51c8993c6e2eef7a28a79ea79b7a6d61783d.tar.gz
mv-b73e51c8993c6e2eef7a28a79ea79b7a6d61783d.tar.bz2
mv-b73e51c8993c6e2eef7a28a79ea79b7a6d61783d.tar.xz
mv-b73e51c8993c6e2eef7a28a79ea79b7a6d61783d.zip
Remove default parameters from animatedsprites.
-rw-r--r--src/being/actorsprite.cpp6
-rw-r--r--src/being/being.cpp53
-rw-r--r--src/being/castingeffect.cpp2
-rw-r--r--src/gui/windows/cutinwindow.cpp5
-rw-r--r--src/resources/db/emotedb.cpp3
-rw-r--r--src/resources/sprite/animatedsprite.h5
-rw-r--r--src/statuseffect.cpp5
7 files changed, 49 insertions, 30 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 6594c7e3c..c854c998f 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -452,7 +452,8 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
{
addSprite(AnimatedSprite::delayedLoad(pathJoin(
paths.getStringValue("sprites"),
- paths.getStringValue("spriteErrorFile"))));
+ paths.getStringValue("spriteErrorFile")),
+ 0));
}
else
{
@@ -566,7 +567,8 @@ void ActorSprite::initTargetCursor()
Theme::resolveThemePath(strprintf(
targetCursorFile.c_str(),
cursorType(static_cast<TargetCursorTypeT>(type)),
- cursorSize(static_cast<TargetCursorSizeT>(size)))));
+ cursorSize(static_cast<TargetCursorSizeT>(size)))),
+ 0);
}
end_foreach
}
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 46367416f..1e8ca5efc 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1112,7 +1112,8 @@ void Being::showNameBadge(const bool show) restrict2
if (!badge.empty())
{
mBadges[BadgeIndex::Name] = AnimatedSprite::load(
- paths.getStringValue("badges") + badge);
+ paths.getStringValue("badges") + badge,
+ 0);
}
}
}
@@ -1171,7 +1172,8 @@ void Being::showGuildBadge(const bool show) restrict2
if (!badge.empty())
{
mBadges[BadgeIndex::Guild] = AnimatedSprite::load(
- paths.getStringValue("badges") + badge);
+ paths.getStringValue("badges") + badge,
+ 0);
}
}
}
@@ -2758,7 +2760,8 @@ void Being::setSpriteId(const unsigned int slot,
if (!filename.empty())
{
equipmentSprite = AnimatedSprite::delayedLoad(
- pathJoin(paths.getStringValue("sprites"), filename));
+ pathJoin(paths.getStringValue("sprites"), filename),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -2864,7 +2867,8 @@ void Being::setSpriteColor(const unsigned int slot,
{
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, color)));
+ combineDye(filename, color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -2943,7 +2947,8 @@ void Being::setSpriteColorId(const unsigned int slot,
color = info.getDyeColorsString(colorId);
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, color)));
+ combineDye(filename, color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -3029,7 +3034,8 @@ void Being::setSpriteCards(const unsigned int slot,
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, color)));
+ combineDye(filename, color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -3121,7 +3127,8 @@ void Being::setTempSprite(const unsigned int slot,
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, color)));
+ combineDye(filename, color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -3194,7 +3201,8 @@ void Being::setHairTempSprite(const unsigned int slot,
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, color)));
+ combineDye(filename, color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -3272,7 +3280,8 @@ void Being::setSpriteColor(const unsigned int slot,
{
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, color)));
+ combineDye(filename, color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -3544,7 +3553,8 @@ void Being::setGender(const GenderT gender) restrict2
{
equipmentSprite = AnimatedSprite::delayedLoad(
pathJoin(paths.getStringValue("sprites"),
- combineDye(filename, beingSlot.color)));
+ combineDye(filename, beingSlot.color)),
+ 0);
}
if (equipmentSprite != nullptr)
@@ -3586,7 +3596,8 @@ void Being::showGmBadge(const bool show) restrict2
if (!gmBadge.empty())
{
mBadges[BadgeIndex::Gm] = AnimatedSprite::load(
- paths.getStringValue("badges") + gmBadge);
+ paths.getStringValue("badges") + gmBadge,
+ 0);
}
}
updateBadgesCount();
@@ -4884,7 +4895,8 @@ void Being::addEffect(const std::string &restrict name) restrict2
{
delete mAnimationEffect;
mAnimationEffect = AnimatedSprite::load(
- paths.getStringValue("sprites") + name);
+ paths.getStringValue("sprites") + name,
+ 0);
}
void Being::playSfx(const SoundInfo &sound,
@@ -5128,7 +5140,7 @@ void Being::showTeamBadge(const bool show) restrict2
paths.getStringValue(strprintf("team%dbadge",
mTeamId));
if (!name.empty())
- mBadges[BadgeIndex::Team] = AnimatedSprite::load(name);
+ mBadges[BadgeIndex::Team] = AnimatedSprite::load(name, 0);
}
updateBadgesCount();
updateBadgesPosition();
@@ -5157,7 +5169,8 @@ void Being::showPartyBadge(const bool show) restrict2
if (!badge.empty())
{
mBadges[BadgeIndex::Party] = AnimatedSprite::load(
- paths.getStringValue("badges") + badge);
+ paths.getStringValue("badges") + badge,
+ 0);
}
}
updateBadgesCount();
@@ -5185,7 +5198,8 @@ void Being::showShopBadge(const bool show) restrict2
if (!badge.empty())
{
mBadges[BadgeIndex::Shop] = AnimatedSprite::load(
- paths.getStringValue("badges") + badge);
+ paths.getStringValue("badges") + badge,
+ 0);
}
}
updateBadgesCount();
@@ -5203,7 +5217,8 @@ void Being::showInactiveBadge(const bool show) restrict2
if (!badge.empty())
{
mBadges[BadgeIndex::Inactive] = AnimatedSprite::load(
- paths.getStringValue("badges") + badge);
+ paths.getStringValue("badges") + badge,
+ 0);
}
}
updateBadgesCount();
@@ -5221,7 +5236,8 @@ void Being::showAwayBadge(const bool show) restrict2
if (!badge.empty())
{
mBadges[BadgeIndex::Away] = AnimatedSprite::load(
- paths.getStringValue("badges") + badge);
+ paths.getStringValue("badges") + badge,
+ 0);
}
}
updateBadgesCount();
@@ -5480,7 +5496,8 @@ void Being::setLanguageId(const int lang) restrict2 noexcept2
{
mBadges[BadgeIndex::Lang] = AnimatedSprite::load(pathJoin(
paths.getStringValue("languageIcons"),
- badge));
+ badge),
+ 0);
}
mLanguageId = lang;
diff --git a/src/being/castingeffect.cpp b/src/being/castingeffect.cpp
index 872743f82..cdd015470 100644
--- a/src/being/castingeffect.cpp
+++ b/src/being/castingeffect.cpp
@@ -43,7 +43,7 @@ CastingEffect::CastingEffect(const int skillId,
const int range) :
Actor(),
mSprite(animation.empty() ? nullptr :
- AnimatedSprite::load(paths.getStringValue("sprites") + animation)),
+ AnimatedSprite::load(paths.getStringValue("sprites") + animation, 0)),
mRectX((x - range) * mapTileSize),
mRectY((y - range) * mapTileSize),
mRectSize(range * mapTileSize * 2 + mapTileSize),
diff --git a/src/gui/windows/cutinwindow.cpp b/src/gui/windows/cutinwindow.cpp
index 2713dfdfc..d31ae20ed 100644
--- a/src/gui/windows/cutinwindow.cpp
+++ b/src/gui/windows/cutinwindow.cpp
@@ -84,9 +84,8 @@ void CutInWindow::show(const std::string &name,
else
{
mImage = AnimatedSprite::load(
- pathJoin(paths.getStringValue("cutInsDir"),
- name).append(
- ".xml"));
+ pathJoin(paths.getStringValue("cutInsDir"), name).append(".xml"),
+ 0);
if (mImage != nullptr)
{
mImage->update(1);
diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp
index e519b531d..c9eb8a513 100644
--- a/src/resources/db/emotedb.cpp
+++ b/src/resources/db/emotedb.cpp
@@ -54,7 +54,8 @@ void EmoteDB::load()
EmoteSprite *const unknownSprite = new EmoteSprite;
unknownSprite->sprite = AnimatedSprite::load(pathJoin(paths.getStringValue(
"sprites"), paths.getStringValue(
- "spriteErrorFile")));
+ "spriteErrorFile")),
+ 0);
unknownSprite->name = "unknown";
unknownSprite->id = 0;
mUnknown.sprites.push_back(unknownSprite);
diff --git a/src/resources/sprite/animatedsprite.h b/src/resources/sprite/animatedsprite.h
index 01a142f31..e45ffd34e 100644
--- a/src/resources/sprite/animatedsprite.h
+++ b/src/resources/sprite/animatedsprite.h
@@ -51,12 +51,11 @@ class AnimatedSprite final : public Sprite
* @param variant the sprite variant
*/
static AnimatedSprite *load(const std::string &restrict filename,
- const int variant = 0) A_WARN_UNUSED;
+ const int variant) A_WARN_UNUSED;
static AnimatedSprite *delayedLoad(const std::string &restrict
filename,
- const int variant = 0)
- A_WARN_UNUSED;
+ const int variant) A_WARN_UNUSED;
static AnimatedSprite *clone(const AnimatedSprite *restrict const
anim);
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 5892a95e5..2b48636ca 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -94,8 +94,9 @@ AnimatedSprite *StatusEffect::getIcon() const
{
return nullptr;
}
- return AnimatedSprite::load(pathJoin(paths.getStringValue("sprites"),
- mIcon));
+ return AnimatedSprite::load(
+ pathJoin(paths.getStringValue("sprites"), mIcon),
+ 0);
}
std::string StatusEffect::getAction() const