diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-02-22 01:39:13 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-02-22 01:39:13 +0000 |
| commit | 8082fda92a86b34a37fe386266efbde5e30bca16 (patch) | |
| tree | 85713a913062b8c851de806e2ad0fe26adaa7e03 /pokemod/Badge.cpp | |
| parent | 88b11f136c7a4b287ac44e3ec8e671cf17ab8319 (diff) | |
| download | sigen-8082fda92a86b34a37fe386266efbde5e30bca16.tar.gz sigen-8082fda92a86b34a37fe386266efbde5e30bca16.tar.xz sigen-8082fda92a86b34a37fe386266efbde5e30bca16.zip | |
[FIX] Frac now makes sure that the denominator is positive
[FIX] Sprite-containing classes less repetative with determining paths
[FIX] More include cleanup in pokemodr
[FIX] Precision of Frac decimal equivalents now use a define
[FIX] Species UI form is now more compact and complete
[ADD] SpeciesUI.{h, cpp} (again; wasn't actually included last time and got lost)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@68 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Badge.cpp')
| -rw-r--r-- | pokemod/Badge.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp index 2f444cef..cdc150d1 100644 --- a/pokemod/Badge.cpp +++ b/pokemod/Badge.cpp @@ -61,12 +61,12 @@ bool Badge::validate() const pokemod->validationMsg("Obey level out of range"); valid = false; } - if (!QFile(QString("%1/badge/%2/face.png").arg(pokemod->getPath()).arg(name)).exists()) + if (!QFile(getFace()).exists()) { pokemod->validationMsg("Cannot find the face sprite"); valid = false; } - if (!QFile(QString("%1/badge/%2/badge.png").arg(pokemod->getPath()).arg(name)).exists()) + if (!QFile(getBadge()).exists()) { pokemod->validationMsg("Cannot find the badge sprite"); valid = false; @@ -118,19 +118,19 @@ void Badge::setName(const QString& n) void Badge::setFace(const QString& f) throw(Exception) { - QFile file(QString("%1/badge/%2/face.png").arg(pokemod->getPath()).arg(name)); + QFile file(getFace()); if (file.exists() && !file.remove()) throw(ReplaceException(className, file.fileName())); - if (!QFile::copy(f, QString("%1/badge/%2/face.png").arg(pokemod->getPath()).arg(name))) + if (!QFile::copy(f, getFace())) throw(SaveException(className, file.fileName())); } void Badge::setBadge(const QString& b) throw(Exception) { - QFile file(QString("%1/badge/%2/badge.png").arg(pokemod->getPath()).arg(name)); + QFile file(getBadge()); if (file.exists() && !file.remove()) throw(ReplaceException(className, file.fileName())); - if (!QFile::copy(b, QString("%1/badge/%2/badge.png").arg(pokemod->getPath()).arg(name))) + if (!QFile::copy(b, getBadge())) throw(SaveException(className, file.fileName())); } |
