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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef BLADERUNNER_SUSPECTS_DATABASE_H 24 #define BLADERUNNER_SUSPECTS_DATABASE_H 25 #include "common/array.h" 26 27 namespace BladeRunner { 28 29 class BladeRunnerEngine; 30 class TextResource; 31 32 class SuspectDatabaseEntry { 33 static const int kMOClueCount = 10; 34 static const int kWhereaboutsClueCount = 10; 35 static const int kReplicantClueCount = 20; 36 static const int kNonReplicantClueCount = 20; 37 static const int kOtherClueCount = 20; 38 static const int kIdentityClueCount = 10; 39 static const int kPhotoClueCount = 6; 40 41 struct Photo { 42 int clueId; 43 int shapeId; 44 int notUsed; 45 }; 46 47 BladeRunnerEngine *_vm; 48 49 int _actorId; 50 int _sex; 51 52 int _moClues[kMOClueCount]; 53 int _whereaboutsClues[kWhereaboutsClueCount]; 54 int _replicantClues[kReplicantClueCount]; 55 int _nonReplicantClues[kNonReplicantClueCount]; 56 int _otherClues[kOtherClueCount]; 57 int _identityClues[kIdentityClueCount]; 58 Photo _photoClues[kPhotoClueCount]; 59 60 int _moClueCount; 61 int _whereaboutsClueCount; 62 int _replicantClueCount; 63 int _nonReplicantClueCount; 64 int _otherClueCount; 65 int _identityClueCount; 66 int _photoClueCount; 67 68 public: 69 SuspectDatabaseEntry(BladeRunnerEngine *_vm); 70 ~SuspectDatabaseEntry(); 71 72 void setActor(int actorId); 73 void setSex(int sex); 74 75 bool addMOClue(int clueId); 76 bool addWhereaboutsClue(int clueId); 77 bool addReplicantClue(int clueId); 78 bool addNonReplicantClue(int clueId); 79 bool addOtherClue(int clueId); 80 bool addIdentityClue(int clueId); 81 bool addPhotoClue(int shapeId, int clueId); 82 83 const char *getName() const; 84 int getSex() const; 85 86 bool hasMOClue(int clueId) const; 87 bool hasWhereaboutsClue(int clueId) const; 88 bool hasReplicantClue(int clueId) const; 89 bool hasNonReplicantClue(int clueId) const; 90 bool hasOtherClue(int clueId) const; 91 bool hasIdentityClue(int clueId) const; 92 bool hasClue(int clueId) const; 93 94 int getPhotoCount() const; 95 int getPhotoClueId(int photoId) const; 96 int getPhotoShapeId(int photoId) const; 97 int getPhotoNotUsed(int photoId) const; 98 99 void reset(); 100 }; 101 102 class SuspectsDatabase { 103 BladeRunnerEngine *_vm; 104 105 Common::Array<SuspectDatabaseEntry *> _suspects; 106 107 public: 108 SuspectsDatabase(BladeRunnerEngine *_vm, int size); 109 ~SuspectsDatabase(); 110 111 SuspectDatabaseEntry *get(int suspectId); 112 }; 113 114 } // End of namespace BladeRunner 115 116 #endif 117