ScummVM API documentation
shrine.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ULTIMA4_MAP_SHRINE_H
23 #define ULTIMA4_MAP_SHRINE_H
24 
25 #include "ultima/ultima4/map/map.h"
26 #include "ultima/ultima4/filesys/savegame.h"
27 
28 namespace Ultima {
29 namespace Ultima4 {
30 
31 #define SHRINE_MEDITATION_INTERVAL 100
32 #define MEDITATION_MANTRAS_PER_CYCLE 16
33 
34 class Shrine : public Map {
35 public:
36  Shrine();
37  ~Shrine() override {}
38 
39  // Methods
40  Common::String getName() override;
41  Virtue getVirtue() const;
42  Common::String getMantra() const;
43 
44  void setVirtue(Virtue v);
45  void setMantra(const Common::String &mantra);
46 
50  void enter();
51  void enhancedSequence();
52  void meditationCycle();
53  void askMantra();
54  void eject();
55  void showVision(bool elevated);
56 
57  // Properties
58 private:
59  Common::String _name;
60  Virtue _virtue;
61  Common::String _mantra;
62 };
63 
64 class Shrines {
65 public:
66  int _cycles, _completedCycles;
68 public:
72  Shrines();
73 
77  ~Shrines();
78 
82  bool isAdviceLoaded() const {
83  return !_advice.empty();
84  }
85 
89  void loadAdvice();
90 };
91 
92 extern Shrines *g_shrines;
93 
97 bool shrineCanEnter(const Portal *p);
98 
102 bool isShrine(Map *punknown);
103 
104 } // End of namespace Ultima4
105 } // End of namespace Ultima
106 
107 #endif
Definition: portal.h:53
Definition: str.h:59
Definition: map.h:134
Definition: detection.h:27
bool empty() const
Definition: array.h:351
Definition: shrine.h:64
bool isAdviceLoaded() const
Definition: shrine.h:82
Definition: shrine.h:34