ScummVM API documentation
party.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 MM1_DATA_PARTY_H
23 #define MM1_DATA_PARTY_H
24 
25 #include "common/array.h"
26 #include "mm/mm1/data/character.h"
27 
28 namespace MM {
29 namespace MM1 {
30 
31 #define MAX_PARTY_SIZE 6
32 
33 struct Party : public Common::Array<Character> {
37  static void share(TransferKind shareType);
38 
42  uint getPartyGold() const;
43 
47  void clearPartyGold();
48 
52  void clearPartyGems();
53 
57  void clearPartyFood();
58 
62  void updateAC();
63 
67  void combatDone();
68 
72  bool hasItem(byte itemId) const;
73 
77  bool isPartyDead() const;
78 
83  bool checkPartyDead() const;
84 
89  bool checkPartyIncapacitated() const;
90 
94  void rearrange(const Common::Array<Character *> &party);
95 
100 
104  int indexOf(const Character *c);
105 };
106 
107 } // namespace MM1
108 } // namespace MM
109 
110 #endif
Definition: array.h:52
void clearPartyFood()
Definition: serializer.h:79
void synchronize(Common::Serializer &s)
int indexOf(const Character *c)
static void share(TransferKind shareType)
Definition: detection.h:27
void clearPartyGold()
bool checkPartyDead() const
Definition: character.h:432
void clearPartyGems()
bool isPartyDead() const
void rearrange(const Common::Array< Character *> &party)
Definition: party.h:33
bool hasItem(byte itemId) const
uint getPartyGold() const
bool checkPartyIncapacitated() const