Athena IO Library
SkywardSwordFile.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 SSFILE_HPP
18 #define SSFILE_HPP
19 
20 #include "Athena/Global.hpp"
21 
22 // standard lib
23 #include <vector>
24 
25 namespace Athena
26 {
27 class SkywardSwordQuest;
28 
29 enum class Region
30 {
31  NTSC,
32  NTSCJ,
33  PAL
34 };
35 
37 {
38 public:
39  enum MagicNumbers
40  {
41  USMagic = 0x534F5545,
42  JAMagic = 0x534F554A,
43  EUMagic = 0x534F5550
44  };
45 
47  SkywardSwordFile(std::vector<SkywardSwordQuest*> quests);
49 
50  void addQuest(SkywardSwordQuest* q);
51  SkywardSwordQuest* quest(atUint32 id);
52  std::vector<SkywardSwordQuest*> questList() const;
53 
54  void setRegion(Region region);
55  Region region() const;
56 
57 private:
58  Region m_region;
59  // A vector is a bit overkill
60  std::vector<SkywardSwordQuest*> m_quests;
61  atUint32 m_numQuests;
62 };
63 
64 }
65 #endif // SSFILE_HPP
66 #endif // ATHENA_NO_SAVES