summaryrefslogtreecommitdiff
path: root/lyt/archivepackage.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
committerTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
commitebcc95da4c26369511caa90d89c5ed06e1e4853a (patch)
tree6ed445f0204a6e6615088d135c4b29c4309077a4 /lyt/archivepackage.cpp
parentfdf8cfec2b795393d7ee901abaf747575067068b (diff)
downloadLayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.tar.gz
LayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.zip
brlyt packing added, plus some changes in the existing API (mostly for const correctness). brlyt writing may still need some testing (especially for the material structs)
Diffstat (limited to 'lyt/archivepackage.cpp')
-rw-r--r--lyt/archivepackage.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lyt/archivepackage.cpp b/lyt/archivepackage.cpp
index 6b5a476..eaabbf2 100644
--- a/lyt/archivepackage.cpp
+++ b/lyt/archivepackage.cpp
@@ -40,17 +40,17 @@ LYTArchivePackage::~LYTArchivePackage() {
-WiiArchiveU8 *LYTArchivePackage::archive() {
+WiiArchiveU8 *LYTArchivePackage::archive() const {
return m_archive;
}
-QString LYTArchivePackage::filename() {
+QString LYTArchivePackage::filename() const {
return m_filename;
}
-QStringList LYTArchivePackage::listSubDirIfExists(QString dirName) {
+QStringList LYTArchivePackage::listSubDirIfExists(QString dirName) const {
WiiFSObject *obj = this->m_archive->root.resolvePath(dirName);
if (obj && obj->isDirectory()) {
@@ -67,7 +67,7 @@ QStringList LYTArchivePackage::listSubDirIfExists(QString dirName) {
}
-QByteArray LYTArchivePackage::getFileFromSubDirIfExists(QString dirName, QString fileName) {
+QByteArray LYTArchivePackage::getFileFromSubDirIfExists(QString dirName, QString fileName) const {
WiiFSObject *obj = this->m_archive->root.resolvePath(QString("%1/%2").arg(dirName, fileName));
if (obj && obj->isFile()) {
@@ -92,37 +92,37 @@ bool LYTArchivePackage::writeFileToSubDir(QString dirName, QString fileName, QBy
-QStringList LYTArchivePackage::listAnims() {
+QStringList LYTArchivePackage::listAnims() const {
return this->listSubDirIfExists("arc/anim");
}
-QStringList LYTArchivePackage::listLayouts() {
+QStringList LYTArchivePackage::listLayouts() const {
return this->listSubDirIfExists("arc/blyt");
}
-QStringList LYTArchivePackage::listTextures() {
+QStringList LYTArchivePackage::listTextures() const {
return this->listSubDirIfExists("arc/timg");
}
-QStringList LYTArchivePackage::listFonts() {
+QStringList LYTArchivePackage::listFonts() const {
return this->listSubDirIfExists("arc/font");
}
-QByteArray LYTArchivePackage::getAnim(QString name) {
+QByteArray LYTArchivePackage::getAnim(QString name) const {
return this->getFileFromSubDirIfExists("arc/anim", name);
}
-QByteArray LYTArchivePackage::getLayout(QString name) {
+QByteArray LYTArchivePackage::getLayout(QString name) const {
return this->getFileFromSubDirIfExists("arc/blyt", name);
}
-QByteArray LYTArchivePackage::getTexture(QString name) {
+QByteArray LYTArchivePackage::getTexture(QString name) const {
return this->getFileFromSubDirIfExists("arc/timg", name);
}
-QByteArray LYTArchivePackage::getFont(QString name) {
+QByteArray LYTArchivePackage::getFont(QString name) const {
return this->getFileFromSubDirIfExists("arc/font", name);
}
@@ -163,6 +163,6 @@ bool LYTArchivePackage::savePackage() {
}
-QString LYTArchivePackage::description() {
+QString LYTArchivePackage::description() const {
return m_filename;
}