ScummVM API documentation
actor_clues.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 BLADERUNNER_ACTOR_CLUES_H
23#define BLADERUNNER_ACTOR_CLUES_H
24
25#include "common/array.h"
26
27namespace BladeRunner {
28
29class BladeRunnerEngine;
30class SaveFileReadStream;
31class SaveFileWriteStream;
32
34 // _vm->_gameInfo->getClueCount()
35 static const int kClueCount = 288;
36
37 struct Clue {
38 int clueId;
39 int weight;
40 int fromActorId;
41 int field3; // unused (but stored/restored)
42 int field4; // Used in Restored Content. Original: unused (but stored/restored)
43 int field5; // unused (but stored/restored)
44 int field6; // unused (but stored/restored)
45 int field7; // unused (but stored/restored)
46 int field8; // unused (but stored/restored)
47 byte flags; // bit 0 (acquired), bit 1 (unknown), bit 2 (viewed), bit 3 (private)
48 };
49
51
52 int _count;
53 int _maxCount;
55
56public:
57 struct CluesUS {
58 int clueId;
59 int modifier;
60 };
61
62public:
63 ActorClues(BladeRunnerEngine *_vm, int cluesLimit);
64
65 void add(int actorId, int clueId, int unknown, bool acquired, bool unknownFlag, int fromActorId);
66 bool exists(int clueId) const;
67
68 void acquire(int clueId, bool flag2, int fromActorId);
69 void lose(int clueId);
70 bool isAcquired(int clueId) const;
71 int getWeight(int clueId) const;
72
73 int getModifier(int actorId, int otherActorId, int clueId);
74
75 void acquireCluesByRelations(int actorId, int otherActorId);
76 int findAcquirableCluesFromActor(int actorId, int targetActorId, CluesUS *list, int size);
77
78 int getFromActorId(int clueId) const;
79
80 bool isFlag2(int clueId) const;
81
82 bool isViewed(int clueId) const;
83 void setViewed(int clueId, bool viewed);
84
85 bool isPrivate(int clueId) const;
86 void setPrivate(int clueId, bool value);
87
88 // Restored Content method - Checks whether a clue, that McCoy has, was shared with Mainframe
89 bool isSharedWithMainframe(int clueId) const;
90 // Restored Content method - Marks a clue, that McCoy has, as shared with Mainframe
91 void setSharedWithMainframe(int clueId, bool value);
92
93 int getCount() const;
94 int getClueIdByIndex(int index) const;
95
96 void removeAll();
97
98 void save(SaveFileWriteStream &f);
99 void load(SaveFileReadStream &f);
100
101private:
102 int findClueIndex(int clueId) const;
103 void remove(int clueIndex);
104};
105
106} // End of namespace BladeRunner
107
108#endif
Definition: actor_clues.h:33
Definition: bladerunner.h:113
Definition: savefile.h:113
Definition: savefile.h:88
Definition: actor_clues.h:57