Athena IO Library
SkywardSwordQuest.hpp
1 #if !defined(ATHENA_NO_SAVES) && !defined(ATHENA_NO_ZQUEST)
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 SKYWARDSWORDQUEST_HPP
18 #define SKYWARDSWORDQUEST_HPP
19 
20 #include "Athena/Global.hpp"
21 #include "Athena/ZQuestFile.hpp"
22 
23  namespace Athena
24  {
25 
26  // TODO: Handle game specific data
28  {
29  public:
30  enum AmmoType
31  {
32  Arrows,
33  Bombs,
34  Seeds
35  };
36 
37  SkywardSwordQuest(atUint8* data, atUint32 len);
38 
39  void setPlayerName(const std::string& name);
40  std::string playerName() const;
41 
42  void setRupeeCount(atUint16 value);
43  atUint16 rupeeCount();
44  void setAmmoCount(AmmoType type, atUint32 count);
45  atUint32 ammoCount(AmmoType type);
46  void setMaxHP(atUint16 val);
47  atUint16 maxHP();
48  float maxHearts();
49  void setSpawnHP(atUint16 val);
50  atUint16 spawnHP();
51  float spawnHearts();
52  void setCurrentHP(atUint16 val);
53  atUint16 currentHP();
54  float currentHearts();
55  std::string currentLocation();
56  std::string currentArea();
57  std::string currentLocationCopy();
58 
59  void setSkipData(const atUint8* data);
60  atUint8* skipData() const;
61 
62 
63  atUint32 slotChecksum();
64  atUint32 skipChecksum();
65  void fixChecksums();
66 
67  void setNew(bool isNew);
68  bool isNew() const;
69  private:
70  atUint8* m_skipData;
71  };
72 
73 
74  } // zelda
75 #endif // SSQUEST_HPP
76 #endif // ATHENA_NO_SAVES
atUint8 * data() const
data
ZQuestFile is an export format for save data.
Definition: ZQuestFile.hpp:33