2014-06-18 04:51:18 +00:00
|
|
|
#ifndef ATHENA_NO_SAVES
|
2014-04-20 10:28:28 +00:00
|
|
|
// This file is part of libAthena.
|
2013-02-16 18:28:30 +00:00
|
|
|
//
|
2014-04-20 10:28:28 +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 10:28:28 +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 10:28:28 +00:00
|
|
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
2013-02-16 18:28:30 +00:00
|
|
|
|
2015-03-01 20:42:39 +00:00
|
|
|
#ifndef ALTTP_FILE_HPP
|
|
|
|
#define ALTTP_FILE_HPP
|
2013-02-16 18:28:30 +00:00
|
|
|
|
2014-04-20 09:14:15 +00:00
|
|
|
#include "Athena/Types.hpp"
|
2013-02-16 18:28:30 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2014-04-20 09:14:15 +00:00
|
|
|
namespace Athena
|
2013-07-21 03:57:20 +00:00
|
|
|
{
|
|
|
|
|
2013-02-16 18:28:30 +00:00
|
|
|
class ALTTPQuest;
|
|
|
|
|
|
|
|
/*! \class ALTTPFile
|
2013-07-21 03:57:20 +00:00
|
|
|
* \brief A Link to the Past data container class class
|
2013-02-16 18:28:30 +00:00
|
|
|
*
|
|
|
|
* Contains all relevant data for an A Link to the Past
|
|
|
|
* SRM file.
|
|
|
|
*/
|
|
|
|
class ALTTPFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/*! \brief Quest Iterator
|
|
|
|
*
|
|
|
|
* An Iterator typedef for iterating through the Quest lists
|
|
|
|
*/
|
|
|
|
typedef std::vector<ALTTPQuest*>::iterator QuestIter;
|
|
|
|
|
|
|
|
/*! \brief Default constructor
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
ALTTPFile();
|
|
|
|
|
|
|
|
/*! \brief Constructor
|
|
|
|
*
|
|
|
|
* \param questList The primary quest list
|
|
|
|
* \param backupList The backup quest list
|
|
|
|
*/
|
|
|
|
ALTTPFile(std::vector<ALTTPQuest*> questList, std::vector<ALTTPQuest*> backupList);
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief Sets a quest at the given index
|
|
|
|
*
|
|
|
|
* \param id Index to the given quest
|
|
|
|
* \param val The new quest to assign to the given index
|
|
|
|
* \throw InvalidOperationException on index out of range
|
|
|
|
*/
|
2014-06-18 04:51:18 +00:00
|
|
|
void setQuest(atUint32 id, ALTTPQuest* val);
|
2013-02-16 18:28:30 +00:00
|
|
|
/*! \brief Returns the primary quest list
|
|
|
|
*
|
|
|
|
* \return The primary quest list
|
|
|
|
*/
|
|
|
|
std::vector<ALTTPQuest*> questList() const;
|
|
|
|
|
|
|
|
/*! \brief Returns a quest at the given index
|
|
|
|
*
|
|
|
|
* Returns a quest at the given index
|
|
|
|
*
|
|
|
|
* \return ALTTPQuest*
|
|
|
|
* \throw InvalidOperationException on index out of range
|
|
|
|
*/
|
2014-06-18 04:51:18 +00:00
|
|
|
ALTTPQuest* quest(atUint32 id) const;
|
2013-02-16 18:28:30 +00:00
|
|
|
|
|
|
|
/*! \brief Returns the number of primary quests
|
|
|
|
*
|
|
|
|
* \return The number of quests
|
|
|
|
*/
|
2014-06-18 04:51:18 +00:00
|
|
|
atUint32 questCount() const;
|
2013-02-16 18:28:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
std::vector<ALTTPQuest*> m_quests;
|
|
|
|
std::vector<ALTTPQuest*> m_backup;
|
|
|
|
};
|
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
} // zelda
|
2015-03-01 20:42:39 +00:00
|
|
|
#endif // ALTTP_FILE_HPP
|
2014-06-18 04:51:18 +00:00
|
|
|
#endif // ATHENA_NO_SAVES
|