From fdf8cfec2b795393d7ee901abaf747575067068b Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 14 Oct 2010 03:15:41 +0200 Subject: bugfixes; working U8 archive support for reading/writing --- wii/archiveu8.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'wii/archiveu8.h') 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 -- cgit v1.2.3