Athena IO Library
WiiSaveReader.hpp
1 #ifndef ATHENA_NO_SAVES
2 // This file is part of libAthena.
3 //
4 // libAthena is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // libAthena is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with libAthena. If not, see <http://www.gnu.org/licenses/>
16 
17 #ifndef WIISAVEREADER_HPP
18 #define WIISAVEREADER_HPP
19 
20 #include "Athena/Global.hpp"
21 #include "Athena/MemoryReader.hpp"
22 
23 namespace Athena
24 {
25 class WiiSave;
26 class WiiBanner;
27 class WiiFile;
28 class WiiImage;
29 
30 namespace io
31 {
32 
40 class WiiSaveReader : protected MemoryReader
41 {
42  MEMORYREADER_BASE();
43 public:
49  WiiSaveReader(const atUint8*, atUint64);
50 
55  WiiSaveReader(const std::string&);
56 
61  WiiSave* readSave();
62 private:
63  WiiBanner* readBanner();
64  WiiFile* readFile();
65  WiiImage* readImage(atUint32 width, atUint32 height);
66  void readCerts(atUint32 totalSize);
67  WiiFile* buildTree(std::vector<WiiFile*> files);
68 };
69 
70 } // io
71 } // zelda
72 #endif // WIISAVEREADER_HPP
73 #endif // ATHENA_NO_SAVES
The WiiImage class.
Definition: WiiImage.hpp:28
Wii banner container class.
Definition: WiiBanner.hpp:33
Wii file container class.
Definition: WiiFile.hpp:36
Wii data.bin container class.
Definition: WiiSave.hpp:38
WiiSave * readSave()
readSave
Wii data.bin reader class.
WiiSaveReader(const atUint8 *, atUint64)
This constructor takes an existing buffer to read from.