summaryrefslogtreecommitdiff
path: root/wii/archiveu8.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-14 03:15:41 +0200
committerTreeki <treeki@gmail.com>2010-10-14 03:15:41 +0200
commitfdf8cfec2b795393d7ee901abaf747575067068b (patch)
tree1eb3a65765c1c43c4ea91530462cd15d54f995d1 /wii/archiveu8.h
parent7213ca723a65dff8ebb0c6c08669695217e60453 (diff)
downloadLayoutStudio-fdf8cfec2b795393d7ee901abaf747575067068b.tar.gz
LayoutStudio-fdf8cfec2b795393d7ee901abaf747575067068b.zip
bugfixes; working U8 archive support for reading/writing
Diffstat (limited to '')
-rw-r--r--wii/archiveu8.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/wii/archiveu8.h b/wii/archiveu8.h
index 66f3fbe..6f54ba2 100644
--- a/wii/archiveu8.h
+++ b/wii/archiveu8.h
@@ -20,8 +20,22 @@
#include "common.h"
#include "filesystem.h"
+#include "stringtablebuilder.h"
+struct U8ReadInfo {
+ qint64 startPos;
+ QString stringTable;
+ int currentNode;
+};
+
+struct U8WriteInfo {
+ qint64 startPos;
+ WiiStringTableBuilder stringTableBuilder;
+ int currentRecursionLevel;
+ int currentNode;
+ int nextDataOffset;
+};
class WiiArchiveU8 {
@@ -32,6 +46,16 @@ public:
WiiDirectory root;
void writeToDataStream(QDataStream &out);
+
+private:
+ void readDir(QDataStream &in, WiiDirectory &dir, int lastChild, U8ReadInfo &info);
+
+ void addNodeToStringTable(WiiFSObject &node, WiiStringTableBuilder &table);
+ void countNode(WiiFSObject &node, int *countPtr);
+
+ void writeDir(QDataStream &out, WiiDirectory &dir, U8WriteInfo &info);
+
+ void writeNodeData(QDataStream &out, WiiFSObject &node);
};
#endif // WIIARCHIVEU8_H