2014-06-28 15:38:50 +00:00
|
|
|
#ifndef ATHENA_NO_SAVES
|
2014-04-20 09:14:15 +00:00
|
|
|
// This file is part of libAthena.
|
2013-02-16 18:28:30 +00:00
|
|
|
//
|
2014-04-20 09:14:15 +00:00
|
|
|
// libAthena is free software: you can redistribute it and/or modify
|
2013-02-16 18:28:30 +00:00
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
2014-04-20 09:14:15 +00:00
|
|
|
// libAthena is distributed in the hope that it will be useful,
|
2013-02-16 18:28:30 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
2014-04-20 09:14:15 +00:00
|
|
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
|
2013-02-16 18:28:30 +00:00
|
|
|
#ifndef __WII__SAVE_HPP__
|
|
|
|
#define __WII__SAVE_HPP__
|
2013-02-16 04:22:16 +00:00
|
|
|
|
|
|
|
#include <unordered_map>
|
|
|
|
#include <string>
|
2014-04-20 09:14:15 +00:00
|
|
|
#include "Athena/Global.hpp"
|
2013-02-16 04:22:16 +00:00
|
|
|
|
2014-04-20 09:14:15 +00:00
|
|
|
namespace Athena
|
2013-07-21 03:57:20 +00:00
|
|
|
{
|
|
|
|
|
2013-02-16 04:22:16 +00:00
|
|
|
class WiiFile;
|
|
|
|
class WiiBanner;
|
|
|
|
class WiiImage;
|
|
|
|
class BinaryReader;
|
|
|
|
class BinaryWriter;
|
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
/*! \class WiiSave
|
|
|
|
* \brief Wii data.bin container class
|
|
|
|
*
|
|
|
|
* Contains all relevant data for a Wii data.bin file.
|
|
|
|
*/
|
2013-02-16 04:22:16 +00:00
|
|
|
class WiiSave
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
/*!
|
|
|
|
* \brief FileIterator
|
|
|
|
*/
|
2013-02-16 04:22:16 +00:00
|
|
|
typedef std::unordered_map<std::string, WiiFile*>::const_iterator FileIterator;
|
2013-07-21 03:57:20 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief WiiSave
|
|
|
|
*/
|
2013-02-16 04:22:16 +00:00
|
|
|
WiiSave();
|
2013-07-21 03:57:20 +00:00
|
|
|
/*!
|
|
|
|
* \brief ~WiiSave
|
|
|
|
*/
|
2013-02-16 04:22:16 +00:00
|
|
|
virtual ~WiiSave();
|
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
/*!
|
|
|
|
* \brief addFile
|
|
|
|
* \param filename
|
|
|
|
* \param file
|
|
|
|
*/
|
2014-11-29 03:32:37 +00:00
|
|
|
void addFile(WiiFile* file);
|
2014-09-19 11:54:56 +00:00
|
|
|
void setRoot(WiiFile* root);
|
2013-07-21 03:57:20 +00:00
|
|
|
/*!
|
|
|
|
* \brief file
|
|
|
|
* \param filename
|
|
|
|
* \return
|
|
|
|
*/
|
2014-09-19 11:54:56 +00:00
|
|
|
WiiFile* file(const std::string& filename);
|
|
|
|
|
|
|
|
atUint32 fileCount() const;
|
2013-07-21 03:57:20 +00:00
|
|
|
/*!
|
|
|
|
* \brief fileList
|
|
|
|
* \return
|
|
|
|
*/
|
2014-09-19 11:54:56 +00:00
|
|
|
WiiFile* root();
|
2013-02-16 04:22:16 +00:00
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
/*!
|
|
|
|
* \brief setBanner
|
|
|
|
* \param banner
|
|
|
|
*/
|
2013-02-16 04:22:16 +00:00
|
|
|
void setBanner(WiiBanner* banner);
|
2013-07-21 03:57:20 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief banner
|
|
|
|
* \return
|
|
|
|
*/
|
2013-02-16 04:22:16 +00:00
|
|
|
WiiBanner* banner() const;
|
|
|
|
|
2014-09-19 11:54:56 +00:00
|
|
|
std::vector<WiiFile*> allFiles() const;
|
|
|
|
|
2013-02-16 04:22:16 +00:00
|
|
|
protected:
|
|
|
|
private:
|
|
|
|
|
2014-09-19 11:54:56 +00:00
|
|
|
WiiFile* m_root;
|
2013-02-16 04:22:16 +00:00
|
|
|
WiiBanner* m_banner;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
} // zelda
|
2013-02-16 18:28:30 +00:00
|
|
|
#endif // __WII__SAVE_HPP__
|
2014-06-28 15:38:50 +00:00
|
|
|
#endif // ATHENA_NO_SAVES
|
|
|
|
|