diff options
author | Treeki <treeki@gmail.com> | 2010-10-14 03:15:41 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2010-10-14 03:15:41 +0200 |
commit | fdf8cfec2b795393d7ee901abaf747575067068b (patch) | |
tree | 1eb3a65765c1c43c4ea91530462cd15d54f995d1 /wii/archiveu8.h | |
parent | 7213ca723a65dff8ebb0c6c08669695217e60453 (diff) | |
download | LayoutStudio-fdf8cfec2b795393d7ee901abaf747575067068b.tar.gz LayoutStudio-fdf8cfec2b795393d7ee901abaf747575067068b.zip |
bugfixes; working U8 archive support for reading/writing
Diffstat (limited to '')
-rw-r--r-- | wii/archiveu8.h | 24 |
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 |